From 2da86a0ad7dec8e22b36cc1e82d6ec2622e4b4e9 Mon Sep 17 00:00:00 2001 From: Eli Rykoff Date: Wed, 27 Sep 2023 08:33:58 +0200 Subject: [PATCH] Add units to specific property maps. --- .../pipe/tasks/healSparseMappingProperties.py | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/python/lsst/pipe/tasks/healSparseMappingProperties.py b/python/lsst/pipe/tasks/healSparseMappingProperties.py index 0b5ac362d..5b0655949 100644 --- a/python/lsst/pipe/tasks/healSparseMappingProperties.py +++ b/python/lsst/pipe/tasks/healSparseMappingProperties.py @@ -410,6 +410,8 @@ def _post_process(self, total_weights, total_inputs): @register_property_map("exposure_time") class ExposureTimePropertyMap(BasePropertyMap): """Exposure time property map.""" + description = "Exposure time" + unit = "s" def _compute(self, row, ra, dec, scalings, psf_array=None): return row.getVisitInfo().getExposureTime() @@ -418,6 +420,8 @@ def _compute(self, row, ra, dec, scalings, psf_array=None): @register_property_map("psf_size") class PsfSizePropertyMap(BasePropertyMap): """PSF size property map.""" + description = "PSF size" + unit = "pixel" requires_psf = True def _compute(self, row, ra, dec, scalings, psf_array=None): @@ -427,6 +431,7 @@ def _compute(self, row, ra, dec, scalings, psf_array=None): @register_property_map("psf_e1") class PsfE1PropertyMap(BasePropertyMap): """PSF shape e1 property map.""" + description = "PSF e1" requires_psf = True def _compute(self, row, ra, dec, scalings, psf_array=None): @@ -436,6 +441,7 @@ def _compute(self, row, ra, dec, scalings, psf_array=None): @register_property_map("psf_e2") class PsfE2PropertyMap(BasePropertyMap): """PSF shape e2 property map.""" + description = "PSF e2" requires_psf = True def _compute(self, row, ra, dec, scalings, psf_array=None): @@ -445,6 +451,7 @@ def _compute(self, row, ra, dec, scalings, psf_array=None): @register_property_map("n_exposure") class NExposurePropertyMap(BasePropertyMap): """Number of exposures property map.""" + description = "Number of exposures" dtype = np.int32 def _compute(self, row, ra, dec, scalings, psf_array=None): @@ -465,6 +472,8 @@ def validate(self): @register_property_map("psf_maglim") class PsfMaglimPropertyMap(BasePropertyMap): """PSF magnitude limit property map.""" + description = "PSF magnitude limit" + unit = "mag(AB)" requires_psf = True ConfigClass = PsfMaglimPropertyMapConfig @@ -483,6 +492,9 @@ def _post_process(self, total_weights, total_inputs): @register_property_map("sky_background") class SkyBackgroundPropertyMap(BasePropertyMap): """Sky background property map.""" + description = "Sky background" + unit = "nJy" + def _compute(self, row, ra, dec, scalings, psf_array=None): return scalings*row["skyBg"] @@ -490,6 +502,9 @@ def _compute(self, row, ra, dec, scalings, psf_array=None): @register_property_map("sky_noise") class SkyNoisePropertyMap(BasePropertyMap): """Sky noise property map.""" + description = "Sky noise" + unit = "nJy" + def _compute(self, row, ra, dec, scalings, psf_array=None): return scalings*row["skyNoise"] @@ -497,6 +512,8 @@ def _compute(self, row, ra, dec, scalings, psf_array=None): @register_property_map("dcr_dra") class DcrDraPropertyMap(BasePropertyMap): """Effect of DCR on delta-RA property map.""" + description = "Effect of DCR on delta-RA" + def _compute(self, row, ra, dec, scalings, psf_array=None): par_angle = row.getVisitInfo().getBoresightParAngle().asRadians() return np.tan(np.deg2rad(row["zenithDistance"]))*np.sin(par_angle) @@ -505,6 +522,8 @@ def _compute(self, row, ra, dec, scalings, psf_array=None): @register_property_map("dcr_ddec") class DcrDdecPropertyMap(BasePropertyMap): """Effect of DCR on delta-Dec property map.""" + description = "Effect of DCR on delta-Dec" + def _compute(self, row, ra, dec, scalings, psf_array=None): par_angle = row.getVisitInfo().getBoresightParAngle().asRadians() return np.tan(np.deg2rad(row["zenithDistance"]))*np.cos(par_angle) @@ -513,6 +532,8 @@ def _compute(self, row, ra, dec, scalings, psf_array=None): @register_property_map("dcr_e1") class DcrE1PropertyMap(BasePropertyMap): """Effect of DCR on psf shape e1 property map.""" + description = "Effect of DCR on PSF shape e1" + def _compute(self, row, ra, dec, scalings, psf_array=None): par_angle = row.getVisitInfo().getBoresightParAngle().asRadians() return (np.tan(np.deg2rad(row["zenithDistance"]))**2.)*np.cos(2.*par_angle) @@ -521,6 +542,8 @@ def _compute(self, row, ra, dec, scalings, psf_array=None): @register_property_map("dcr_e2") class DcrE2PropertyMap(BasePropertyMap): """Effect of DCR on psf shape e2 property map.""" + description = "Effect of DCR on PSF shape e2" + def _compute(self, row, ra, dec, scalings, psf_array=None): par_angle = row.getVisitInfo().getBoresightParAngle().asRadians() return (np.tan(np.deg2rad(row["zenithDistance"]))**2.)*np.sin(2.*par_angle) @@ -529,6 +552,9 @@ def _compute(self, row, ra, dec, scalings, psf_array=None): @register_property_map("epoch") class EpochPropertyMap(BasePropertyMap): """Observation epoch (mjd) property map.""" + description = "Observation epoch" + unit = "day" + def _compute(self, row, ra, dec, scalings, psf_array=None): date = row.getVisitInfo().getDate() return date.get(date.MJD)