Skip to content

Commit

Permalink
Merge pull request #494 from lsst/tickets/DM-42115
Browse files Browse the repository at this point in the history
DM-42115: Add z, y to fgcmcal LATISS config and fix minimum number of detectors for "good" visits
  • Loading branch information
erykoff committed Dec 13, 2023
2 parents e26be92 + 3602c0d commit 4143137
Showing 1 changed file with 40 additions and 15 deletions.
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"),
}

# 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

0 comments on commit 4143137

Please sign in to comment.