Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-39858: Add imSim-specific overrides for CalibrateImageTask #465

Merged
merged 3 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions config/imsim/calibrateImage.py
Original file line number Diff line number Diff line change
@@ -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_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
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
2 changes: 1 addition & 1 deletion config/imsim/isr.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
"""
imsim-specific overrides for IsrTask
"""
config.doCrosstalk = True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the obs_lsst default changed to False, would you want this one to follow suit or remain at True?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question: I could see it going either way, but we know we need to do crosstalk correction in all the LSSTCam chips (simulated and real), so I don't foresee it ever being set to False in the lowest-level instrument override.

config.connections.newBFKernel = "bfk"
config.doBrighterFatter = True