From e6b9383b3bd8a6447a7a25458c7c019bf16f0f69 Mon Sep 17 00:00:00 2001 From: John Parejko Date: Mon, 14 Aug 2023 13:52:05 -0700 Subject: [PATCH 1/3] Add imSim-specific overrides for CalibrateImageTask --- config/imsim/calibrateImage.py | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 config/imsim/calibrateImage.py diff --git a/config/imsim/calibrateImage.py b/config/imsim/calibrateImage.py new file mode 100644 index 000000000..43b7a0fe4 --- /dev/null +++ b/config/imsim/calibrateImage.py @@ -0,0 +1,38 @@ +""" +ImSim-specific overrides for CalibrateImageTask +""" +import os + +config_dir = os.path.join(os.path.dirname(__file__)) + +# imsim background model is a single value per detector. +config.psf_detection.background.approxOrderX: 1 +config.psf_detection.tempLocalBackground.approxOrderX: 1 +config.psf_detection.tempWideBackground.approxOrderX: 1 +config.psf_repair.cosmicray.background.approxOrderX: 1 +config.star_detection.background.approxOrderX = 1 +config.star_detection.tempLocalBackground.approxOrderX = 1 +config.star_detection.tempWideBackground.approxOrderX = 1 + +# imSim-specifc reference catalogs +config.connections.astrometry_ref_cat = "cal_ref_cat" +config.connections.photometry_ref_cat = "cal_ref_cat" +# Use the ImSim filterMap ("lsst_X_smeared" reference fluxes). +config.astrometry_ref_loader.load(os.path.join(config_dir, 'filterMap.py')) +config.astrometry_ref_loader.anyFilterMapsToThis = None +config.photometry_ref_loader.load(os.path.join(config_dir, 'filterMap.py')) + +# Make sure galaxies from truth catalog are not used for calibration. +config.astrometry.referenceSelector.doUnresolved = True +config.astrometry.referenceSelector.unresolved.name = "resolved" +config.astrometry.referenceSelector.unresolved.minimum = None +config.astrometry.referenceSelector.unresolved.maximum = 0.5 +config.photometry.match.referenceSelection.doUnresolved = True +config.photometry.match.referenceSelection.unresolved.name = "resolved" +config.photometry.match.referenceSelection.unresolved.minimum = None +config.photometry.match.referenceSelection.unresolved.maximum = 0.5 + +# Only use brighter sources from the very deep truth catalog. +config.photometry.match.referenceSelection.doMagLimit = True +config.photometry.match.referenceSelection.magLimit.fluxField = "lsst_i_smeared_flux" +config.photometry.match.referenceSelection.magLimit.maximum = 22.0 From d578790229294b1bed0259f339317e4b16fba9cb Mon Sep 17 00:00:00 2001 From: John Parejko Date: Mon, 14 Aug 2023 17:58:21 -0700 Subject: [PATCH 2/3] Remove already-defaulted crosstalk override doCrosstalk is overridden to True in the base-level obs_lsst isr.py. --- config/imsim/isr.py | 1 - 1 file changed, 1 deletion(-) diff --git a/config/imsim/isr.py b/config/imsim/isr.py index 6b7d50572..910a108a0 100644 --- a/config/imsim/isr.py +++ b/config/imsim/isr.py @@ -22,5 +22,4 @@ """ imsim-specific overrides for IsrTask """ -config.doCrosstalk = True config.doBrighterFatter = True From c5640ff4a4de04f6dd03369be42c623ea15ec48a Mon Sep 17 00:00:00 2001 From: John Parejko Date: Mon, 14 Aug 2023 17:58:54 -0700 Subject: [PATCH 3/3] Add imsim-specific ISR override This is the value used in DRP and AP for all imsim datasets. --- config/imsim/calibrateImage.py | 4 ++-- config/imsim/isr.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config/imsim/calibrateImage.py b/config/imsim/calibrateImage.py index 43b7a0fe4..e5a792ac2 100644 --- a/config/imsim/calibrateImage.py +++ b/config/imsim/calibrateImage.py @@ -15,8 +15,8 @@ config.star_detection.tempWideBackground.approxOrderX = 1 # imSim-specifc reference catalogs -config.connections.astrometry_ref_cat = "cal_ref_cat" -config.connections.photometry_ref_cat = "cal_ref_cat" +config.connections.astrometry_ref_cat = "cal_ref_cat_2_2" +config.connections.photometry_ref_cat = "cal_ref_cat_2_2" # Use the ImSim filterMap ("lsst_X_smeared" reference fluxes). config.astrometry_ref_loader.load(os.path.join(config_dir, 'filterMap.py')) config.astrometry_ref_loader.anyFilterMapsToThis = None diff --git a/config/imsim/isr.py b/config/imsim/isr.py index 910a108a0..a93582868 100644 --- a/config/imsim/isr.py +++ b/config/imsim/isr.py @@ -22,4 +22,5 @@ """ imsim-specific overrides for IsrTask """ +config.connections.newBFKernel = "bfk" config.doBrighterFatter = True