51 lutFilterNames, tract=
None):
53 Make the FGCM fit cycle configuration dict
57 config: `lsst.fgcmcal.FgcmFitCycleConfig`
61 camera: `lsst.afw.cameraGeom.Camera`
62 Camera from the butler
64 Maximum number of iterations
65 resetFitParameters: `bool`
66 Reset fit parameters before fitting?
67 outputZeropoints: `bool`
68 Compute zeropoints for output?
69 lutFilterNames : array-like, `str`
70 Array of physical filter names in the LUT.
71 tract: `int`, optional
72 Tract number for extending the output file name for debugging.
78 Configuration dictionary for fgcm
81 notFitBands = [b
for b
in config.bands
if b
not in config.fitBands]
85 for ccut
in config.starColorCuts:
86 parts = ccut.split(
',')
87 starColorCutList.append([parts[0], parts[1], float(parts[2]), float(parts[3])])
92 mirrorArea = np.pi*(camera.telescopeDiameter*100./2.)**2.
95 gains = [amp.getGain()
for detector
in camera
for amp
in detector.getAmplifiers()]
96 cameraGain = float(np.median(gains))
99 filterToBand = {filterName: config.physicalFilterMap[filterName]
for
100 filterName
in lutFilterNames}
103 outfileBase = config.outfileBase
105 outfileBase =
'%s-%06d' % (config.outfileBase, tract)
108 configDict = {
'outfileBase': outfileBase,
110 'exposureFile':
None,
114 'mirrorArea': mirrorArea,
115 'cameraGain': cameraGain,
116 'ccdStartIndex': camera[0].getId(),
117 'expField': FGCM_EXP_FIELD,
118 'ccdField': FGCM_CCD_FIELD,
119 'seeingField':
'DELTA_APER',
120 'fwhmField':
'PSFSIGMA',
121 'skyBrightnessField':
'SKYBACKGROUND',
122 'deepFlag':
'DEEPFLAG',
123 'bands':
list(config.bands),
124 'fitBands':
list(config.fitBands),
125 'notFitBands': notFitBands,
126 'requiredBands':
list(config.requiredBands),
127 'filterToBand': filterToBand,
129 'nCore': config.nCore,
130 'nStarPerRun': config.nStarPerRun,
131 'nExpPerRun': config.nExpPerRun,
132 'reserveFraction': config.reserveFraction,
133 'freezeStdAtmosphere': config.freezeStdAtmosphere,
134 'precomputeSuperStarInitialCycle': config.precomputeSuperStarInitialCycle,
135 'superStarSubCCDDict': dict(config.superStarSubCcdDict),
136 'superStarSubCCDChebyshevOrder': config.superStarSubCcdChebyshevOrder,
137 'superStarSubCCDTriangular': config.superStarSubCcdTriangular,
138 'superStarSigmaClip': config.superStarSigmaClip,
139 'focalPlaneSigmaClip': config.focalPlaneSigmaClip,
140 'ccdGraySubCCDDict': dict(config.ccdGraySubCcdDict),
141 'ccdGraySubCCDChebyshevOrder': config.ccdGraySubCcdChebyshevOrder,
142 'ccdGraySubCCDTriangular': config.ccdGraySubCcdTriangular,
143 'ccdGrayFocalPlaneDict': dict(config.ccdGrayFocalPlaneDict),
144 'ccdGrayFocalPlaneChebyshevOrder': config.ccdGrayFocalPlaneChebyshevOrder,
145 'ccdGrayFocalPlaneFitMinCcd': config.ccdGrayFocalPlaneFitMinCcd,
146 'cycleNumber': config.cycleNumber,
148 'deltaMagBkgOffsetPercentile': config.deltaMagBkgOffsetPercentile,
149 'deltaMagBkgPerCcd': config.deltaMagBkgPerCcd,
150 'UTBoundary': config.utBoundary,
151 'washMJDs': config.washMjds,
152 'epochMJDs': config.epochMjds,
153 'coatingMJDs': config.coatingMjds,
154 'minObsPerBand': config.minObsPerBand,
155 'latitude': config.latitude,
156 'brightObsGrayMax': config.brightObsGrayMax,
157 'minStarPerCCD': config.minStarPerCcd,
158 'minCCDPerExp': config.minCcdPerExp,
159 'maxCCDGrayErr': config.maxCcdGrayErr,
160 'minStarPerExp': config.minStarPerExp,
161 'minExpPerNight': config.minExpPerNight,
162 'expGrayInitialCut': config.expGrayInitialCut,
163 'expGrayPhotometricCutDict': dict(config.expGrayPhotometricCutDict),
164 'expGrayHighCutDict': dict(config.expGrayHighCutDict),
165 'expGrayRecoverCut': config.expGrayRecoverCut,
166 'expVarGrayPhotometricCutDict': dict(config.expVarGrayPhotometricCutDict),
167 'expGrayErrRecoverCut': config.expGrayErrRecoverCut,
168 'refStarSnMin': config.refStarSnMin,
169 'refStarOutlierNSig': config.refStarOutlierNSig,
170 'applyRefStarColorCuts': config.applyRefStarColorCuts,
171 'illegalValue': FGCM_ILLEGAL_VALUE,
172 'starColorCuts': starColorCutList,
173 'aperCorrFitNBins': config.aperCorrFitNBins,
174 'aperCorrInputSlopeDict': dict(config.aperCorrInputSlopeDict),
175 'sedBoundaryTermDict': config.sedboundaryterms.toDict()[
'data'],
176 'sedTermDict': config.sedterms.toDict()[
'data'],
177 'colorSplitBands':
list(config.colorSplitBands),
178 'sigFgcmMaxErr': config.sigFgcmMaxErr,
179 'sigFgcmMaxEGrayDict': dict(config.sigFgcmMaxEGrayDict),
180 'ccdGrayMaxStarErr': config.ccdGrayMaxStarErr,
181 'approxThroughputDict': dict(config.approxThroughputDict),
182 'sigmaCalRange':
list(config.sigmaCalRange),
183 'sigmaCalFitPercentile':
list(config.sigmaCalFitPercentile),
184 'sigmaCalPlotPercentile':
list(config.sigmaCalPlotPercentile),
185 'sigma0Phot': config.sigma0Phot,
186 'mapLongitudeRef': config.mapLongitudeRef,
187 'mapNSide': config.mapNSide,
190 'useRetrievedPwv':
False,
191 'useNightlyRetrievedPwv':
False,
192 'pwvRetrievalSmoothBlock': 25,
193 'useQuadraticPwv': config.useQuadraticPwv,
194 'useRetrievedTauInit':
False,
195 'tauRetrievalMinCCDPerNight': 500,
196 'modelMagErrors': config.modelMagErrors,
197 'instrumentParsPerBand': config.instrumentParsPerBand,
198 'instrumentSlopeMinDeltaT': config.instrumentSlopeMinDeltaT,
199 'fitMirrorChromaticity': config.fitMirrorChromaticity,
200 'useRepeatabilityForExpGrayCutsDict': dict(config.useRepeatabilityForExpGrayCutsDict),
201 'autoPhotometricCutNSig': config.autoPhotometricCutNSig,
202 'autoHighCutNSig': config.autoHighCutNSig,
204 'quietMode': config.quietMode,
205 'randomSeed': config.randomSeed,
206 'outputStars':
False,
207 'outputPath': os.path.abspath(
'.'),
210 'resetParameters': resetFitParameters,
211 'doPlots': config.doPlots,
212 'outputFgcmcalZpts':
True,
213 'outputZeropoints': outputZeropoints}
daf::base::PropertyList * list