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-31445: Enable GAaP PSF photometry before apCorr #338

Merged
merged 1 commit into from
Aug 19, 2021
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
1 change: 1 addition & 0 deletions config/characterizeImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
config.measureApCorr.allowFailure += names

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

Expand Down
5 changes: 3 additions & 2 deletions config/forcedPhotCoadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
config.catalogCalculation.plugins.names = ["base_ClassificationExtendedness"]
config.measurement.slots.psfFlux = "base_PsfFlux"

# Enable PSF photometry after PSF-Gaussianization in the `ext_gaap_GaapFlux` plugin
config.measurement.plugins["ext_gaap_GaapFlux"].doPsfPhotometry = True

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm just curious why this reordering was necessary? And if there's some missing documentation, can that be ticketed?

Copy link
Member Author

Choose a reason for hiding this comment

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

I wanted this to appear before doUndeblended function call on the GAaP plugin. Basically, this has to be set to True before the getAllGaapResultNames() method is called. It may not have any effect whatsoever, but wanted to be doubly safe.

def doUndeblended(config, algName, fluxList=None):
"""Activate undeblended measurements of algorithm
Parameters
Expand Down Expand Up @@ -65,5 +68,3 @@ def doUndeblended(config, algName, fluxList=None):
# Disable registration for apCorr of undeblended convolved; apCorr will be done through the deblended proxy
config.measurement.undeblended["ext_convolved_ConvolvedFlux"].registerForApCorr = False
config.measurement.undeblended["ext_gaap_GaapFlux"].registerForApCorr = False
# Enable PSF photometry after PSF-Gaussianization in the `ext_gaap_GaapFlux` plugin
config.measurement.plugins["ext_gaap_GaapFlux"].doPsfPhotometry = True