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-31880: Add support for new fgcm reference star options. #84

Merged
merged 2 commits into from May 25, 2022

Conversation

erykoff
Copy link
Contributor

@erykoff erykoff commented May 22, 2022

This PR adds support for the new fgcm 3.9.0 which includes...

  1. Reference star color residuals to judge quality of color terms
  2. Color cuts to apply specifically to reference stars
  3. A per-visit offset based on reference stars that smooths out uniformity variations in surveys (such as HSC SSP) that are not ideally designed for self-calibration. In particular, this helps with offsets caused by the fgcm model being tripped up by the large changes from HSC-R -> HSC-R2 and HSC-I -> HSC-I2 with limited overlap.

This PR does not change the default configuration or behavior of fgcmcal.

dtype=bool,
default=True,
)
useExposureReferenceOffset = pexConfig.Field(
doc=("Use per-exposure (visit) reference offsets for final zeropoints? "
Copy link
Contributor

Choose a reason for hiding this comment

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

It may be too long to try to define in a config doc, but it's not obvious what is meant by "reference offsets".

@@ -329,10 +329,16 @@ class FgcmFitCycleConfig(pipeBase.PipelineTaskConfig,
default=4.0,
)
applyRefStarColorCuts = pexConfig.Field(
doc="Apply color cuts to reference stars?",
doc="Apply starColorCuts to reference stars?",
Copy link
Contributor

Choose a reason for hiding this comment

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

Urghhh...I totally agree this is now a most confusing config name (but I will not make you change it here!) Maybe just stick in an "(i.e. the color cuts specifically defined for the observed star sample)" and also state that this is in addition to any color cuts specified in refStarColorCuts in the doc?

@@ -659,7 +665,12 @@ class FgcmFitCycleConfig(pipeBase.PipelineTaskConfig,
default=None,
)
starColorCuts = pexConfig.ListField(
doc="Encoded star-color cuts (to be cleaned up)",
doc="Encoded star-color cuts (using calibrated colors)",
Copy link
Contributor

Choose a reason for hiding this comment

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

Again, may be difficult to concisely describe, but what does "calibrated colors" mean here? Also, for this config and refStarColorCuts below, I have no idea what the format is if not "NO_DATA" (I mean, yeah I do, 'cuz I saw the test update, but you know what I mean!)

@@ -1563,6 +1577,9 @@ def _makeParSchema(self, parInfo, pars, parSuperStarFlat,
parSchema.addField('compNGoodStarPerExp', type='ArrayI',
doc='Computed number of good stars per exposure',
size=pars['COMPNGOODSTARPEREXP'].size)
parSchema.addField('compExpRefOffset', type='ArrayD',
doc='Computed per-visit median offset between standard stars and ref stars.',
Copy link
Contributor

Choose a reason for hiding this comment

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

This will be computed only using those objects used in the fit, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. Does this need an expanded doc?

Copy link
Contributor

Choose a reason for hiding this comment

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

Up to you...I was just making sure (so, I guess adding it would preclude others having the same question, but I don't think it's crucial)!

@@ -92,25 +92,27 @@ def test_fgcmcalPipeline(self):
nOkZp = 27
nBadZp = 1093
nStdStars = 235
nPlots = 43
nPlots = 48
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you squash the commit adding an interim change?

@erykoff erykoff merged commit 331a853 into main May 25, 2022
@erykoff erykoff deleted the tickets/DM-31880 branch May 25, 2022 22:52
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