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-34826: Remove unnecessary characterize plugins from ap pipline #110

Merged
merged 2 commits into from
May 26, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions config/DECam/calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@
config.detection.isotropicGrow = True
kfindeisen marked this conversation as resolved.
Show resolved Hide resolved

config.measurement.load(os.path.join(obsConfigDir, "apertures.py"))
config.measurement.load(os.path.join(obsConfigDir, "kron.py"))
config.measurement.load(os.path.join(obsConfigDir, "hsm.py"))

# Deblender
# These configs match obs_subaru, to facilitate 1:1 comparisons between DECam and HSC
kfindeisen marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
19 changes: 2 additions & 17 deletions config/DECam/characterizeImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,9 @@
config.detection.isotropicGrow = True

# Activate calibration of measurements: required for aperture corrections
config.load(os.path.join(obsConfigDir, "cmodel.py"))
config.measurement.load(os.path.join(obsConfigDir, "apertures.py"))
config.measurement.load(os.path.join(obsConfigDir, "kron.py"))
config.measurement.load(os.path.join(obsConfigDir, "convolvedFluxes.py"))
config.measurement.load(os.path.join(obsConfigDir, "gaap.py"))
config.measurement.load(os.path.join(obsConfigDir, "hsm.py"))
if "ext_shapeHSM_HsmShapeRegauss" in config.measurement.plugins:
# no deblending has been done
config.measurement.plugins["ext_shapeHSM_HsmShapeRegauss"].deblendNChild = ""
# hsm shapes are the preferred shape measurement (over SdssShape).
config.measurement.load(os.path.join(obsConfigDir, "../hsm.py"))

# Deblender
config.deblend.maskLimits["NO_DATA"] = 0.25 # Ignore sources that are in the vignetted region
Expand All @@ -53,15 +47,6 @@
config.measurement.plugins.names |= ["base_Jacobian", "base_FPPosition"]
config.measurement.plugins["base_Jacobian"].pixelScale = 0.263

# Convolved fluxes can fail for small target seeing if the observation seeing is larger
if "ext_convolved_ConvolvedFlux" in config.measurement.plugins:
names = config.measurement.plugins["ext_convolved_ConvolvedFlux"].getAllResultNames()
config.measureApCorr.allowFailure += names

if "ext_gaap_GaapFlux" in config.measurement.plugins:
names = config.measurement.plugins["ext_gaap_GaapFlux"].getAllGaapResultNames()
config.measureApCorr.allowFailure += names

# For aperture correction modeling, only use objects that were used in the
# PSF model and have psf flux signal-to-noise > 200.
# These configs match obs_subaru, to facilitate 1:1 comparisons between DECam and HSC
Expand Down
16 changes: 0 additions & 16 deletions config/DECam/cmodel.py

This file was deleted.

16 changes: 0 additions & 16 deletions config/DECam/convolvedFluxes.py

This file was deleted.

17 changes: 0 additions & 17 deletions config/DECam/gaap.py

This file was deleted.

18 changes: 0 additions & 18 deletions config/DECam/hsm.py

This file was deleted.

15 changes: 0 additions & 15 deletions config/DECam/kron.py

This file was deleted.

2 changes: 0 additions & 2 deletions config/HSC/calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@
config.detection.isotropicGrow = True
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to keep the base_ClassificationExtendedness plugin on line 54?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As with DECam above, this isn't adding the plugin, but rather modifying its config. I'll do some further digging on the sfm.py default plugins. Those might be a bit harder to remove; see sfm.py:139 we'd have to at minimum remove items from that config list, instead of just removing lines that add new plugins as was done on this ticket.


config.measurement.load(os.path.join(ObsConfigDir, "apertures.py"))
config.measurement.load(os.path.join(ObsConfigDir, "kron.py"))
config.measurement.load(os.path.join(ObsConfigDir, "hsm.py"))

# Deblender
config.deblend.maxFootprintSize = 0
Expand Down
19 changes: 2 additions & 17 deletions config/HSC/characterizeImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,9 @@
config.detection.isotropicGrow = True

# Activate calibration of measurements: required for aperture corrections
config.load(os.path.join(ObsConfigDir, "cmodel.py"))
config.measurement.load(os.path.join(ObsConfigDir, "apertures.py"))
config.measurement.load(os.path.join(ObsConfigDir, "kron.py"))
config.measurement.load(os.path.join(ObsConfigDir, "convolvedFluxes.py"))
config.measurement.load(os.path.join(ObsConfigDir, "gaap.py"))
config.measurement.load(os.path.join(ObsConfigDir, "hsm.py"))
if "ext_shapeHSM_HsmShapeRegauss" in config.measurement.plugins:
# no deblending has been done
config.measurement.plugins["ext_shapeHSM_HsmShapeRegauss"].deblendNChild = ""
# hsm shapes are the preferred shape measurement (over SdssShape).
config.measurement.load(os.path.join(ObsConfigDir, "../hsm.py"))

# Deblender
config.deblend.maskLimits["NO_DATA"] = 0.25 # Ignore sources that are in the vignetted region
Expand All @@ -51,15 +45,6 @@
config.measurement.plugins.names |= ["base_Jacobian", "base_FPPosition"]
kfindeisen marked this conversation as resolved.
Show resolved Hide resolved
config.measurement.plugins["base_Jacobian"].pixelScale = 0.168

# Convolved fluxes can fail for small target seeing if the observation seeing is larger
if "ext_convolved_ConvolvedFlux" in config.measurement.plugins:
names = config.measurement.plugins["ext_convolved_ConvolvedFlux"].getAllResultNames()
config.measureApCorr.allowFailure += names

if "ext_gaap_GaapFlux" in config.measurement.plugins:
names = config.measurement.plugins["ext_gaap_GaapFlux"].getAllGaapResultNames()
config.measureApCorr.allowFailure += names

# For aperture correction modeling, only use objects that were used in the
# PSF model and have psf flux signal-to-noise > 200.
config.measureApCorr.sourceSelector['science'].doFlags = True
Expand Down
15 changes: 0 additions & 15 deletions config/HSC/cmodel.py

This file was deleted.

15 changes: 0 additions & 15 deletions config/HSC/convolvedFluxes.py

This file was deleted.

16 changes: 0 additions & 16 deletions config/HSC/gaap.py

This file was deleted.

18 changes: 0 additions & 18 deletions config/HSC/hsm.py

This file was deleted.

13 changes: 0 additions & 13 deletions config/HSC/kron.py

This file was deleted.

2 changes: 0 additions & 2 deletions config/LSSTCam-imSim/calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@

# Activate calibration of measurements: required for aperture corrections
config.measurement.load(os.path.join(obsConfigDir, "apertures.py"))
config.measurement.load(os.path.join(obsConfigDir, "kron.py"))
config.measurement.load(os.path.join(obsConfigDir, "hsm.py"))

# Deblender
config.deblend.maxFootprintSize = 0
Expand Down
19 changes: 2 additions & 17 deletions config/LSSTCam-imSim/characterizeImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,31 +58,16 @@
config.detection.isotropicGrow = True

# Activate calibration of measurements: required for aperture corrections
config.load(os.path.join(obsConfigDir, "cmodel.py"))
config.measurement.load(os.path.join(obsConfigDir, "apertures.py"))
config.measurement.load(os.path.join(obsConfigDir, "kron.py"))
config.measurement.load(os.path.join(obsConfigDir, "convolvedFluxes.py"))
config.measurement.load(os.path.join(obsConfigDir, "gaap.py"))
config.measurement.load(os.path.join(obsConfigDir, "hsm.py"))
if "ext_shapeHSM_HsmShapeRegauss" in config.measurement.plugins:
# no deblending has been done
config.measurement.plugins["ext_shapeHSM_HsmShapeRegauss"].deblendNChild = ""
# hsm shapes are the preferred shape measurement (over SdssShape).
config.measurement.load(os.path.join(obsConfigDir, "../hsm.py"))

# Deblender
config.deblend.maskLimits["NO_DATA"] = 0.25 # Ignore sources that are in the vignetted region
config.deblend.maxFootprintArea = 10000

config.measurement.plugins.names |= ["base_Jacobian", "base_FPPosition"]
kfindeisen marked this conversation as resolved.
Show resolved Hide resolved

# Convolved fluxes can fail for small target seeing if the observation seeing is larger
if "ext_convolved_ConvolvedFlux" in config.measurement.plugins:
names = config.measurement.plugins["ext_convolved_ConvolvedFlux"].getAllResultNames()
config.measureApCorr.allowFailure += names

if "ext_gaap_GaapFlux" in config.measurement.plugins:
names = config.measurement.plugins["ext_gaap_GaapFlux"].getAllGaapResultNames()
config.measureApCorr.allowFailure += names

config.measurement.plugins["base_Jacobian"].pixelScale = 0.2

# Prevent spurious detections in vignetting areas
Expand Down
32 changes: 0 additions & 32 deletions config/LSSTCam-imSim/cmodel.py

This file was deleted.

32 changes: 0 additions & 32 deletions config/LSSTCam-imSim/gaap.py

This file was deleted.