-
Notifications
You must be signed in to change notification settings - Fork 4
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-39592: Add support for Auxtel/LATISS and add associated tests. #112
Changes from 1 commit
10a7cd9
1d3d80b
790ad63
3763a04
ef0fe26
eead982
37724b0
a0c0181
30219cd
1fed342
18ff5a6
d0c4d2d
742f288
636e2fa
872678b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import os | ||
from lsst.obs.lsst.filters import LATISS_FILTER_DEFINITIONS | ||
|
||
# The filterMap and bands are for the small subset of bands used in the tests | ||
config.physicalFilterMap = { | ||
'SDSSg_65mm~empty': 'g', | ||
'SDSSr_65mm~empty': 'r', | ||
'SDSSi_65mm~empty': 'i', | ||
} | ||
config.requiredBands = ['g', 'r'] | ||
config.primaryBands = ['r'] | ||
# The coarseNside is set appropriate to the area of the test data | ||
config.coarseNside = 64 | ||
# The tests are done with only the brightest reference stars | ||
config.fgcmLoadReferenceCatalog.referenceSelector.signalToNoise.minimum = 50.0 | ||
|
||
config.instFluxField = 'apFlux_35_0_instFlux' | ||
config.apertureInnerInstFluxField = 'apFlux_35_0_instFlux' | ||
config.apertureOuterInstFluxField = 'apFlux_50_0_instFlux' | ||
|
||
config.minPerBand = 2 | ||
config.connections.ref_cat = "atlas_refcat2_20220201" | ||
|
||
configDir = os.path.join(os.path.dirname(__file__)) | ||
config.physicalFilterMap = LATISS_FILTER_DEFINITIONS.physical_to_band | ||
config.doSubtractLocalBackground = True | ||
config.sourceSelector["science"].flags.bad.append("localBackground_flag") | ||
config.sourceSelector["science"].signalToNoise.fluxField = "apFlux_35_0_instFlux" | ||
config.sourceSelector["science"].signalToNoise.errField = "apFlux_35_0_instFluxErr" | ||
config.fgcmLoadReferenceCatalog.load(os.path.join(configDir, 'filterMapLatiss.py')) | ||
config.fgcmLoadReferenceCatalog.applyColorTerms = False | ||
config.fgcmLoadReferenceCatalog.referenceSelector.doSignalToNoise = True | ||
config.fgcmLoadReferenceCatalog.referenceSelector.signalToNoise.fluxField = 'i_flux' | ||
config.fgcmLoadReferenceCatalog.referenceSelector.signalToNoise.errField = 'i_fluxErr' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New file...mixes single/double quotes. Also, just checking if you still want this to be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the selection on the reference catalog, and it's what we use in the regular data for the ATLAS Refcat2, so I think that the answer is yes. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
import lsst.fgcmcal as fgcmcal | ||
|
||
config.outfileBase = 'TestFgcm' | ||
# Use these bands and fit them. | ||
# g band does not have any observations in tests, this ensures | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this true? |
||
# that the code performs properly when there are missing bands. | ||
config.bands = ['g', 'r', 'i'] | ||
config.fitBands = ['g', 'r', 'i'] | ||
from lsst.obs.lsst.filters import LATISS_FILTER_DEFINITIONS | ||
config.physicalFilterMap = LATISS_FILTER_DEFINITIONS.physical_to_band | ||
# Only require r, i observations for a star to be a calibration star. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "r, i" -> "g, r"? |
||
config.requiredBands = ['g', 'r'] | ||
# Do 5 iterations in multi-cycle run mode. | ||
config.maxIterBeforeFinalCycle = 5 | ||
config.nCore = 1 | ||
config.cycleNumber = 0 | ||
config.utBoundary = 0.0 | ||
config.washMjds = (0.0, ) | ||
# For tests, define 1 observing epoch that encompasses everything. | ||
config.epochMjds = (0.0, 100000.0) | ||
config.coatingMjds = [] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hhmmm...how does this differ from the default of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You really want to define the start and end points, and it logs a warning if you don't; I have the default be something that should be overridden. |
||
config.latitude = -30.2333 | ||
# This is pi*(1.2/2.)**2. | ||
config.mirrorArea = 1.13097 | ||
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.expVarGrayPhotometricCutDict = {'g': 0.1**2., | ||
'r': 0.1**2., | ||
'i': 0.1**2.} | ||
# For tests, make a broad cut for outliers. | ||
config.autoPhotometricCutNSig = 5.0 | ||
config.autoHighCutNSig = 5.0 | ||
# Fit aperture corrections with only 2 bins to exercise the code. | ||
config.aperCorrFitNBins = 2 | ||
config.aperCorrInputSlopeDict = {'g': -1.0, | ||
'r': -1.0, | ||
'i': -1.0} | ||
# Define the band to SED constants approximately so they work | ||
# for data that only has r, i observations. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "r, i" -> "g, r"? |
||
config.sedboundaryterms = fgcmcal.SedboundarytermDict() | ||
config.sedboundaryterms.data['gr'] = fgcmcal.Sedboundaryterm(primary='g', | ||
secondary='r') | ||
config.sedterms = fgcmcal.SedtermDict() | ||
config.sedterms.data['g'] = fgcmcal.Sedterm(primaryTerm='gr', secondaryTerm=None, | ||
extrapolated=False, constant=0.0) | ||
config.sedterms.data['r'] = fgcmcal.Sedterm(primaryTerm='gr', secondaryTerm=None, | ||
extrapolated=False, constant=1.0) | ||
config.sedterms.data['i'] = fgcmcal.Sedterm(primaryTerm='gr', secondaryTerm=None, | ||
extrapolated=False, constant=0.75) | ||
# Define good stars with an r-i color cut. | ||
config.starColorCuts = ('g,r,-0.50,2.25',) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Spaces after commas (as below). I see |
||
config.refStarColorCuts = ('g, r, -0.50, 2.25',) | ||
config.useExposureReferenceOffset = True | ||
config.precomputeSuperStarInitialCycle = False | ||
config.superStarSubCcdDict = {'g': True, | ||
'r': True, | ||
'i': True} | ||
config.superStarPlotCcdResiduals = True | ||
# Allow calibration to work with just 1 exposure on a night. | ||
config.minExpPerNight = 1 | ||
# Allow calibration to work with very few stars per exposure. | ||
config.minStarPerExp = 5 | ||
# Allow calibration to work with small number of stars in processing batches. | ||
config.nStarPerRun = 50 | ||
config.nExpPerRun = 2 | ||
# Define r-i color as the primary way to split by color. | ||
config.colorSplitBands = ['g', 'r'] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see |
||
config.freezeStdAtmosphere = True | ||
# For tests, do low-order per-ccd polynomial. | ||
config.superStarSubCcdChebyshevOrder = 1 | ||
config.ccdGraySubCcdDict = {'g': False, | ||
'r': False, | ||
'i': False} | ||
config.ccdGrayFocalPlaneDict = {'g': False, | ||
'r': False, | ||
'i': False} | ||
config.ccdGrayFocalPlaneFitMinCcd = 1 | ||
config.ccdGrayFocalPlaneChebyshevOrder = 1 | ||
# Do not model the magnitude errors (use errors as reported). | ||
config.modelMagErrors = False | ||
# Fix the sigma_cal calibration noise to 0.003 mag. | ||
config.sigmaCalRange = (0.003, 0.003) | ||
# Do not fit instrumental parameters (mirror decay) per band. | ||
config.instrumentParsPerBand = False | ||
# Set the random seed for repeatability in fits. | ||
config.randomSeed = 12345 | ||
# Do not use star repeatability metrics for selecting exposures. | ||
# (Instead, use exposure repeatability metrics). | ||
config.useRepeatabilityForExpGrayCutsDict = {'g': False, | ||
'r': False, | ||
'i': False} | ||
config.sigFgcmMaxEGrayDict = {'g': 0.1, | ||
'r': 0.1, | ||
'i': 0.1} | ||
config.approxThroughputDict = {'g': 1.0, | ||
'r': 1.0, | ||
'i': 1.0} | ||
|
||
config.deltaAperFitPerCcdNx = 2 | ||
config.deltaAperFitPerCcdNy = 2 | ||
config.deltaAperInnerRadiusArcsec = 2.04 | ||
config.deltaAperOuterRadiusArcsec = 2.89 | ||
config.doComputeDeltaAperPerVisit = True | ||
config.doComputeDeltaAperMap = True | ||
config.doComputeDeltaAperPerCcd = True |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
config.physicalFilters = ['SDSSg_65mm~empty', 'SDSSr_65mm~empty', 'SDSSi_65mm~empty'] | ||
config.atmosphereTableName = 'fgcm_atm_lsst2_test' | ||
|
||
config.filterTransmissionIsUnbounded = False | ||
config.opticsTransmissionIsUnbounded = False | ||
config.sensorTransmissionIsUnbounded = False | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could just leave these out now? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import os.path | ||
|
||
|
||
config.connections.cycleNumber = 2 | ||
|
||
config.doReferenceCalibration = True | ||
config.referencePixelizationMinStars = 20 | ||
config.referenceMinMatch = 15 | ||
|
||
from lsst.obs.lsst.filters import LATISS_FILTER_DEFINITIONS | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you not use this (rather than set explicitly below)? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I only want to define the set of filters that we're using, rather than all possible filters. |
||
|
||
config.physicalFilterMap = { | ||
'SDSSg_65mm~empty': 'g', | ||
'SDSSr_65mm~empty': 'r', | ||
'SDSSi_65mm~empty': 'i', | ||
} | ||
|
||
config.photoCal.applyColorTerms = False | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you turn this on now (as of DM-40556)? |
||
config.photoCal.photoCatName = 'atlas_refcat2_20220201' | ||
|
||
config.connections.refCat = 'atlas_refcat2_20220201' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
for source, target in [ | ||
("SDSSg_65mm~empty", "g"), | ||
("SDSSr_65mm~empty", "r"), | ||
("SDSSi_65mm~empty", "i"), | ||
]: | ||
config.filterMap[source] = target |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
description: Build fgcm input stars | ||
instrument: lsst.obs.lsst.Latiss | ||
tasks: | ||
fgcmBuildFromIsolatedStars: | ||
class: lsst.fgcmcal.fgcmBuildFromIsolatedStars.FgcmBuildFromIsolatedStarsTask |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
description: Perform an fgcmcal fit cycle | ||
instrument: lsst.obs.lsst.Latiss | ||
tasks: | ||
fgcmFitCycle: | ||
class: lsst.fgcmcal.fgcmFitCycle.FgcmFitCycleTask |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
description: Full fgcmcal pipeline | ||
instrument: lsst.obs.lsst.Latiss | ||
tasks: | ||
fgcmBuildFromIsolatedStars: | ||
class: lsst.fgcmcal.fgcmBuildFromIsolatedStars.FgcmBuildFromIsolatedStarsTask | ||
fgcmFitCycle: | ||
class: lsst.fgcmcal.fgcmFitCycle.FgcmFitCycleTask | ||
config: | ||
doMultipleCycles: true | ||
multipleCyclesFinalCycleNumber: 2 | ||
fgcmOutputProducts: | ||
class: lsst.fgcmcal.fgcmOutputProducts.FgcmOutputProductsTask |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
description: Make fgcmcal look-up table | ||
instrument: lsst.obs.lsst.Latiss | ||
tasks: | ||
fgcmMakeLut: lsst.fgcmcal.fgcmMakeLut.FgcmMakeLutTask |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
description: Output fgcmcal products | ||
instrument: lsst.obs.lsst.Latiss | ||
tasks: | ||
fgcmOutputProducts: | ||
class: lsst.fgcmcal.fgcmOutputProducts.FgcmOutputProductsTask | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like all these pipelines differ from the HSC versions only by the imported There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe when I add a third test camera, but with 2 it's definitely not worth it (yet) to make a whole new directory structure just for test configs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be set to
True
as of DM-40556?