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-16702: Add reference star support to fgcmcal fitting #13

Merged
merged 10 commits into from May 30, 2019

Conversation

erykoff
Copy link
Contributor

@erykoff erykoff commented May 22, 2019

This PR covers a major upgrade in fgcm that not only adds reference stars to the fit as an option, but has a large number of bug fixes and fitter improvements that lead to much improved calibration on HSC, including combining r/r2 and i/i2 filters. Additional systematic plots are also created, more sophisticated tracking of instrumental changes, etc.

export RCRERUN=RC/w_2018_38/DM-15690
export COOKBOOKRERUN=fgcm_cookbook_w_2018_38
export RCRERUN=RC/w_2019_18/DM-19151-sfm
export COOKBOOKRERUN=fgcm_cookbook_w_2019_18
```

Copy link
Contributor

Choose a reason for hiding this comment

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

Yay! Updated doc!

you will find a sharded reference catalog suitable to use for any observations
overlapping the survey images that have been calibrated.

And in the output repo
`/datasets/hsc/repo/rerun/private/erykoff/rc2_w_2018_32/fit1/jointcal-results`
`/datasets/hsc/repo/rerun/private/${USER}/${COOKBOOKRERUN}/fit1/jointcal-results`
you will find all of the `jointcal_photoCalib` spatially-variable zeropoint
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this still a jointcal_photoCalib but above you say it output a "fgcm_photoCalib` files for each visit/ccd"

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 catch!

@@ -14,12 +18,24 @@
config.densityCutMaxPerPixel = 1500
# Dictionary that maps "filters" (instrumental configurations) to "bands"
# (abstract names). All filters must be listed in the LUT.
config.filterToBand = {'g':'g', 'r':'r', 'i':'i', 'z':'z', 'y':'y'}
config.filterMap = {'g':'g', 'r':'r', 'i':'i', 'z':'z', 'y':'y'}
Copy link
Contributor

Choose a reason for hiding this comment

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

Needs spaces after colons.

# Reference star signal-to-noise minimum to use in calibration
config.refStarSnMin = 50.0
# Number of sigma compared to average mag for reference star to be considered an outlier
config.refStarOutlierNSig = 4.0

Copy link
Contributor

Choose a reason for hiding this comment

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

W391: blank line at end of file

@@ -7,7 +7,7 @@
from lsst.utils import getPackageDir

# Do the reference catalog calibration
doReferenceCalibration = True
doReferenceCalibration = False
Copy link
Contributor

Choose a reason for hiding this comment

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

This appears to contract the inline comment right above

# in the reference catalog. This is okay.
pass

if foundReferenceFilter:
Copy link
Contributor

Choose a reason for hiding this comment

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

The break can go right after self._referenceFilter = filterName

@@ -73,7 +73,7 @@ class FgcmOutputProductsConfig(pexConfig.Config):
doReferenceCalibration = pexConfig.Field(
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the relationship between this doReferenceCalibration and the one in fgcmFitCycle?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've improved the doc string: "Transfer 'absolute' calibration from reference catalog? This afterburner step is unnecessary if reference stars were used in the full fit in FgcmFitCycleTask."
I've also added a warning in FgcmOutputProductsTask if both are set: "doReferenceCalibration is set, and is possibly redundant with fitCycleConfig.doReferenceCalibration". (It's not an error, it's just a warning). Does that make sense?


import lsst.fgcmcal as fgcmcal

ROOT = os.path.abspath(os.path.dirname(__file__))
Copy link
Contributor

Choose a reason for hiding this comment

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

Unused variable


"""

import matplotlib
Copy link
Contributor

Choose a reason for hiding this comment

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

unused?

import lsst.utils
import lsst.pex.exceptions
import lsst.pipe.tasks
import lsst.daf.persistence as dafPersistence
Copy link
Contributor

Choose a reason for hiding this comment

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

dafPersist is the standard alias.

@erykoff erykoff merged commit 5fd2752 into master May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants