diff --git a/README.rst b/README.rst index fe96355..c22bfd6 100644 --- a/README.rst +++ b/README.rst @@ -31,20 +31,21 @@ Adding a new schema Steps to update the alert schema (for example, when the APDB schema is updated). * Decide what the new schema version will be, following the guidelines given in `DMTN-093 `_, referring to the current version number directories in ``python/lsst/alert/packet/schema``. -* ``setup -r .`` in this package's root. * Checkout the ticket branch for your schema changes. * Update the default ``schema_root`` kwarg in ``python/lsst/alert/packet/schemaRegistry.py:from_filesystem()`` to your new schema version number. -* New schemas are built from the apdb. Any changes to a field should be done in sdm_schemas/yml/apdb.yaml, and any changes to what is included/excluded should be made in updateSchema.py. +* New schemas are built from the apdb. Any changes to a field should be done in ``sdm_schemas/yml/apdb.yaml``, and any changes to what is included/excluded should be made in ``updateSchema.py``. * To update the schema, you must have the path to the apdb.yaml file and have chosen a version number. If the directory for your version does not already exist, ``updateSchema.py`` will create it. - * run ``python updateSchema.py /path/to/LSST/code/sdm_schemas/yml/apdb.yaml Path/To/alert_packet/lsst/alert/packet/schema "6.0"`` All Generated files do not need to be altered. + * set up ``sdm_schemas`` and ``cd python/lsst/alert/packet/``. + * run ``python updateSchema.py $SDM_SCHEMAS_DIR/yml/apdb.yaml ./schema "6.0"`` All Generated files do not need to be altered. * Navigate to the new schema. Copy in the previous ``lsst.vX_X.alert.avsc`` file and ``lsst.vX_X.diaNondetectionLimit.avsc``. * Within the two copied files, update ``"namespace": "lsst.vX_X",`` line at the top of each ``*.avsc`` file to the new version. * Update the contents of those avro schema files to reflect the new schema. * Update the sample alert packet in ``sample_data``: + * Copy ``sample_data`` from previous schema into the new version's ``X_X`` directory. * Update ``alert.json`` to reflect the new schema. * Change the ``schema_root`` and ``get_by_version`` parameters in ``generate.py`` to your new version number. * Run ``python generate.py`` to produce a new ``fakeAlert.avro`` file with data filled in from the updated json file above and using the new schema files you made earlier. diff --git a/python/lsst/alert/packet/schema/7/0/lsst.v7_0.alert.avsc b/python/lsst/alert/packet/schema/7/0/lsst.v7_0.alert.avsc new file mode 100644 index 0000000..dd05aa6 --- /dev/null +++ b/python/lsst/alert/packet/schema/7/0/lsst.v7_0.alert.avsc @@ -0,0 +1,24 @@ +{ + "namespace": "lsst.v7_0", + "type": "record", + "name": "alert", + "doc": "Rubin Avro alert schema v7.0", + "fields": [ + {"name": "alertId", "type": "long", "doc": "unique alert identifer"}, + {"name": "diaSource", "type": "lsst.v7_0.diaSource"}, + {"name": "prvDiaSources", "type": ["null", { + "type": "array", + "items": "lsst.v7_0.diaSource"}], "default": null}, + {"name": "prvDiaForcedSources", "type": ["null", { + "type": "array", + "items": "lsst.v7_0.diaForcedSource"}], "default": null}, + {"name": "prvDiaNondetectionLimits", "type": ["null", { + "type": "array", + "items": "lsst.v7_0.diaNondetectionLimit"}], "default": null}, + {"name": "diaObject", "type": ["null", "lsst.v7_0.diaObject"], "default": null}, + {"name": "ssObject", "type": ["null", "lsst.v7_0.ssObject"], "default": null}, + {"name": "cutoutDifference", "type": ["null", "bytes"], "default": null}, + {"name": "cutoutScience", "type": ["null", "bytes"], "default": null}, + {"name": "cutoutTemplate", "type": ["null", "bytes"], "default": null} + ] +} diff --git a/python/lsst/alert/packet/schema/7/0/lsst.v7_0.diaForcedSource.avsc b/python/lsst/alert/packet/schema/7/0/lsst.v7_0.diaForcedSource.avsc new file mode 100644 index 0000000..16af774 --- /dev/null +++ b/python/lsst/alert/packet/schema/7/0/lsst.v7_0.diaForcedSource.avsc @@ -0,0 +1,77 @@ +{ + "type": "record", + "namespace": "lsst.v7_0", + "name": "diaForcedSource", + "fields": [ + { + "doc": "Unique id.", + "name": "diaForcedSourceId", + "type": "long" + }, + { + "doc": "Id of the DiaObject that this DiaForcedSource was associated with.", + "name": "diaObjectId", + "type": "long" + }, + { + "doc": "Id of the visit where this forcedSource was measured.", + "name": "visit", + "type": "long" + }, + { + "doc": "Id of the detector where this forcedSource was measured.", + "name": "detector", + "type": "int" + }, + { + "default": null, + "doc": "Point Source model flux.", + "name": "psfFlux", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of psfFlux.", + "name": "psfFluxErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "x position at which psfFlux has been measured.", + "name": "x", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "y position at which psfFlux has been measured.", + "name": "y", + "type": [ + "null", + "float" + ] + }, + { + "doc": "Effective mid-visit time for this diaForcedSource, expressed as Modified Julian Date, International Atomic Time.", + "name": "midpointMjdTai", + "type": "double" + }, + { + "default": null, + "doc": "Filter band this source was observed with.", + "name": "band", + "type": [ + "null", + "string" + ] + } + ] +} diff --git a/python/lsst/alert/packet/schema/7/0/lsst.v7_0.diaNondetectionLimit.avsc b/python/lsst/alert/packet/schema/7/0/lsst.v7_0.diaNondetectionLimit.avsc new file mode 100644 index 0000000..3967f60 --- /dev/null +++ b/python/lsst/alert/packet/schema/7/0/lsst.v7_0.diaNondetectionLimit.avsc @@ -0,0 +1,11 @@ +{ + "namespace": "lsst.v7_0", + "name": "diaNondetectionLimit", + "type": "record", + "fields": [ + {"name": "ccdVisitId", "type": "long"}, + {"name": "midpointMjdTai", "type": "double"}, + {"name": "band", "type": "string"}, + {"name": "diaNoise", "type": "float"} + ] +} diff --git a/python/lsst/alert/packet/schema/7/0/lsst.v7_0.diaObject.avsc b/python/lsst/alert/packet/schema/7/0/lsst.v7_0.diaObject.avsc new file mode 100644 index 0000000..42686d4 --- /dev/null +++ b/python/lsst/alert/packet/schema/7/0/lsst.v7_0.diaObject.avsc @@ -0,0 +1,733 @@ +{ + "type": "record", + "namespace": "lsst.v7_0", + "name": "diaObject", + "fields": [ + { + "doc": "Unique identifier of this DiaObject.", + "name": "diaObjectId", + "type": "long" + }, + { + "doc": "Right ascension coordinate of the position of the object at time radecMjdTai.", + "name": "ra", + "type": "double" + }, + { + "default": null, + "doc": "Uncertainty of ra.", + "name": "raErr", + "type": [ + "null", + "float" + ] + }, + { + "doc": "Declination coordinate of the position of the object at time radecMjdTai.", + "name": "dec", + "type": "double" + }, + { + "default": null, + "doc": "Uncertainty of dec.", + "name": "decErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance between ra and dec.", + "name": "ra_dec_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Time at which the object was at a position ra/dec, expressed as Modified Julian Date, International Atomic Time.", + "name": "radecMjdTai", + "type": [ + "null", + "double" + ] + }, + { + "default": null, + "doc": "Proper motion in right ascension.", + "name": "pmRa", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of pmRa.", + "name": "pmRaErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Proper motion of declination.", + "name": "pmDec", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of pmDec.", + "name": "pmDecErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Parallax.", + "name": "parallax", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of parallax.", + "name": "parallaxErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of pmRa and pmDec.", + "name": "pmRa_pmDec_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of pmRa and parallax.", + "name": "pmRa_parallax_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of pmDec and parallax.", + "name": "pmDec_parallax_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Natural log of the likelihood of the linear proper motion parallax fit.", + "name": "pmParallaxLnL", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Chi^2 static of the model fit.", + "name": "pmParallaxChi2", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "The number of data points used to fit the model.", + "name": "pmParallaxNdata", + "type": [ + "null", + "int" + ] + }, + { + "default": null, + "doc": "Weighted mean point-source model magnitude for u filter.", + "name": "u_psfFluxMean", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Standard error of u_psfFluxMean.", + "name": "u_psfFluxMeanErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Standard deviation of the distribution of u_psfFlux.", + "name": "u_psfFluxSigma", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Chi^2 statistic for the scatter of u_psfFlux around u_psfFluxMean.", + "name": "u_psfFluxChi2", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "The number of data points used to compute u_psfFluxChi2.", + "name": "u_psfFluxNdata", + "type": [ + "null", + "int" + ] + }, + { + "default": null, + "doc": "Weighted mean forced photometry flux for u filter.", + "name": "u_fpFluxMean", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Standard error of u_fpFluxMean.", + "name": "u_fpFluxMeanErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Standard deviation of the distribution of u_fpFlux.", + "name": "u_fpFluxSigma", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Weighted mean point-source model magnitude for g filter.", + "name": "g_psfFluxMean", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Standard error of g_psfFluxMean.", + "name": "g_psfFluxMeanErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Standard deviation of the distribution of g_psfFlux.", + "name": "g_psfFluxSigma", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Chi^2 statistic for the scatter of g_psfFlux around g_psfFluxMean.", + "name": "g_psfFluxChi2", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "The number of data points used to compute g_psfFluxChi2.", + "name": "g_psfFluxNdata", + "type": [ + "null", + "int" + ] + }, + { + "default": null, + "doc": "Weighted mean forced photometry flux for g filter.", + "name": "g_fpFluxMean", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Standard error of g_fpFluxMean.", + "name": "g_fpFluxMeanErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Standard deviation of the distribution of g_fpFlux.", + "name": "g_fpFluxSigma", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Weighted mean point-source model magnitude for r filter.", + "name": "r_psfFluxMean", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Standard error of r_psfFluxMean.", + "name": "r_psfFluxMeanErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Standard deviation of the distribution of r_psfFlux.", + "name": "r_psfFluxSigma", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Chi^2 statistic for the scatter of r_psfFlux around r_psfFluxMean.", + "name": "r_psfFluxChi2", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "The number of data points used to compute r_psfFluxChi2.", + "name": "r_psfFluxNdata", + "type": [ + "null", + "int" + ] + }, + { + "default": null, + "doc": "Weighted mean forced photometry flux for r filter.", + "name": "r_fpFluxMean", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Standard error of r_fpFluxMean.", + "name": "r_fpFluxMeanErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Standard deviation of the distribution of r_fpFlux.", + "name": "r_fpFluxSigma", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Weighted mean point-source model magnitude for i filter.", + "name": "i_psfFluxMean", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Standard error of i_psfFluxMean.", + "name": "i_psfFluxMeanErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Standard deviation of the distribution of i_psfFlux.", + "name": "i_psfFluxSigma", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Chi^2 statistic for the scatter of i_psfFlux around i_psfFluxMean.", + "name": "i_psfFluxChi2", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "The number of data points used to compute i_psfFluxChi2.", + "name": "i_psfFluxNdata", + "type": [ + "null", + "int" + ] + }, + { + "default": null, + "doc": "Weighted mean forced photometry flux for i filter.", + "name": "i_fpFluxMean", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Standard error of i_fpFluxMean.", + "name": "i_fpFluxMeanErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Standard deviation of the distribution of i_fpFlux.", + "name": "i_fpFluxSigma", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Weighted mean point-source model magnitude for z filter.", + "name": "z_psfFluxMean", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Standard error of z_psfFluxMean.", + "name": "z_psfFluxMeanErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Standard deviation of the distribution of z_psfFlux.", + "name": "z_psfFluxSigma", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Chi^2 statistic for the scatter of z_psfFlux around z_psfFluxMean.", + "name": "z_psfFluxChi2", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "The number of data points used to compute z_psfFluxChi2.", + "name": "z_psfFluxNdata", + "type": [ + "null", + "int" + ] + }, + { + "default": null, + "doc": "Weighted mean forced photometry flux for z filter.", + "name": "z_fpFluxMean", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Standard error of z_fpFluxMean.", + "name": "z_fpFluxMeanErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Standard deviation of the distribution of z_fpFlux.", + "name": "z_fpFluxSigma", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Weighted mean point-source model magnitude for y filter.", + "name": "y_psfFluxMean", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Standard error of y_psfFluxMean.", + "name": "y_psfFluxMeanErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Standard deviation of the distribution of y_psfFlux.", + "name": "y_psfFluxSigma", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Chi^2 statistic for the scatter of y_psfFlux around y_psfFluxMean.", + "name": "y_psfFluxChi2", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "The number of data points used to compute y_psfFluxChi2.", + "name": "y_psfFluxNdata", + "type": [ + "null", + "int" + ] + }, + { + "default": null, + "doc": "Weighted mean forced photometry flux for y filter.", + "name": "y_fpFluxMean", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Standard error of y_fpFluxMean.", + "name": "y_fpFluxMeanErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Standard deviation of the distribution of y_fpFlux.", + "name": "y_fpFluxSigma", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Id of the closest nearby object.", + "name": "nearbyObj1", + "type": [ + "null", + "long" + ] + }, + { + "default": null, + "doc": "Distance to nearbyObj1.", + "name": "nearbyObj1Dist", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Natural log of the probability that the observed diaObject is the same as the nearbyObj1.", + "name": "nearbyObj1LnP", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Id of the second-closest nearby object.", + "name": "nearbyObj2", + "type": [ + "null", + "long" + ] + }, + { + "default": null, + "doc": "Distance to nearbyObj2.", + "name": "nearbyObj2Dist", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Natural log of the probability that the observed diaObject is the same as the nearbyObj2.", + "name": "nearbyObj2LnP", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Id of the third-closest nearby object.", + "name": "nearbyObj3", + "type": [ + "null", + "long" + ] + }, + { + "default": null, + "doc": "Distance to nearbyObj3.", + "name": "nearbyObj3Dist", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Natural log of the probability that the observed diaObject is the same as the nearbyObj3.", + "name": "nearbyObj3LnP", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Mean of the u band flux errors.", + "name": "u_psfFluxErrMean", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Mean of the g band flux errors.", + "name": "g_psfFluxErrMean", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Mean of the r band flux errors.", + "name": "r_psfFluxErrMean", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Mean of the i band flux errors.", + "name": "i_psfFluxErrMean", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Mean of the z band flux errors.", + "name": "z_psfFluxErrMean", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Mean of the y band flux errors.", + "name": "y_psfFluxErrMean", + "type": [ + "null", + "float" + ] + } + ] +} \ No newline at end of file diff --git a/python/lsst/alert/packet/schema/7/0/lsst.v7_0.diaSource.avsc b/python/lsst/alert/packet/schema/7/0/lsst.v7_0.diaSource.avsc new file mode 100644 index 0000000..d908c14 --- /dev/null +++ b/python/lsst/alert/packet/schema/7/0/lsst.v7_0.diaSource.avsc @@ -0,0 +1,1199 @@ +{ + "type": "record", + "namespace": "lsst.v7_0", + "name": "diaSource", + "fields": [ + { + "doc": "Unique identifier of this DiaSource.", + "name": "diaSourceId", + "type": "long" + }, + { + "doc": "Id of the visit where this diaSource was measured.", + "name": "visit", + "type": "long" + }, + { + "doc": "Id of the detector where this diaSource was measured.", + "name": "detector", + "type": "int" + }, + { + "default": null, + "doc": "Id of the diaObject this source was associated with, if any. If not, it is set to NULL (each diaSource will be associated with either a diaObject or ssObject).", + "name": "diaObjectId", + "type": [ + "null", + "long" + ] + }, + { + "default": null, + "doc": "Id of the ssObject this source was associated with, if any. If not, it is set to NULL (each diaSource will be associated with either a diaObject or ssObject).", + "name": "ssObjectId", + "type": [ + "null", + "long" + ] + }, + { + "default": null, + "doc": "Id of the parent diaSource this diaSource has been deblended from, if any.", + "name": "parentDiaSourceId", + "type": [ + "null", + "long" + ] + }, + { + "doc": "Effective mid-visit time for this diaSource, expressed as Modified Julian Date, International Atomic Time.", + "name": "midpointMjdTai", + "type": "double" + }, + { + "doc": "Right ascension coordinate of the center of this diaSource.", + "name": "ra", + "type": "double" + }, + { + "default": null, + "doc": "Uncertainty of ra.", + "name": "raErr", + "type": [ + "null", + "float" + ] + }, + { + "doc": "Declination coordinate of the center of this diaSource.", + "name": "dec", + "type": "double" + }, + { + "default": null, + "doc": "Uncertainty of dec.", + "name": "decErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance between ra and dec.", + "name": "ra_dec_Cov", + "type": [ + "null", + "float" + ] + }, + { + "doc": "x position computed by a centroiding algorithm.", + "name": "x", + "type": "float" + }, + { + "default": null, + "doc": "Uncertainty of x.", + "name": "xErr", + "type": [ + "null", + "float" + ] + }, + { + "doc": "y position computed by a centroiding algorithm.", + "name": "y", + "type": "float" + }, + { + "default": null, + "doc": "Uncertainty of y.", + "name": "yErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance between x and y.", + "name": "x_y_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "General centroid algorithm failure flag; set if anything went wrong when fitting the centroid. Another centroid flag field should also be set to provide more information.", + "name": "centroid_flag", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "Flux in a 12 pixel radius aperture on the difference image.", + "name": "apFlux", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Estimated uncertainty of apFlux.", + "name": "apFluxErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "General aperture flux algorithm failure flag; set if anything went wrong when measuring aperture fluxes. Another apFlux flag field should also be set to provide more information.", + "name": "apFlux_flag", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "Aperture did not fit within measurement image.", + "name": "apFlux_flag_apertureTruncated", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "The signal-to-noise ratio at which this source was detected in the difference image.", + "name": "snr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Flux for Point Source model. Note this actually measures the flux difference between the template and the visit image.", + "name": "psfFlux", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of psfFlux.", + "name": "psfFluxErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Right ascension coordinate of centroid for point source model.", + "name": "psfRa", + "type": [ + "null", + "double" + ] + }, + { + "default": null, + "doc": "Uncertainty of psfRa.", + "name": "psfRaErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Declination coordinate of centroid for point source model.", + "name": "psfDec", + "type": [ + "null", + "double" + ] + }, + { + "default": null, + "doc": "Uncertainty of psfDec.", + "name": "psfDecErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance between psfFlux and psfRa.", + "name": "psfFlux_psfRa_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance between psfFlux and psfDec.", + "name": "psfFlux_psfDec_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance between psfRa and psfDec.", + "name": "psfRa_psfDec_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Natural log likelihood of the observed data given the point source model.", + "name": "psfLnL", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Chi^2 statistic of the point source model fit.", + "name": "psfChi2", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "The number of data points (pixels) used to fit the point source model.", + "name": "psfNdata", + "type": [ + "null", + "int" + ] + }, + { + "default": null, + "doc": "Failure to derive linear least-squares fit of psf model. Another psfFlux flag field should also be set to provide more information.", + "name": "psfFlux_flag", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "Object was too close to the edge of the image to use the full PSF model.", + "name": "psfFlux_flag_edge", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "Not enough non-rejected pixels in data to attempt the fit.", + "name": "psfFlux_flag_noGoodPixels", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "Flux for a trailed source model. Note this actually measures the flux difference between the template and the visit image.", + "name": "trailFlux", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of trailFlux.", + "name": "trailFluxErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Right ascension coordinate of centroid for trailed source model.", + "name": "trailRa", + "type": [ + "null", + "double" + ] + }, + { + "default": null, + "doc": "Uncertainty of trailRa.", + "name": "trailRaErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Declination coordinate of centroid for trailed source model.", + "name": "trailDec", + "type": [ + "null", + "double" + ] + }, + { + "default": null, + "doc": "Uncertainty of trailDec.", + "name": "trailDecErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Maximum likelihood fit of trail length.", + "name": "trailLength", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of trailLength.", + "name": "trailLengthErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Maximum likelihood fit of the angle between the meridian through the centroid and the trail direction (bearing).", + "name": "trailAngle", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of trailAngle.", + "name": "trailAngleErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of trailFlux and trailRa.", + "name": "trailFlux_trailRa_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of trailFlux and trailDec.", + "name": "trailFlux_trailDec_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of trailFlux and trailLength", + "name": "trailFlux_trailLength_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of trailFlux and trailAngle", + "name": "trailFlux_trailAngle_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of trailRa and trailDec.", + "name": "trailRa_trailDec_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of trailRa and trailLength.", + "name": "trailRa_trailLength_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of trailRa and trailAngle.", + "name": "trailRa_trailAngle_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of trailDec and trailLength.", + "name": "trailDec_trailLength_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of trailDec and trailAngle.", + "name": "trailDec_trailAngle_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of trailLength and trailAngle", + "name": "trailLength_trailAngle_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Natural log likelihood of the observed data given the trailed source model.", + "name": "trailLnL", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Chi^2 statistic of the trailed source model fit.", + "name": "trailChi2", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "The number of data points (pixels) used to fit the trailed source model.", + "name": "trailNdata", + "type": [ + "null", + "int" + ] + }, + { + "default": null, + "doc": "This flag is set if a trailed source extends onto or past edge pixels.", + "name": "trail_flag_edge", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "Maximum likelihood value for the mean absolute flux of the two lobes for a dipole model.", + "name": "dipoleMeanFlux", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of dipoleMeanFlux.", + "name": "dipoleMeanFluxErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Maximum likelihood value for the difference of absolute fluxes of the two lobes for a dipole model.", + "name": "dipoleFluxDiff", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of dipoleFluxDiff.", + "name": "dipoleFluxDiffErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Right ascension coordinate of centroid for dipole model.", + "name": "dipoleRa", + "type": [ + "null", + "double" + ] + }, + { + "default": null, + "doc": "Uncertainty of dipoleRa.", + "name": "dipoleRaErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Declination coordinate of centroid for dipole model.", + "name": "dipoleDec", + "type": [ + "null", + "double" + ] + }, + { + "default": null, + "doc": "Uncertainty of dipoleDec.", + "name": "dipoleDecErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Maximum likelihood value for the lobe separation in dipole model.", + "name": "dipoleLength", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of dipoleLength.", + "name": "dipoleLengthErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Maximum likelihood fit of the angle between the meridian through the centroid and the dipole direction (bearing, from negative to positive lobe).", + "name": "dipoleAngle", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of dipoleAngle.", + "name": "dipoleAngleErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of dipoleMeanFlux and dipoleFluxDiff.", + "name": "dipoleMeanFlux_dipoleFluxDiff_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of dipoleMeanFlux and dipoleRa.", + "name": "dipoleMeanFlux_dipoleRa_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of dipoleMeanFlux and dipoleDec.", + "name": "dipoleMeanFlux_dipoleDec_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of dipoleMeanFlux and dipoleLength.", + "name": "dipoleMeanFlux_dipoleLength_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of dipoleMeanFlux and dipoleAngle.", + "name": "dipoleMeanFlux_dipoleAngle_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of dipoleFluxDiff and dipoleRa.", + "name": "dipoleFluxDiff_dipoleRa_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of dipoleFluxDiff and dipoleDec.", + "name": "dipoleFluxDiff_dipoleDec_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of dipoleFluxDiff and dipoleLength.", + "name": "dipoleFluxDiff_dipoleLength_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of dipoleFluxDiff and dipoleAngle.", + "name": "dipoleFluxDiff_dipoleAngle_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of dipoleRa and dipoleDec.", + "name": "dipoleRa_dipoleDec_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of dipoleRa and dipoleLength.", + "name": "dipoleRa_dipoleLength_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of dipoleRa and dipoleAngle.", + "name": "dipoleRa_dipoleAngle_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of dipoleDec and dipoleLength.", + "name": "dipoleDec_dipoleLength_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of dipoleDec and dipoleAngle.", + "name": "dipoleDec_dipoleAngle_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of dipoleLength and dipoleAngle.", + "name": "dipoleLength_dipoleAngle_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Natural log likelihood of the observed data given the dipole source model.", + "name": "dipoleLnL", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Chi^2 statistic of the model fit.", + "name": "dipoleChi2", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "The number of data points (pixels) used to fit the model.", + "name": "dipoleNdata", + "type": [ + "null", + "int" + ] + }, + { + "default": null, + "doc": "Forced PSF photometry on science image failed. Another forced_PsfFlux flag field should also be set to provide more information.", + "name": "forced_PsfFlux_flag", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "Forced PSF flux on science image was too close to the edge of the image to use the full PSF model.", + "name": "forced_PsfFlux_flag_edge", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "Forced PSF flux not enough non-rejected pixels in data to attempt the fit.", + "name": "forced_PsfFlux_flag_noGoodPixels", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "Calibrated flux for Point Source model centered on radec but measured on the difference of snaps comprising this visit.", + "name": "snapDiffFlux", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Estimated uncertainty of snapDiffFlux.", + "name": "snapDiffFluxErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Estimated sky background at the position (centroid) of the object.", + "name": "fpBkgd", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Estimated uncertainty of fpBkgd.", + "name": "fpBkgdErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Adaptive second moment of the source intensity.", + "name": "ixx", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of ixx.", + "name": "ixxErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Adaptive second moment of the source intensity.", + "name": "iyy", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of iyy.", + "name": "iyyErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Adaptive second moment of the source intensity.", + "name": "ixy", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of ixy.", + "name": "ixyErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of ixx and iyy.", + "name": "ixx_iyy_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of ixx and ixy.", + "name": "ixx_ixy_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Covariance of iyy and ixy.", + "name": "iyy_ixy_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Adaptive second moment for the PSF.", + "name": "ixxPSF", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Adaptive second moment for the PSF.", + "name": "iyyPSF", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Adaptive second moment for the PSF.", + "name": "ixyPSF", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "General source shape algorithm failure flag; set if anything went wrong when measuring the shape. Another shape flag field should also be set to provide more information.", + "name": "shape_flag", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "No pixels to measure shape.", + "name": "shape_flag_no_pixels", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "Center not contained in footprint bounding box.", + "name": "shape_flag_not_contained", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "This source is a parent source; we should only be measuring on deblended children in difference imaging.", + "name": "shape_flag_parent_source", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "A measure of extendedness, Computed using a combination of available moments and model fluxes or from a likelihood ratio of point/trailed source models (exact algorithm TBD). extendedness = 1 implies a high degree of confidence that the source is extended. extendedness = 0 implies a high degree of confidence that the source is point-like.", + "name": "extendedness", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "A measure of reliability, computed using information from the source and image characterization, as well as the information on the Telescope and Camera system (e.g., ghost maps, defect maps, etc.).", + "name": "reliability", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Filter band this source was observed with.", + "name": "band", + "type": [ + "null", + "string" + ] + }, + { + "default": null, + "doc": "General pixel flags failure; set if anything went wrong when setting pixels flags from this footprint's mask. This implies that some pixelFlags for this source may be incorrectly set to False.", + "name": "pixelFlags", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "Bad pixel in the DiaSource footprint.", + "name": "pixelFlags_bad", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "Cosmic ray in the DiaSource footprint.", + "name": "pixelFlags_cr", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "Cosmic ray in the 3x3 region around the centroid.", + "name": "pixelFlags_crCenter", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "Some of the source footprint is outside usable exposure region (masked EDGE or NO_DATA, or centroid off image).", + "name": "pixelFlags_edge", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "Interpolated pixel in the DiaSource footprint.", + "name": "pixelFlags_interpolated", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "Interpolated pixel in the 3x3 region around the centroid.", + "name": "pixelFlags_interpolatedCenter", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "DiaSource center is off image.", + "name": "pixelFlags_offimage", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "Saturated pixel in the DiaSource footprint.", + "name": "pixelFlags_saturated", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "Saturated pixel in the 3x3 region around the centroid.", + "name": "pixelFlags_saturatedCenter", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "DiaSource's footprint includes suspect pixels.", + "name": "pixelFlags_suspect", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "Suspect pixel in the 3x3 region around the centroid.", + "name": "pixelFlags_suspectCenter", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "Streak in the DiaSource footprint.", + "name": "pixelFlags_streak", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "Streak in the 3x3 region around the centroid.", + "name": "pixelFlags_streakCenter", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "Injection in the DiaSource footprint.", + "name": "pixelFlags_injected", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "Injection in the 3x3 region around the centroid.", + "name": "pixelFlags_injectedCenter", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "Template injection in the DiaSource footprint.", + "name": "pixelFlags_injected_template", + "type": [ + "null", + "boolean" + ] + }, + { + "default": null, + "doc": "Template injection in the 3x3 region around the centroid.", + "name": "pixelFlags_injected_templateCenter", + "type": [ + "null", + "boolean" + ] + } + ] +} diff --git a/python/lsst/alert/packet/schema/7/0/lsst.v7_0.ssObject.avsc b/python/lsst/alert/packet/schema/7/0/lsst.v7_0.ssObject.avsc new file mode 100644 index 0000000..d037e1d --- /dev/null +++ b/python/lsst/alert/packet/schema/7/0/lsst.v7_0.ssObject.avsc @@ -0,0 +1,471 @@ +{ + "type": "record", + "namespace": "lsst.v7_0", + "name": "ssObject", + "fields": [ + { + "doc": "Unique identifier.", + "name": "ssObjectId", + "type": "long" + }, + { + "default": null, + "doc": "The date the LSST first linked and submitted the discovery observations to the MPC. May be NULL if not an LSST discovery. The date format will follow general LSST conventions (MJD TAI, at the moment).", + "name": "discoverySubmissionDate", + "type": [ + "null", + "double" + ] + }, + { + "default": null, + "doc": "The time of the first LSST observation of this object (could be precovered) as Modified Julian Date, International Atomic Time.", + "name": "firstObservationDate", + "type": [ + "null", + "double" + ] + }, + { + "default": null, + "doc": "Arc of LSST observations.", + "name": "arc", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Number of LSST observations of this object.", + "name": "numObs", + "type": [ + "null", + "int" + ] + }, + { + "default": null, + "doc": "Minimum orbit intersection distance to Earth.", + "name": "MOID", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "True anomaly of the MOID point.", + "name": "MOIDTrueAnomaly", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Ecliptic longitude of the MOID point.", + "name": "MOIDEclipticLongitude", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "DeltaV at the MOID point.", + "name": "MOIDDeltaV", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Best fit absolute magnitude (u band).", + "name": "u_H", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Best fit G12 slope parameter (u band).", + "name": "u_G12", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of H (u band).", + "name": "u_HErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of G12 (u band).", + "name": "u_G12Err", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "H-G12 covariance (u band).", + "name": "u_H_u_G12_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Chi^2 statistic of the phase curve fit (u band).", + "name": "u_Chi2", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "The number of data points used to fit the phase curve (u band).", + "name": "u_Ndata", + "type": [ + "null", + "int" + ] + }, + { + "default": null, + "doc": "Best fit absolute magnitude (g band).", + "name": "g_H", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Best fit G12 slope parameter (g band).", + "name": "g_G12", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of H (g band).", + "name": "g_HErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of G12 (g band).", + "name": "g_G12Err", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "H-G12 covariance (g band).", + "name": "g_H_g_G12_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Chi^2 statistic of the phase curve fit (g band).", + "name": "g_Chi2", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "The number of data points used to fit the phase curve (g band).", + "name": "g_Ndata", + "type": [ + "null", + "int" + ] + }, + { + "default": null, + "doc": "Best fit absolute magnitude (r band).", + "name": "r_H", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Best fit G12 slope parameter (r band).", + "name": "r_G12", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of H (r band).", + "name": "r_HErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of G12 (r band).", + "name": "r_G12Err", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "H-G12 covariance (r band).", + "name": "r_H_r_G12_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Chi^2 statistic of the phase curve fit (r band).", + "name": "r_Chi2", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "The number of data points used to fit the phase curve (r band).", + "name": "r_Ndata", + "type": [ + "null", + "int" + ] + }, + { + "default": null, + "doc": "Best fit absolute magnitude (i band).", + "name": "i_H", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Best fit G12 slope parameter (i band).", + "name": "i_G12", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of H (i band).", + "name": "i_HErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of G12 (i band).", + "name": "i_G12Err", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "H-G12 covariance (i band).", + "name": "i_H_i_G12_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Chi^2 statistic of the phase curve fit (i band).", + "name": "i_Chi2", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "The number of data points used to fit the phase curve (i band).", + "name": "i_Ndata", + "type": [ + "null", + "int" + ] + }, + { + "default": null, + "doc": "Best fit absolute magnitude (z band).", + "name": "z_H", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Best fit G12 slope parameter (z band).", + "name": "z_G12", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of H (z band).", + "name": "z_HErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of G12 (z band).", + "name": "z_G12Err", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "H-G12 covariance (z band).", + "name": "z_H_z_G12_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Chi^2 statistic of the phase curve fit (z band).", + "name": "z_Chi2", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "The number of data points used to fit the phase curve (z band).", + "name": "z_Ndata", + "type": [ + "null", + "int" + ] + }, + { + "default": null, + "doc": "Best fit absolute magnitude (y band).", + "name": "y_H", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Best fit G12 slope parameter (y band).", + "name": "y_G12", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of H (y band).", + "name": "y_HErr", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Uncertainty of G12 (y band).", + "name": "y_G12Err", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "H-G12 covariance (y band).", + "name": "y_H_y_G12_Cov", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "Chi^2 statistic of the phase curve fit (y band).", + "name": "y_Chi2", + "type": [ + "null", + "float" + ] + }, + { + "default": null, + "doc": "The number of data points used to fit the phase curve (y band).", + "name": "y_Ndata", + "type": [ + "null", + "int" + ] + }, + { + "default": null, + "doc": "median `extendedness` value from the DIASource.", + "name": "medianExtendedness", + "type": [ + "null", + "float" + ] + } + ] +} \ No newline at end of file diff --git a/python/lsst/alert/packet/schema/7/0/sample_data/alert.json b/python/lsst/alert/packet/schema/7/0/sample_data/alert.json new file mode 100644 index 0000000..1a1f952 --- /dev/null +++ b/python/lsst/alert/packet/schema/7/0/sample_data/alert.json @@ -0,0 +1,109 @@ +{ + "alertId": 1231321321, + "l1dbId": 222222222, + "diaSource": + { + "diaSourceId": 281323062375219200, + "time_processed": 0, + "visit": 1, + "detector": 42, + "midpointMjdTai": 1480360995, + "band": "r", + "programId": 1, + "ra": 351.570546978, + "dec": 0.126243049656, + "raErr": 0.00028, + "decErr": 0.00028, + "ra_dec_Cov": 0.00029, + "x": 112.1, + "y": 121.1, + "xErr": 1.2, + "yErr": 1.1, + "x_y_Cov": 1.2, + "apFlux": 1241.0, + "apFluxErr": 12.0, + "snr": 41.1, + "trailNdata": 5, + "psfFlux": 1241.0, + "psfFluxErr": 12.0 + }, + "prvDiaSources": [ + { + "diaSourceId": 281323062375219198, + "time_processed": 0, + "visit": 2, + "detector": 43, + "midpointMjdTai": 1480360995, + "band": "r", + "programId": 1, + "ra": 351.570546978, + "dec": 0.126243049656, + "raErr": 0.00028, + "decErr": 0.00028, + "ra_dec_Cov": 0.00029, + "x": 112.1, + "y": 121.1, + "xErr": 1.2, + "yErr": 1.1, + "x_y_Cov": 1.2, + "apFlux": 1241.0, + "apFluxErr": 12.0, + "snr": 41.1, + "trailNdata": 5, + "psfFlux": 1241.0, + "psfFluxErr": 12.0 + }, + { + "diaSourceId": 281323062375219199, + "time_processed": 0, + "visit": 1, + "detector": 42, + "midpointMjdTai": 1480360995, + "band": "r", + "programId": 1, + "ra": 351.570546978, + "dec": 0.126243049656, + "raErr": 0.00028, + "decErr": 0.00028, + "ra_dec_Cov": 0.00029, + "x": 112.1, + "y": 121.1, + "xErr": 1.2, + "yErr": 1.1, + "x_y_Cov": 1.2, + "apFlux": 1241.0, + "apFluxErr": 12.0, + "snr": 41.1, + "trailNdata": 5, + "psfFlux": 1241.0, + "psfFluxErr": 12.0 + } + ], + "diaObject": { + "diaObjectId": 281323062375219201, + "validityStart": 0, + "ra": 351.570546978, + "dec": 0.126243049656, + "raErr": 0.00028, + "decErr": 0.00028, + "ra_dec_Cov": 0.00029, + "radecMjdTai": 1480360995, + "pmRa": 0.00013, + "pmDec": 0.00014, + "parallax": 2.124124, + "pmRaErr": 0.00013, + "pmDecErr": 0.00013, + "pmParallaxNdata": 0, + "parallaxErr": 0.00013, + "pmRa_pmDec_Cov": 0.00013, + "pmRa_parallax_Cov": 0.00013, + "pmDec_parallax_Cov": 0.00013, + "pmParallaxLnL": 0.00013, + "pmParallaxChi2": 0.00013, + "pmParallaxNdata": 1214 + }, + "ssObject": { + "ssObjectId":5364546, + "numObs": 10 + } +} diff --git a/python/lsst/alert/packet/schema/7/0/sample_data/fakeAlert.avro b/python/lsst/alert/packet/schema/7/0/sample_data/fakeAlert.avro new file mode 100644 index 0000000..a222717 --- /dev/null +++ b/python/lsst/alert/packet/schema/7/0/sample_data/fakeAlert.avro @@ -0,0 +1,4 @@ +Objavro.codecnullavro.schemaÎÓ{"type": "record", "doc": "Rubin Avro alert schema v7.0", "name": "lsst.v7_0.alert", "fields": [{"doc": "unique alert identifer", "name": "alertId", "type": "long"}, {"name": "diaSource", "type": {"type": "record", "name": "lsst.v7_0.diaSource", "fields": [{"doc": "Unique identifier of this DiaSource.", "name": "diaSourceId", "type": "long"}, {"doc": "Id of the visit where this diaSource was measured.", "name": "visit", "type": "long"}, {"doc": "Id of the detector where this diaSource was measured.", "name": "detector", "type": "int"}, {"default": null, "doc": "Id of the diaObject this source was associated with, if any. If not, it is set to NULL (each diaSource will be associated with either a diaObject or ssObject).", "name": "diaObjectId", "type": ["null", "long"]}, {"default": null, "doc": "Id of the ssObject this source was associated with, if any. If not, it is set to NULL (each diaSource will be associated with either a diaObject or ssObject).", "name": "ssObjectId", "type": ["null", "long"]}, {"default": null, "doc": "Id of the parent diaSource this diaSource has been deblended from, if any.", "name": "parentDiaSourceId", "type": ["null", "long"]}, {"doc": "Effective mid-visit time for this diaSource, expressed as Modified Julian Date, International Atomic Time.", "name": "midpointMjdTai", "type": "double"}, {"doc": "Right ascension coordinate of the center of this diaSource.", "name": "ra", "type": "double"}, {"default": null, "doc": "Uncertainty of ra.", "name": "raErr", "type": ["null", "float"]}, {"doc": "Declination coordinate of the center of this diaSource.", "name": "dec", "type": "double"}, {"default": null, "doc": "Uncertainty of dec.", "name": "decErr", "type": ["null", "float"]}, {"default": null, "doc": "Covariance between ra and dec.", "name": "ra_dec_Cov", "type": ["null", "float"]}, {"doc": "x position computed by a centroiding algorithm.", "name": "x", "type": "float"}, {"default": null, "doc": "Uncertainty of x.", "name": "xErr", "type": ["null", "float"]}, {"doc": "y position computed by a centroiding algorithm.", "name": "y", "type": "float"}, {"default": null, "doc": "Uncertainty of y.", "name": "yErr", "type": ["null", "float"]}, {"default": null, "doc": "Covariance between x and y.", "name": "x_y_Cov", "type": ["null", "float"]}, {"default": null, "doc": "General centroid algorithm failure flag; set if anything went wrong when fitting the centroid. Another centroid flag field should also be set to provide more information.", "name": "centroid_flag", "type": ["null", "boolean"]}, {"default": null, "doc": "Flux in a 12 pixel radius aperture on the difference image.", "name": "apFlux", "type": ["null", "float"]}, {"default": null, "doc": "Estimated uncertainty of apFlux.", "name": "apFluxErr", "type": ["null", "float"]}, {"default": null, "doc": "General aperture flux algorithm failure flag; set if anything went wrong when measuring aperture fluxes. Another apFlux flag field should also be set to provide more information.", "name": "apFlux_flag", "type": ["null", "boolean"]}, {"default": null, "doc": "Aperture did not fit within measurement image.", "name": "apFlux_flag_apertureTruncated", "type": ["null", "boolean"]}, {"default": null, "doc": "The signal-to-noise ratio at which this source was detected in the difference image.", "name": "snr", "type": ["null", "float"]}, {"default": null, "doc": "Flux for Point Source model. Note this actually measures the flux difference between the template and the visit image.", "name": "psfFlux", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of psfFlux.", "name": "psfFluxErr", "type": ["null", "float"]}, {"default": null, "doc": "Right ascension coordinate of centroid for point source model.", "name": "psfRa", "type": ["null", "double"]}, {"default": null, "doc": "Uncertainty of psfRa.", "name": "psfRaErr", "type": ["null", "float"]}, {"default": null, "doc": "Declination coordinate of centroid for point source model.", "name": "psfDec", "type": ["null", "double"]}, {"default": null, "doc": "Uncertainty of psfDec.", "name": "psfDecErr", "type": ["null", "float"]}, {"default": null, "doc": "Covariance between psfFlux and psfRa.", "name": "psfFlux_psfRa_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance between psfFlux and psfDec.", "name": "psfFlux_psfDec_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance between psfRa and psfDec.", "name": "psfRa_psfDec_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Natural log likelihood of the observed data given the point source model.", "name": "psfLnL", "type": ["null", "float"]}, {"default": null, "doc": "Chi^2 statistic of the point source model fit.", "name": "psfChi2", "type": ["null", "float"]}, {"default": null, "doc": "The number of data points (pixels) used to fit the point source model.", "name": "psfNdata", "type": ["null", "int"]}, {"default": null, "doc": "Failure to derive linear least-squares fit of psf model. Another psfFlux flag field should also be set to provide more information.", "name": "psfFlux_flag", "type": ["null", "boolean"]}, {"default": null, "doc": "Object was too close to the edge of the image to use the full PSF model.", "name": "psfFlux_flag_edge", "type": ["null", "boolean"]}, {"default": null, "doc": "Not enough non-rejected pixels in data to attempt the fit.", "name": "psfFlux_flag_noGoodPixels", "type": ["null", "boolean"]}, {"default": null, "doc": "Flux for a trailed source model. Note this actually measures the flux difference between the template and the visit image.", "name": "trailFlux", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of trailFlux.", "name": "trailFluxErr", "type": ["null", "float"]}, {"default": null, "doc": "Right ascension coordinate of centroid for trailed source model.", "name": "trailRa", "type": ["null", "double"]}, {"default": null, "doc": "Uncertainty of trailRa.", "name": "trailRaErr", "type": ["null", "float"]}, {"default": null, "doc": "Declination coordinate of centroid for trailed source model.", "name": "trailDec", "type": ["null", "double"]}, {"default": null, "doc": "Uncertainty of trailDec.", "name": "trailDecErr", "type": ["null", "float"]}, {"default": null, "doc": "Maximum likelihood fit of trail length.", "name": "trailLength", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of trailLength.", "name": "trailLengthErr", "type": ["null", "float"]}, {"default": null, "doc": "Maximum likelihood fit of the angle between the meridian through the centroid and the trail direction (bearing).", "name": "trailAngle", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of trailAngle.", "name": "trailAngleErr", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of trailFlux and trailRa.", "name": "trailFlux_trailRa_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of trailFlux and trailDec.", "name": "trailFlux_trailDec_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of trailFlux and trailLength", "name": "trailFlux_trailLength_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of trailFlux and trailAngle", "name": "trailFlux_trailAngle_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of trailRa and trailDec.", "name": "trailRa_trailDec_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of trailRa and trailLength.", "name": "trailRa_trailLength_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of trailRa and trailAngle.", "name": "trailRa_trailAngle_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of trailDec and trailLength.", "name": "trailDec_trailLength_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of trailDec and trailAngle.", "name": "trailDec_trailAngle_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of trailLength and trailAngle", "name": "trailLength_trailAngle_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Natural log likelihood of the observed data given the trailed source model.", "name": "trailLnL", "type": ["null", "float"]}, {"default": null, "doc": "Chi^2 statistic of the trailed source model fit.", "name": "trailChi2", "type": ["null", "float"]}, {"default": null, "doc": "The number of data points (pixels) used to fit the trailed source model.", "name": "trailNdata", "type": ["null", "int"]}, {"default": null, "doc": "This flag is set if a trailed source extends onto or past edge pixels.", "name": "trail_flag_edge", "type": ["null", "boolean"]}, {"default": null, "doc": "Maximum likelihood value for the mean absolute flux of the two lobes for a dipole model.", "name": "dipoleMeanFlux", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of dipoleMeanFlux.", "name": "dipoleMeanFluxErr", "type": ["null", "float"]}, {"default": null, "doc": "Maximum likelihood value for the difference of absolute fluxes of the two lobes for a dipole model.", "name": "dipoleFluxDiff", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of dipoleFluxDiff.", "name": "dipoleFluxDiffErr", "type": ["null", "float"]}, {"default": null, "doc": "Right ascension coordinate of centroid for dipole model.", "name": "dipoleRa", "type": ["null", "double"]}, {"default": null, "doc": "Uncertainty of dipoleRa.", "name": "dipoleRaErr", "type": ["null", "float"]}, {"default": null, "doc": "Declination coordinate of centroid for dipole model.", "name": "dipoleDec", "type": ["null", "double"]}, {"default": null, "doc": "Uncertainty of dipoleDec.", "name": "dipoleDecErr", "type": ["null", "float"]}, {"default": null, "doc": "Maximum likelihood value for the lobe separation in dipole model.", "name": "dipoleLength", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of dipoleLength.", "name": "dipoleLengthErr", "type": ["null", "float"]}, {"default": null, "doc": "Maximum likelihood fit of the angle between the meridian through the centroid and the dipole direction (bearing, from negative to positive lobe).", "name": "dipoleAngle", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of dipoleAngle.", "name": "dipoleAngleErr", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of dipoleMeanFlux and dipoleFluxDiff.", "name": "dipoleMeanFlux_dipoleFluxDiff_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of dipoleMeanFlux and dipoleRa.", "name": "dipoleMeanFlux_dipoleRa_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of dipoleMeanFlux and dipoleDec.", "name": "dipoleMeanFlux_dipoleDec_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of dipoleMeanFlux and dipoleLength.", "name": "dipoleMeanFlux_dipoleLength_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of dipoleMeanFlux and dipoleAngle.", "name": "dipoleMeanFlux_dipoleAngle_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of dipoleFluxDiff and dipoleRa.", "name": "dipoleFluxDiff_dipoleRa_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of dipoleFluxDiff and dipoleDec.", "name": "dipoleFluxDiff_dipoleDec_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of dipoleFluxDiff and dipoleLength.", "name": "dipoleFluxDiff_dipoleLength_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of dipoleFluxDiff and dipoleAngle.", "name": "dipoleFluxDiff_dipoleAngle_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of dipoleRa and dipoleDec.", "name": "dipoleRa_dipoleDec_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of dipoleRa and dipoleLength.", "name": "dipoleRa_dipoleLength_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of dipoleRa and dipoleAngle.", "name": "dipoleRa_dipoleAngle_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of dipoleDec and dipoleLength.", "name": "dipoleDec_dipoleLength_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of dipoleDec and dipoleAngle.", "name": "dipoleDec_dipoleAngle_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of dipoleLength and dipoleAngle.", "name": "dipoleLength_dipoleAngle_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Natural log likelihood of the observed data given the dipole source model.", "name": "dipoleLnL", "type": ["null", "float"]}, {"default": null, "doc": "Chi^2 statistic of the model fit.", "name": "dipoleChi2", "type": ["null", "float"]}, {"default": null, "doc": "The number of data points (pixels) used to fit the model.", "name": "dipoleNdata", "type": ["null", "int"]}, {"default": null, "doc": "Forced PSF photometry on science image failed. Another forced_PsfFlux flag field should also be set to provide more information.", "name": "forced_PsfFlux_flag", "type": ["null", "boolean"]}, {"default": null, "doc": "Forced PSF flux on science image was too close to the edge of the image to use the full PSF model.", "name": "forced_PsfFlux_flag_edge", "type": ["null", "boolean"]}, {"default": null, "doc": "Forced PSF flux not enough non-rejected pixels in data to attempt the fit.", "name": "forced_PsfFlux_flag_noGoodPixels", "type": ["null", "boolean"]}, {"default": null, "doc": "Calibrated flux for Point Source model centered on radec but measured on the difference of snaps comprising this visit.", "name": "snapDiffFlux", "type": ["null", "float"]}, {"default": null, "doc": "Estimated uncertainty of snapDiffFlux.", "name": "snapDiffFluxErr", "type": ["null", "float"]}, {"default": null, "doc": "Estimated sky background at the position (centroid) of the object.", "name": "fpBkgd", "type": ["null", "float"]}, {"default": null, "doc": "Estimated uncertainty of fpBkgd.", "name": "fpBkgdErr", "type": ["null", "float"]}, {"default": null, "doc": "Adaptive second moment of the source intensity.", "name": "ixx", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of ixx.", "name": "ixxErr", "type": ["null", "float"]}, {"default": null, "doc": "Adaptive second moment of the source intensity.", "name": "iyy", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of iyy.", "name": "iyyErr", "type": ["null", "float"]}, {"default": null, "doc": "Adaptive second moment of the source intensity.", "name": "ixy", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of ixy.", "name": "ixyErr", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of ixx and iyy.", "name": "ixx_iyy_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of ixx and ixy.", "name": "ixx_ixy_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of iyy and ixy.", "name": "iyy_ixy_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Adaptive second moment for the PSF.", "name": "ixxPSF", "type": ["null", "float"]}, {"default": null, "doc": "Adaptive second moment for the PSF.", "name": "iyyPSF", "type": ["null", "float"]}, {"default": null, "doc": "Adaptive second moment for the PSF.", "name": "ixyPSF", "type": ["null", "float"]}, {"default": null, "doc": "General source shape algorithm failure flag; set if anything went wrong when measuring the shape. Another shape flag field should also be set to provide more information.", "name": "shape_flag", "type": ["null", "boolean"]}, {"default": null, "doc": "No pixels to measure shape.", "name": "shape_flag_no_pixels", "type": ["null", "boolean"]}, {"default": null, "doc": "Center not contained in footprint bounding box.", "name": "shape_flag_not_contained", "type": ["null", "boolean"]}, {"default": null, "doc": "This source is a parent source; we should only be measuring on deblended children in difference imaging.", "name": "shape_flag_parent_source", "type": ["null", "boolean"]}, {"default": null, "doc": "A measure of extendedness, Computed using a combination of available moments and model fluxes or from a likelihood ratio of point/trailed source models (exact algorithm TBD). extendedness = 1 implies a high degree of confidence that the source is extended. extendedness = 0 implies a high degree of confidence that the source is point-like.", "name": "extendedness", "type": ["null", "float"]}, {"default": null, "doc": "A measure of reliability, computed using information from the source and image characterization, as well as the information on the Telescope and Camera system (e.g., ghost maps, defect maps, etc.).", "name": "reliability", "type": ["null", "float"]}, {"default": null, "doc": "Filter band this source was observed with.", "name": "band", "type": ["null", "string"]}, {"default": null, "doc": "General pixel flags failure; set if anything went wrong when setting pixels flags from this footprint's mask. This implies that some pixelFlags for this source may be incorrectly set to False.", "name": "pixelFlags", "type": ["null", "boolean"]}, {"default": null, "doc": "Bad pixel in the DiaSource footprint.", "name": "pixelFlags_bad", "type": ["null", "boolean"]}, {"default": null, "doc": "Cosmic ray in the DiaSource footprint.", "name": "pixelFlags_cr", "type": ["null", "boolean"]}, {"default": null, "doc": "Cosmic ray in the 3x3 region around the centroid.", "name": "pixelFlags_crCenter", "type": ["null", "boolean"]}, {"default": null, "doc": "Some of the source footprint is outside usable exposure region (masked EDGE or NO_DATA, or centroid off image).", "name": "pixelFlags_edge", "type": ["null", "boolean"]}, {"default": null, "doc": "Interpolated pixel in the DiaSource footprint.", "name": "pixelFlags_interpolated", "type": ["null", "boolean"]}, {"default": null, "doc": "Interpolated pixel in the 3x3 region around the centroid.", "name": "pixelFlags_interpolatedCenter", "type": ["null", "boolean"]}, {"default": null, "doc": "DiaSource center is off image.", "name": "pixelFlags_offimage", "type": ["null", "boolean"]}, {"default": null, "doc": "Saturated pixel in the DiaSource footprint.", "name": "pixelFlags_saturated", "type": ["null", "boolean"]}, {"default": null, "doc": "Saturated pixel in the 3x3 region around the centroid.", "name": "pixelFlags_saturatedCenter", "type": ["null", "boolean"]}, {"default": null, "doc": "DiaSource's footprint includes suspect pixels.", "name": "pixelFlags_suspect", "type": ["null", "boolean"]}, {"default": null, "doc": "Suspect pixel in the 3x3 region around the centroid.", "name": "pixelFlags_suspectCenter", "type": ["null", "boolean"]}, {"default": null, "doc": "Streak in the DiaSource footprint.", "name": "pixelFlags_streak", "type": ["null", "boolean"]}, {"default": null, "doc": "Streak in the 3x3 region around the centroid.", "name": "pixelFlags_streakCenter", "type": ["null", "boolean"]}, {"default": null, "doc": "Injection in the DiaSource footprint.", "name": "pixelFlags_injected", "type": ["null", "boolean"]}, {"default": null, "doc": "Injection in the 3x3 region around the centroid.", "name": "pixelFlags_injectedCenter", "type": ["null", "boolean"]}, {"default": null, "doc": "Template injection in the DiaSource footprint.", "name": "pixelFlags_injected_template", "type": ["null", "boolean"]}, {"default": null, "doc": "Template injection in the 3x3 region around the centroid.", "name": "pixelFlags_injected_templateCenter", "type": ["null", "boolean"]}]}}, {"default": null, "name": "prvDiaSources", "type": ["null", {"type": "array", "items": "lsst.v7_0.diaSource"}]}, {"default": null, "name": "prvDiaForcedSources", "type": ["null", {"type": "array", "items": {"type": "record", "name": "lsst.v7_0.diaForcedSource", "fields": [{"doc": "Unique id.", "name": "diaForcedSourceId", "type": "long"}, {"doc": "Id of the DiaObject that this DiaForcedSource was associated with.", "name": "diaObjectId", "type": "long"}, {"doc": "Id of the visit where this forcedSource was measured.", "name": "visit", "type": "long"}, {"doc": "Id of the detector where this forcedSource was measured.", "name": "detector", "type": "int"}, {"default": null, "doc": "Point Source model flux.", "name": "psfFlux", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of psfFlux.", "name": "psfFluxErr", "type": ["null", "float"]}, {"default": null, "doc": "x position at which psfFlux has been measured.", "name": "x", "type": ["null", "float"]}, {"default": null, "doc": "y position at which psfFlux has been measured.", "name": "y", "type": ["null", "float"]}, {"doc": "Effective mid-visit time for this diaForcedSource, expressed as Modified Julian Date, International Atomic Time.", "name": "midpointMjdTai", "type": "double"}, {"default": null, "doc": "Filter band this source was observed with.", "name": "band", "type": ["null", "string"]}]}}]}, {"default": null, "name": "prvDiaNondetectionLimits", "type": ["null", {"type": "array", "items": {"type": "record", "name": "lsst.v7_0.diaNondetectionLimit", "fields": [{"name": "ccdVisitId", "type": "long"}, {"name": "midpointMjdTai", "type": "double"}, {"name": "band", "type": "string"}, {"name": "diaNoise", "type": "float"}]}}]}, {"default": null, "name": "diaObject", "type": ["null", {"type": "record", "name": "lsst.v7_0.diaObject", "fields": [{"doc": "Unique identifier of this DiaObject.", "name": "diaObjectId", "type": "long"}, {"doc": "Right ascension coordinate of the position of the object at time radecMjdTai.", "name": "ra", "type": "double"}, {"default": null, "doc": "Uncertainty of ra.", "name": "raErr", "type": ["null", "float"]}, {"doc": "Declination coordinate of the position of the object at time radecMjdTai.", "name": "dec", "type": "double"}, {"default": null, "doc": "Uncertainty of dec.", "name": "decErr", "type": ["null", "float"]}, {"default": null, "doc": "Covariance between ra and dec.", "name": "ra_dec_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Time at which the object was at a position ra/dec, expressed as Modified Julian Date, International Atomic Time.", "name": "radecMjdTai", "type": ["null", "double"]}, {"default": null, "doc": "Proper motion in right ascension.", "name": "pmRa", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of pmRa.", "name": "pmRaErr", "type": ["null", "float"]}, {"default": null, "doc": "Proper motion of declination.", "name": "pmDec", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of pmDec.", "name": "pmDecErr", "type": ["null", "float"]}, {"default": null, "doc": "Parallax.", "name": "parallax", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of parallax.", "name": "parallaxErr", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of pmRa and pmDec.", "name": "pmRa_pmDec_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of pmRa and parallax.", "name": "pmRa_parallax_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Covariance of pmDec and parallax.", "name": "pmDec_parallax_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Natural log of the likelihood of the linear proper motion parallax fit.", "name": "pmParallaxLnL", "type": ["null", "float"]}, {"default": null, "doc": "Chi^2 static of the model fit.", "name": "pmParallaxChi2", "type": ["null", "float"]}, {"default": null, "doc": "The number of data points used to fit the model.", "name": "pmParallaxNdata", "type": ["null", "int"]}, {"default": null, "doc": "Weighted mean point-source model magnitude for u filter.", "name": "u_psfFluxMean", "type": ["null", "float"]}, {"default": null, "doc": "Standard error of u_psfFluxMean.", "name": "u_psfFluxMeanErr", "type": ["null", "float"]}, {"default": null, "doc": "Standard deviation of the distribution of u_psfFlux.", "name": "u_psfFluxSigma", "type": ["null", "float"]}, {"default": null, "doc": "Chi^2 statistic for the scatter of u_psfFlux around u_psfFluxMean.", "name": "u_psfFluxChi2", "type": ["null", "float"]}, {"default": null, "doc": "The number of data points used to compute u_psfFluxChi2.", "name": "u_psfFluxNdata", "type": ["null", "int"]}, {"default": null, "doc": "Weighted mean forced photometry flux for u filter.", "name": "u_fpFluxMean", "type": ["null", "float"]}, {"default": null, "doc": "Standard error of u_fpFluxMean.", "name": "u_fpFluxMeanErr", "type": ["null", "float"]}, {"default": null, "doc": "Standard deviation of the distribution of u_fpFlux.", "name": "u_fpFluxSigma", "type": ["null", "float"]}, {"default": null, "doc": "Weighted mean point-source model magnitude for g filter.", "name": "g_psfFluxMean", "type": ["null", "float"]}, {"default": null, "doc": "Standard error of g_psfFluxMean.", "name": "g_psfFluxMeanErr", "type": ["null", "float"]}, {"default": null, "doc": "Standard deviation of the distribution of g_psfFlux.", "name": "g_psfFluxSigma", "type": ["null", "float"]}, {"default": null, "doc": "Chi^2 statistic for the scatter of g_psfFlux around g_psfFluxMean.", "name": "g_psfFluxChi2", "type": ["null", "float"]}, {"default": null, "doc": "The number of data points used to compute g_psfFluxChi2.", "name": "g_psfFluxNdata", "type": ["null", "int"]}, {"default": null, "doc": "Weighted mean forced photometry flux for g filter.", "name": "g_fpFluxMean", "type": ["null", "float"]}, {"default": null, "doc": "Standard error of g_fpFluxMean.", "name": "g_fpFluxMeanErr", "type": ["null", "float"]}, {"default": null, "doc": "Standard deviation of the distribution of g_fpFlux.", "name": "g_fpFluxSigma", "type": ["null", "float"]}, {"default": null, "doc": "Weighted mean point-source model magnitude for r filter.", "name": "r_psfFluxMean", "type": ["null", "float"]}, {"default": null, "doc": "Standard error of r_psfFluxMean.", "name": "r_psfFluxMeanErr", "type": ["null", "float"]}, {"default": null, "doc": "Standard deviation of the distribution of r_psfFlux.", "name": "r_psfFluxSigma", "type": ["null", "float"]}, {"default": null, "doc": "Chi^2 statistic for the scatter of r_psfFlux around r_psfFluxMean.", "name": "r_psfFluxChi2", "type": ["null", "float"]}, {"default": null, "doc": "The number of data points used to compute r_psfFluxChi2.", "name": "r_psfFluxNdata", "type": ["null", "int"]}, {"default": null, "doc": "Weighted mean forced photometry flux for r filter.", "name": "r_fpFluxMean", "type": ["null", "float"]}, {"default": null, "doc": "Standard error of r_fpFluxMean.", "name": "r_fpFluxMeanErr", "type": ["null", "float"]}, {"default": null, "doc": "Standard deviation of the distribution of r_fpFlux.", "name": "r_fpFluxSigma", "type": ["null", "float"]}, {"default": null, "doc": "Weighted mean point-source model magnitude for i filter.", "name": "i_psfFluxMean", "type": ["null", "float"]}, {"default": null, "doc": "Standard error of i_psfFluxMean.", "name": "i_psfFluxMeanErr", "type": ["null", "float"]}, {"default": null, "doc": "Standard deviation of the distribution of i_psfFlux.", "name": "i_psfFluxSigma", "type": ["null", "float"]}, {"default": null, "doc": "Chi^2 statistic for the scatter of i_psfFlux around i_psfFluxMean.", "name": "i_psfFluxChi2", "type": ["null", "float"]}, {"default": null, "doc": "The number of data points used to compute i_psfFluxChi2.", "name": "i_psfFluxNdata", "type": ["null", "int"]}, {"default": null, "doc": "Weighted mean forced photometry flux for i filter.", "name": "i_fpFluxMean", "type": ["null", "float"]}, {"default": null, "doc": "Standard error of i_fpFluxMean.", "name": "i_fpFluxMeanErr", "type": ["null", "float"]}, {"default": null, "doc": "Standard deviation of the distribution of i_fpFlux.", "name": "i_fpFluxSigma", "type": ["null", "float"]}, {"default": null, "doc": "Weighted mean point-source model magnitude for z filter.", "name": "z_psfFluxMean", "type": ["null", "float"]}, {"default": null, "doc": "Standard error of z_psfFluxMean.", "name": "z_psfFluxMeanErr", "type": ["null", "float"]}, {"default": null, "doc": "Standard deviation of the distribution of z_psfFlux.", "name": "z_psfFluxSigma", "type": ["null", "float"]}, {"default": null, "doc": "Chi^2 statistic for the scatter of z_psfFlux around z_psfFluxMean.", "name": "z_psfFluxChi2", "type": ["null", "float"]}, {"default": null, "doc": "The number of data points used to compute z_psfFluxChi2.", "name": "z_psfFluxNdata", "type": ["null", "int"]}, {"default": null, "doc": "Weighted mean forced photometry flux for z filter.", "name": "z_fpFluxMean", "type": ["null", "float"]}, {"default": null, "doc": "Standard error of z_fpFluxMean.", "name": "z_fpFluxMeanErr", "type": ["null", "float"]}, {"default": null, "doc": "Standard deviation of the distribution of z_fpFlux.", "name": "z_fpFluxSigma", "type": ["null", "float"]}, {"default": null, "doc": "Weighted mean point-source model magnitude for y filter.", "name": "y_psfFluxMean", "type": ["null", "float"]}, {"default": null, "doc": "Standard error of y_psfFluxMean.", "name": "y_psfFluxMeanErr", "type": ["null", "float"]}, {"default": null, "doc": "Standard deviation of the distribution of y_psfFlux.", "name": "y_psfFluxSigma", "type": ["null", "float"]}, {"default": null, "doc": "Chi^2 statistic for the scatter of y_psfFlux around y_psfFluxMean.", "name": "y_psfFluxChi2", "type": ["null", "float"]}, {"default": null, "doc": "The number of data points used to compute y_psfFluxChi2.", "name": "y_psfFluxNdata", "type": ["null", "int"]}, {"default": null, "doc": "Weighted mean forced photometry flux for y filter.", "name": "y_fpFluxMean", "type": ["null", "float"]}, {"default": null, "doc": "Standard error of y_fpFluxMean.", "name": "y_fpFluxMeanErr", "type": ["null", "float"]}, {"default": null, "doc": "Standard deviation of the distribution of y_fpFlux.", "name": "y_fpFluxSigma", "type": ["null", "float"]}, {"default": null, "doc": "Id of the closest nearby object.", "name": "nearbyObj1", "type": ["null", "long"]}, {"default": null, "doc": "Distance to nearbyObj1.", "name": "nearbyObj1Dist", "type": ["null", "float"]}, {"default": null, "doc": "Natural log of the probability that the observed diaObject is the same as the nearbyObj1.", "name": "nearbyObj1LnP", "type": ["null", "float"]}, {"default": null, "doc": "Id of the second-closest nearby object.", "name": "nearbyObj2", "type": ["null", "long"]}, {"default": null, "doc": "Distance to nearbyObj2.", "name": "nearbyObj2Dist", "type": ["null", "float"]}, {"default": null, "doc": "Natural log of the probability that the observed diaObject is the same as the nearbyObj2.", "name": "nearbyObj2LnP", "type": ["null", "float"]}, {"default": null, "doc": "Id of the third-closest nearby object.", "name": "nearbyObj3", "type": ["null", "long"]}, {"default": null, "doc": "Distance to nearbyObj3.", "name": "nearbyObj3Dist", "type": ["null", "float"]}, {"default": null, "doc": "Natural log of the probability that the observed diaObject is the same as the nearbyObj3.", "name": "nearbyObj3LnP", "type": ["null", "float"]}, {"default": null, "doc": "Mean of the u band flux errors.", "name": "u_psfFluxErrMean", "type": ["null", "float"]}, {"default": null, "doc": "Mean of the g band flux errors.", "name": "g_psfFluxErrMean", "type": ["null", "float"]}, {"default": null, "doc": "Mean of the r band flux errors.", "name": "r_psfFluxErrMean", "type": ["null", "float"]}, {"default": null, "doc": "Mean of the i band flux errors.", "name": "i_psfFluxErrMean", "type": ["null", "float"]}, {"default": null, "doc": "Mean of the z band flux errors.", "name": "z_psfFluxErrMean", "type": ["null", "float"]}, {"default": null, "doc": "Mean of the y band flux errors.", "name": "y_psfFluxErrMean", "type": ["null", "float"]}]}]}, {"default": null, "name": "ssObject", "type": ["null", {"type": "record", "name": "lsst.v7_0.ssObject", "fields": [{"doc": "Unique identifier.", "name": "ssObjectId", "type": "long"}, {"default": null, "doc": "The date the LSST first linked and submitted the discovery observations to the MPC. May be NULL if not an LSST discovery. The date format will follow general LSST conventions (MJD TAI, at the moment).", "name": "discoverySubmissionDate", "type": ["null", "double"]}, {"default": null, "doc": "The time of the first LSST observation of this object (could be precovered) as Modified Julian Date, International Atomic Time.", "name": "firstObservationDate", "type": ["null", "double"]}, {"default": null, "doc": "Arc of LSST observations.", "name": "arc", "type": ["null", "float"]}, {"default": null, "doc": "Number of LSST observations of this object.", "name": "numObs", "type": ["null", "int"]}, {"default": null, "doc": "Minimum orbit intersection distance to Earth.", "name": "MOID", "type": ["null", "float"]}, {"default": null, "doc": "True anomaly of the MOID point.", "name": "MOIDTrueAnomaly", "type": ["null", "float"]}, {"default": null, "doc": "Ecliptic longitude of the MOID point.", "name": "MOIDEclipticLongitude", "type": ["null", "float"]}, {"default": null, "doc": "DeltaV at the MOID point.", "name": "MOIDDeltaV", "type": ["null", "float"]}, {"default": null, "doc": "Best fit absolute magnitude (u band).", "name": "u_H", "type": ["null", "float"]}, {"default": null, "doc": "Best fit G12 slope parameter (u band).", "name": "u_G12", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of H (u band).", "name": "u_HErr", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of G12 (u band).", "name": "u_G12Err", "type": ["null", "float"]}, {"default": null, "doc": "H-G12 covariance (u band).", "name": "u_H_u_G12_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Chi^2 statistic of the phase curve fit (u band).", "name": "u_Chi2", "type": ["null", "float"]}, {"default": null, "doc": "The number of data points used to fit the phase curve (u band).", "name": "u_Ndata", "type": ["null", "int"]}, {"default": null, "doc": "Best fit absolute magnitude (g band).", "name": "g_H", "type": ["null", "float"]}, {"default": null, "doc": "Best fit G12 slope parameter (g band).", "name": "g_G12", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of H (g band).", "name": "g_HErr", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of G12 (g band).", "name": "g_G12Err", "type": ["null", "float"]}, {"default": null, "doc": "H-G12 covariance (g band).", "name": "g_H_g_G12_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Chi^2 statistic of the phase curve fit (g band).", "name": "g_Chi2", "type": ["null", "float"]}, {"default": null, "doc": "The number of data points used to fit the phase curve (g band).", "name": "g_Ndata", "type": ["null", "int"]}, {"default": null, "doc": "Best fit absolute magnitude (r band).", "name": "r_H", "type": ["null", "float"]}, {"default": null, "doc": "Best fit G12 slope parameter (r band).", "name": "r_G12", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of H (r band).", "name": "r_HErr", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of G12 (r band).", "name": "r_G12Err", "type": ["null", "float"]}, {"default": null, "doc": "H-G12 covariance (r band).", "name": "r_H_r_G12_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Chi^2 statistic of the phase curve fit (r band).", "name": "r_Chi2", "type": ["null", "float"]}, {"default": null, "doc": "The number of data points used to fit the phase curve (r band).", "name": "r_Ndata", "type": ["null", "int"]}, {"default": null, "doc": "Best fit absolute magnitude (i band).", "name": "i_H", "type": ["null", "float"]}, {"default": null, "doc": "Best fit G12 slope parameter (i band).", "name": "i_G12", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of H (i band).", "name": "i_HErr", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of G12 (i band).", "name": "i_G12Err", "type": ["null", "float"]}, {"default": null, "doc": "H-G12 covariance (i band).", "name": "i_H_i_G12_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Chi^2 statistic of the phase curve fit (i band).", "name": "i_Chi2", "type": ["null", "float"]}, {"default": null, "doc": "The number of data points used to fit the phase curve (i band).", "name": "i_Ndata", "type": ["null", "int"]}, {"default": null, "doc": "Best fit absolute magnitude (z band).", "name": "z_H", "type": ["null", "float"]}, {"default": null, "doc": "Best fit G12 slope parameter (z band).", "name": "z_G12", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of H (z band).", "name": "z_HErr", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of G12 (z band).", "name": "z_G12Err", "type": ["null", "float"]}, {"default": null, "doc": "H-G12 covariance (z band).", "name": "z_H_z_G12_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Chi^2 statistic of the phase curve fit (z band).", "name": "z_Chi2", "type": ["null", "float"]}, {"default": null, "doc": "The number of data points used to fit the phase curve (z band).", "name": "z_Ndata", "type": ["null", "int"]}, {"default": null, "doc": "Best fit absolute magnitude (y band).", "name": "y_H", "type": ["null", "float"]}, {"default": null, "doc": "Best fit G12 slope parameter (y band).", "name": "y_G12", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of H (y band).", "name": "y_HErr", "type": ["null", "float"]}, {"default": null, "doc": "Uncertainty of G12 (y band).", "name": "y_G12Err", "type": ["null", "float"]}, {"default": null, "doc": "H-G12 covariance (y band).", "name": "y_H_y_G12_Cov", "type": ["null", "float"]}, {"default": null, "doc": "Chi^2 statistic of the phase curve fit (y band).", "name": "y_Chi2", "type": ["null", "float"]}, {"default": null, "doc": "The number of data points used to fit the phase curve (y band).", "name": "y_Ndata", "type": ["null", "int"]}, {"default": null, "doc": "median `extendedness` value from the DIASource.", "name": "medianExtendedness", "type": ["null", "float"]}]}]}, {"default": null, "name": "cutoutDifference", "type": ["null", "bytes"]}, {"default": null, "name": "cutoutScience", "type": ["null", "bytes"]}, {"default": null, "name": "cutoutTemplate", "type": ["null", "bytes"]}]}1Æn¯Bû‚Ûr–$Þ Ãþ Ò㣖 €€€€¶õºçTÀ!ÖAw5Þõ ùu@÷Ì’9eVÏt»(À?÷Ì’9$ ˜933àBš™™?33òBÍÌŒ?š™™? ›D@Aff$B ›D@A +rüÿÿÿµõºçVÀ!ÖAw5Þõ ùu@÷Ì’9eVÏt»(À?÷Ì’9$ ˜933àBš™™?33òBÍÌŒ?š™™? ›D@Aff$B ›D@A +rþÿÿÿµõºçTÀ!ÖAw5Þõ ùu@÷Ì’9eVÏt»(À?÷Ì’9$ ˜933àBš™™?33òBÍÌŒ?š™™? ›D@Aff$B ›D@A +r‚€€€¶õºçw5Þõ ùu@÷Ì’9eVÏt»(À?÷Ì’9$ ˜9À!ÖAœP9œP9÷Ì9œP9¦ñ@œP9œP9œP9œP9œP9œP9ü„íŽ1Æn¯Bû‚Ûr–$Þ Ã \ No newline at end of file diff --git a/python/lsst/alert/packet/schema/7/0/sample_data/generate.py b/python/lsst/alert/packet/schema/7/0/sample_data/generate.py new file mode 100644 index 0000000..3fddbe2 --- /dev/null +++ b/python/lsst/alert/packet/schema/7/0/sample_data/generate.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python +import json +import lsst.alert.packet as packet +from datetime import datetime +import pandas as pd + +with open("alert.json", "r") as f: + data = json.load(f) + + data_time = datetime.now() + + data['diaSource']['time_processed'] = pd.Timestamp(data_time) + data['diaObject']['validityStart'] = pd.Timestamp(data_time) + +schema = packet.SchemaRegistry.from_filesystem(schema_root="lsst.v7_0.alert").get_by_version("7.0") +with open("fakeAlert.avro", "wb") as f: + schema.store_alerts(f, [data]) diff --git a/python/lsst/alert/packet/schema/examples/sample_data/simple.json b/python/lsst/alert/packet/schema/examples/sample_data/simple.json index 69b5c33..b142276 100644 --- a/python/lsst/alert/packet/schema/examples/sample_data/simple.json +++ b/python/lsst/alert/packet/schema/examples/sample_data/simple.json @@ -1,6 +1,7 @@ { "diaSourceId":111111, - "ccdVisitId":111111, + "visit": 1, + "detector": 42, "midpointMjdTai":12314.142412, "band":"my favorite filter", "radec": { diff --git a/python/lsst/alert/packet/schema/examples/sample_data/simplest.json b/python/lsst/alert/packet/schema/examples/sample_data/simplest.json index 822f07d..19ddec9 100644 --- a/python/lsst/alert/packet/schema/examples/sample_data/simplest.json +++ b/python/lsst/alert/packet/schema/examples/sample_data/simplest.json @@ -1,6 +1,7 @@ { "diaSourceId":111111, - "ccdVisitId":111111, + "visit": 1, + "detector": 42, "diaObjectId":111111, "midpointMjdTai":12314.142412, "band":"my favorite filter", diff --git a/python/lsst/alert/packet/schema/examples/simple.avsc b/python/lsst/alert/packet/schema/examples/simple.avsc index 206dfe5..057011a 100644 --- a/python/lsst/alert/packet/schema/examples/simple.avsc +++ b/python/lsst/alert/packet/schema/examples/simple.avsc @@ -4,7 +4,8 @@ "name": "diaSource", "fields": [ {"name": "diaSourceId", "type": "long"}, - {"name": "ccdVisitId", "type": "long"}, + {"name": "visit", "type": "long"}, + {"name": "detector", "type": "int"}, {"name": "diaObjectId", "type": ["long", "null"], "default": null}, {"name": "ssObjectId", "type": ["long", "null"], "default": null}, {"name": "parentSourceId", "type": ["long", "null"], "default": null}, diff --git a/python/lsst/alert/packet/schema/examples/simplest.avsc b/python/lsst/alert/packet/schema/examples/simplest.avsc index 49a901b..b90be38 100644 --- a/python/lsst/alert/packet/schema/examples/simplest.avsc +++ b/python/lsst/alert/packet/schema/examples/simplest.avsc @@ -4,7 +4,8 @@ "name": "diaSource", "fields": [ {"name": "diaSourceId", "type": "long"}, - {"name": "ccdVisitId", "type": "long"}, + {"name": "visit", "type": "long"}, + {"name": "detector", "type": "int"}, {"name": "diaObjectId", "type": ["long", "null"], "default": null}, {"name": "midpointMjdTai", "type": "double"}, {"name": "band", "type": "string"}, diff --git a/python/lsst/alert/packet/schema/latest.txt b/python/lsst/alert/packet/schema/latest.txt index a435f5a..4fedf1d 100644 --- a/python/lsst/alert/packet/schema/latest.txt +++ b/python/lsst/alert/packet/schema/latest.txt @@ -1 +1 @@ -6.1 +7.0 diff --git a/python/lsst/alert/packet/schemaRegistry.py b/python/lsst/alert/packet/schemaRegistry.py index 92a0b68..381838b 100644 --- a/python/lsst/alert/packet/schemaRegistry.py +++ b/python/lsst/alert/packet/schemaRegistry.py @@ -128,7 +128,7 @@ def calculate_id(schema): sort_keys=True).encode('utf-8')) @classmethod - def from_filesystem(cls, root=None, schema_root="lsst.v6_1.alert"): + def from_filesystem(cls, root=None, schema_root="lsst.v7_0.alert"): """Populate a schema registry based on the filesystem. Walk the directory tree from the root provided, locating files named diff --git a/python/lsst/alert/packet/updateSchema.py b/python/lsst/alert/packet/updateSchema.py index a068a10..55dec14 100644 --- a/python/lsst/alert/packet/updateSchema.py +++ b/python/lsst/alert/packet/updateSchema.py @@ -81,6 +81,9 @@ def populate_fields(apdb_table): if 'char' in column['datatype']: column['datatype'] = 'string' + if 'short' in column['datatype']: + column['datatype'] = 'int' + if 'timestamp' in column['datatype']: column['datatype'] = {'type': 'long', 'logicalType': 'timestamp-micros'} else: diff --git a/ups/alert_packet.table b/ups/alert_packet.table index 750ea30..14f8efa 100644 --- a/ups/alert_packet.table +++ b/ups/alert_packet.table @@ -1,2 +1,7 @@ envPrepend(PYTHONPATH, ${PRODUCT_DIR}/python) envPrepend(PATH, ${PRODUCT_DIR}/bin) + +# These are necessary to generate a new alert schema version, but the package +# is stand-alone otherwise. +setupOptional(resources) +setupOptional(sdm_schemas)