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-23699: Update fgcmcal default config format #30

Merged
merged 3 commits into from Mar 10, 2020
Merged

Conversation

erykoff
Copy link
Contributor

@erykoff erykoff commented Mar 4, 2020

All list fields which depended on getting the band order correct have been
deprecated and replaced with dict mappings to avoid many possible index
errors. This is supported with 3.2.0 version of fgcm. Additional
FutureWarnings from numpy 1.17 have also been fixed.

All list fields which depended on getting the band order correct have been
deprecated and replaced with dict mappings to avoid many possible index
errors.  This is supported with 3.2.0 version of fgcm.  Additional
FutureWarnings from numpy 1.17 have also been fixed.
Also update logic so that ccds with valid interpolated zeropoints are output.
)
fitBands = pexConfig.ListField(
doc=("Bands to use in atmospheric fit. Other bands will have atmosphere constrained "
"from observations in the other bands on the same night."),
Copy link
Contributor

Choose a reason for hiding this comment

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

Stutter on “other bands”...replace second with “those listed here”/“the bands used in the fit”?

State that this must be a subset of config.bands & validate?

Unrelated: what is the meaning of the default of ("NO_DATA",) for bands above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All these fields are validated immediately by the fgcm code, and that's why I haven't put in redundant validations in fgcmcal. However, some basic validations would not be a bad idea. As for the NO_DATA, this was cargo-culted from somewhere...

"It will be removed after v20. Use expGrayPhotometricCutDict instead."),
)
expGrayPhotometricCutDict = pexConfig.DictField(
doc=("Per-band specification on maximum (negative) exposure gray for a visit to be "
Copy link
Contributor

Choose a reason for hiding this comment

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

“gray” what?

@@ -83,7 +83,8 @@ def setDefaults(self):

self.fgcmBuildStars.checkAllCcds = False
self.fgcmBuildStars.densityCutMaxPerPixel = 10000
self.fgcmFitCycle.useRepeatabilityForExpGrayCuts = [True]
self.fgcmFitCycle.useRepeatabilityForExpGrayCutsDict = {b: True for
b in self.fgcmFitCycle.bands}
Copy link
Contributor

Choose a reason for hiding this comment

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

b -> band would be clearer

"It will be removed after v20. Use ccdGraySubCcdDict instead."),
)
ccdGraySubCcdDict = pexConfig.DictField(
doc="Per-band specification on whether to compute ccd gray on sub-ccd scale.",
Copy link
Contributor

Choose a reason for hiding this comment

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

“gray” what?

)
expGrayPhotometricCutDict = pexConfig.DictField(
doc=("Per-band specification on maximum (negative) exposure gray for a visit to be "
"considered photometric. Must have one entry per band."),
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this get checked in a validate on this config Task? And should you also check the validate in the tests (i.e. include some configs that don’t comply & assert that they fail)?

)
expVarGrayPhotometricCutDict = pexConfig.DictField(
doc=("Per-band specification on maximum exposure variance to be considered possibly "
"photometric."),
Copy link
Contributor

Choose a reason for hiding this comment

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

Any guidance for another user on how to select a reasonable value here (and for all the other empty defaulted threshold configs)?

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 have added a bunch of defaults to setDefaults

"calibration observations."),
keytype=str,
itemtype=float,
default={},
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it required that this be set & have any entry for each band?

colorSplitBands = pexConfig.ListField(
doc="Band names to use to split stars by color. Must have 2 entries.",
dtype=str,
default=None,
Copy link
Contributor

Choose a reason for hiding this comment

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

2 and only 2? validate?

i, b in enumerate(self.config.bands)}
updatedHighCutDict = {b: float(fgcmFitCycle.updatedHighCut[i]) for
i, b in enumerate(self.config.bands)}

Copy link
Contributor

Choose a reason for hiding this comment

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

b -> band?

deprecated=("This field is no longer used, and has been deprecated by DM-23699. "
"It will be removed after v20. Use superStarSubCcdDict instead."),
)
superStarSubCcdDict = pexConfig.DictField(
Copy link
Contributor

@laurenam laurenam Mar 10, 2020

Choose a reason for hiding this comment

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

You now explicitly include (append) “Dict” in the name for DictFields, but don’t append “List” for ListFields (just food for thought from an OCD-leaning personality 😉 )

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sigh.

@erykoff erykoff merged commit 2c93450 into master Mar 10, 2020
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