Skip to content

Commit

Permalink
Update configs to use new dict-mapping format.
Browse files Browse the repository at this point in the history
List configs that depended on band order have been deprecated in favor of dict
mappings which are less susceptible to index errors.
  • Loading branch information
erykoff committed Mar 3, 2020
1 parent 72774ba commit d2dda59
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 18 deletions.
9 changes: 9 additions & 0 deletions config/hsc/fgcmCalibrateTract.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,12 @@
'hsc',
'fgcmOutputProducts.py'))
config.fgcmFitCycle.aperCorrFitNBins = 0
config.fgcmFitCycle.useRepeatabilityForExpGrayCutsDict = {'N387': True,
'g': True,
'r': True,
'i': True,
'N816': True,
'z': True,
'N921': True,
'y': True,
'N1010': True}
96 changes: 78 additions & 18 deletions config/hsc/fgcmFitCycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
from lsst.fgcmcal import Sedterm, Sedboundaryterm

config.outfileBase = 'fgcmHscCalibrations'
config.bands = ('N387', 'g', 'r', 'i', 'N816', 'z', 'N921', 'y')
config.fitFlag = (1, 1, 1, 1, 1, 1, 1, 1)
config.requiredFlag = (0, 0, 0, 0, 0, 0, 0, 0)
config.bands = ('N387', 'g', 'r', 'i', 'N816', 'z', 'N921', 'y', 'N1010')
config.fitBands = ['N387', 'g', 'r', 'i', 'N816', 'z', 'N921', 'y', 'N1010']
config.requiredBands = []
config.filterMap = {'g': 'g', 'r': 'r', 'r2': 'r', 'i': 'i', 'i2': 'i',
'z': 'z', 'y': 'y',
'N387': 'N387', 'N816': 'N816', 'N921': 'N921'}
'N387': 'N387', 'N816': 'N816', 'N921': 'N921',
'N1010': 'N1010'}
config.maxIterBeforeFinalCycle = 75
config.nCore = 4
config.cycleNumber = 0
Expand All @@ -19,27 +20,90 @@
config.epochMjds = (56650., 57420., 57606., 59000.)
config.coatingMjds = (56650.0, 58050.0)
config.latitude = 19.8256
config.expGrayPhotometricCut = (-0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05)
config.expGrayHighCut = (0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2)
config.expGrayPhotometricCutDict = {'N387': -0.05,
'g': -0.05,
'r': -0.05,
'i': -0.05,
'N816': -0.05,
'z': -0.05,
'N921': -0.05,
'y': -0.05,
'N1010': -0.05}
config.expGrayHighCutDict = {'N387': 0.2,
'g': 0.2,
'r': 0.2,
'i': 0.2,
'N816': 0.2,
'z': 0.2,
'N921': 0.2,
'y': 0.2,
'N1010': 0.2}
config.aperCorrFitNBins = 10
config.aperCorrInputSlopes = (-1.0, -1.1579, -1.3908, -1.1436, -1.8149,
-1.6974, -1.3310, -1.2057)
config.aperCorrInputSlopeDict = {'N387': -1.0,
'g': -1.1579,
'r': -1.3908,
'i': -1.1436,
'N816': -1.8149,
'z': -1.6974,
'N921': -1.3310,
'y': -1.2057,
'N1010': -1.0}
config.starColorCuts = ('g,r,-0.25,2.25',
'r,i,-0.50,2.25',
'i,z,-0.50,1.00',
'g,i,0.0,3.5')
config.colorSplitIndices = (1, 3)
config.colorSplitBands = ['g', 'i']
config.freezeStdAtmosphere = True
config.precomputeSuperStarInitialCycle = True
config.superStarSubCcdDict = {'N387': False,
'g': True,
'r': True,
'i': True,
'N816': True,
'z': True,
'N921': True,
'y': True,
'N1010': False}
config.superStarSubCcdChebyshevOrder = 2
config.ccdGraySubCcd = True
config.ccdGraySubCcdDict = {'N387': False,
'g': True,
'r': True,
'i': True,
'N816': True,
'z': True,
'N921': True,
'y': True,
'N1010': False}
config.instrumentParsPerBand = True
config.minStarPerExp = 100
config.expVarGrayPhotometricCut = 0.0025
config.expVarGrayPhotometricCutDict = {'N387': 0.05,
'g': 0.0025,
'r': 0.0025,
'i': 0.0025,
'N816': 0.05,
'z': 0.0025,
'N921': 0.05,
'y': 0.0025,
'N1010': 0.05}
config.minExpPerNight = 3

config.useRepeatabilityForExpGrayCuts = (False, False, False, False, False, True, True, True)
config.sigFgcmMaxEGray = (0.05, 0.05, 0.05, 0.05, 0.05, 0.15, 0.15, 0.15)
config.useRepeatabilityForExpGrayCutsDict = {'N387': True,
'g': False,
'r': False,
'i': False,
'N816': True,
'z': False,
'N921': True,
'y': False,
'N1010': True}
config.sigFgcmMaxEGrayDict = {'N387': 0.15,
'g': 0.05,
'r': 0.05,
'i': 0.05,
'N816': 0.15,
'z': 0.05,
'N921': 0.15,
'y': 0.05,
'N1010': 0.15}

from lsst.fgcmcal import Sedterm, Sedboundaryterm
config.sedboundaryterms.data = {'gr': Sedboundaryterm(primary='g', secondary='r'),
Expand All @@ -59,7 +123,3 @@
'N387': Sedterm(primaryTerm='N387g', constant=1.0),
'N816': Sedterm(primaryTerm='N816i', constant=1.0),
'N921': Sedterm(primaryTerm='N921z', constant=1.0)}




0 comments on commit d2dda59

Please sign in to comment.