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-42115: Add z, y to fgcmcal LATISS config and fix minimum number of detectors for "good" visits #494

Merged
merged 2 commits into from
Dec 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 40 additions & 15 deletions config/latiss/fgcmFitCycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@


config.outfileBase = "FgcmLatissCalibrations"
# The default photometric survey so far uses g, r, i bands.
config.bands = ["g", "r", "i"]
config.fitBands = ["g", "r", "i"]
# The default photometric survey so far uses g, r, i, z, y bands.
config.bands = ["g", "r", "i", "z", "y"]
config.fitBands = ["g", "r", "i", "z", "y"]
from lsst.obs.lsst.filters import LATISS_FILTER_DEFINITIONS
config.physicalFilterMap = LATISS_FILTER_DEFINITIONS.physical_to_band
config.requiredBands = ["g", "r", "i"]

config.nCore = 4
config.cycleNumber = 0
config.maxIterBeforeFinalCycle = 100
config.minCcdPerExp = 1
config.utBoundary = 0.0
config.washMjds = (0.0, )
# For tests, define 1 observing epoch that encompasses everything.
# For now, define 1 observing epoch that encompasses everything.
config.epochMjds = (0.0, 100000.0)
config.coatingMjds = []
config.latitude = -30.2333
Expand All @@ -23,32 +24,44 @@
config.defaultCameraOrientation = 0.0
config.brightObsGrayMax = 0.5
config.expGrayInitialCut = -0.5
config.expGrayPhotometricCutDict = {"g": -0.5, "r": -0.5, "i": -0.5}
config.expGrayHighCutDict = {"g": 0.2, "r": 0.2, "i": 0.2}
config.expGrayPhotometricCutDict = {"g": -0.5, "r": -0.5, "i": -0.5, "z": -0.5, "y": -0.5}
config.expGrayHighCutDict = {"g": 0.2, "r": 0.2, "i": 0.2, "z": 0.2, "y": 0.2}
config.expVarGrayPhotometricCutDict = {"g": 0.1**2.,
"r": 0.1**2.,
"i": 0.1**2.}
# For tests, make a broad cut for outliers.
"i": 0.1**2.,
"z": 0.1**2.,
"y": 0.1**2.}
config.autoPhotometricCutNSig = 3.0
config.autoHighCutNSig = 3.0
# Fit aperture corrections with only 2 bins to exercise the code.
config.aperCorrFitNBins = 0
config.aperCorrInputSlopeDict = {"g": 0.0,
"r": 0.0,
"i": 0.0}
"i": 0.0,
"z": 0.0,
"y": 0.0}
# Define the band to SED constants approximately so they work
# for data that only has r, i observations.
config.sedboundaryterms = fgcmcal.SedboundarytermDict()
config.sedboundaryterms.data["gr"] = fgcmcal.Sedboundaryterm(primary="g",
secondary="r")
config.sedboundaryterms.data["ri"] = fgcmcal.Sedboundaryterm(primary="r",
secondary="i")
config.sedboundaryterms.data["iz"] = fgcmcal.Sedboundaryterm(primary="i",
secondary="z")
config.sedboundaryterms.data["zy"] = fgcmcal.Sedboundaryterm(primary="z",
secondary="y")

config.sedterms = fgcmcal.SedtermDict()
config.sedterms.data = {
"g": fgcmcal.Sedterm(primaryTerm="gr", secondaryTerm="ri", constant=1.5),
"r": fgcmcal.Sedterm(primaryTerm="gr", secondaryTerm="ri", constant=0.9),
"i": fgcmcal.Sedterm(primaryTerm="ri", secondaryTerm="gr", constant=0.5,
extrapolated=True, primaryBand="i", secondaryBand="r", tertiaryBand="g"),
"z": fgcmcal.Sedterm(primaryTerm="iz", secondaryTerm="zy", constant=1.0),
"y": fgcmcal.Sedterm(primaryTerm="zy", secondaryTerm="iz", constant=0.25,
extrapolated=True, primaryBand="y", secondaryBand="z",
tertiaryBand="i"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do some get prim/second/ter/iaryBand entries (just curious)? Is it worth mentioning something about how the constant values are determined?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The formulae are in the appendix of the FGCM Burke et al paper, and the constants ... well, I should put my scripts somewhere, but they come from eyeballing synthetic loci actually. Things are not super sensitive to these constants (at least in any metrics that we looked at in DES)

}

# Define good stars with an r-i color cut.
Expand All @@ -58,7 +71,9 @@
config.precomputeSuperStarInitialCycle = False
config.superStarSubCcdDict = {"g": True,
"r": True,
"i": True}
"i": True,
"z": True,
"y": True}
config.superStarPlotCcdResiduals = False
# Allow calibration to work with just 1 exposure on a night.
config.minExpPerNight = 10
Expand All @@ -74,10 +89,14 @@
config.superStarSubCcdChebyshevOrder = 2
config.ccdGraySubCcdDict = {"g": True,
"r": True,
"i": True}
"i": True,
"z": True,
"y": True}
config.ccdGrayFocalPlaneDict = {"g": False,
"r": False,
"i": False}
"i": False,
"z": False,
"y": False}
config.ccdGrayFocalPlaneFitMinCcd = 1
config.ccdGrayFocalPlaneChebyshevOrder = 1
# Do not model the magnitude errors (use errors as reported).
Expand All @@ -92,13 +111,19 @@
# (Instead, use exposure repeatability metrics).
config.useRepeatabilityForExpGrayCutsDict = {"g": False,
"r": False,
"i": False}
"i": False,
"z": False,
"y": False}
config.sigFgcmMaxEGrayDict = {"g": 0.1,
"r": 0.1,
"i": 0.1}
"i": 0.1,
"z": 0.1,
"y": 0.1}
config.approxThroughputDict = {"g": 1.0,
"r": 1.0,
"i": 1.0}
"i": 1.0,
"z": 1.0,
"y": 1.0}

config.deltaAperFitPerCcdNx = 2
config.deltaAperFitPerCcdNy = 2
Expand Down