-
Notifications
You must be signed in to change notification settings - Fork 18
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-44889: Investigate feasibility of resurrecting matchBackgrounds.py background fitting algorithms #956
base: main
Are you sure you want to change the base?
Commits on Sep 24, 2024
-
Update MatchBackgroundsTask to Gen3, first pass
Initial version of this task is written using old architecture, and so needs updating. In MatchBackgroundsTask, and its method selectRefExposure, required parameters were equally outdated: DataId, DatasetType, and ImageScaler. All of these now seem consolidated under lsst.afw.image.Exposure, so separate calls to DataId and DatasetType are now single calls for Exposure objects. ImageScaler calls were replaced in-line with Exposure.getPhotoCalib() calls, to scale all image flux to the same zeropoint (nJy). Also, we want to process visit-level images using this, so a MatchBackgroundsConnections class was created, MatchBackgroundsConfig was updated to inherit from PipelineTaskConfig (and those connections), and a rudimentary runQuantum method was added to MatchBackgroundsTask.
Configuration menu - View commit details
-
Copy full SHA for 50a6da9 - Browse repository at this point
Copy the full SHA 50a6da9View commit details -
Change input data type to deepCoadd_psfMatchedWarp
Code now runs without complaint through self.matchBackgrounds. Also added a self._fluxScale method to replace repeat code blocks. Will decide later if scaling to nJy is the best way to do this.
Configuration menu - View commit details
-
Copy full SHA for 1dc7f0f - Browse repository at this point
Copy the full SHA 1dc7f0fView commit details -
Change output from Struct to BackgroundList
Code is now functional, in that it accepts images and returns difference image background models as "psfMatchedWarpBackground_diff" (name likely to be altered later). Uses a fit to a blank image for that corresponding to the reference image.
Configuration menu - View commit details
-
Copy full SHA for 7cb5286 - Browse repository at this point
Copy the full SHA 7cb5286View commit details -
Apply spline parameters to BackgroundList
Difference background models are now formatted properly, to allow for image creation from the spline parameters. Also did some adjustments to documentation for Flake8 formatting.
Configuration menu - View commit details
-
Copy full SHA for 887db12 - Browse repository at this point
Copy the full SHA 887db12View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1998771 - Browse repository at this point
Copy the full SHA 1998771View commit details -
Use sky-subtracted warps for ref-image selection
_defineWarps() now rejects any image with all NaNs along any image edge, and creates the cost function using a sky-subtracted image. This sky-subtraction fits a 1st order Chebyshev polynomial to the masked image background. Also fixed a bug from LSK refactor by inserting a blank sky model into the background model list at the chosen reference image index.
Configuration menu - View commit details
-
Copy full SHA for 219481c - Browse repository at this point
Copy the full SHA 219481cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 30ebfa0 - Browse repository at this point
Copy the full SHA 30ebfa0View commit details