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-38632: Update LATISS and ComCamSim configurations for compensated tophat calibration fluxes. #536

Merged
merged 6 commits into from
Jun 19, 2024
2 changes: 0 additions & 2 deletions config/comCamSim/fgcmBuildFromIsolatedStars.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

configDir = os.path.join(os.path.dirname(__file__))
config.physicalFilterMap = physical_to_band
config.doSubtractLocalBackground = True
config.sourceSelector["science"].flags.bad.append("localBackground_flag")
config.fgcmLoadReferenceCatalog.filterMap = {
"g": "lsst_g",
"r": "lsst_r",
Expand Down
3 changes: 3 additions & 0 deletions config/latiss/calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,8 @@
config.measurement.plugins["base_Jacobian"].pixelScale = 0.1

# Set the default aperture as appropriate for the LATISS plate scale.
config.measurement.algorithms["base_CompensatedTophatFlux"].apertures = [35]
config.normalizedCalibrationFlux.raw_calibflux_name = "base_CompensatedTophatFlux_35"

config.measurement.slots.apFlux='base_CircularApertureFlux_35_0'
config.measurement.slots.calibFlux='base_CircularApertureFlux_35_0'
12 changes: 10 additions & 2 deletions config/latiss/characterizeImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,13 @@
config.measurement.plugins["base_Jacobian"].pixelScale = 0.1

# Set the default aperture as appropriate for the LATISS plate scale.
config.measurement.slots.apFlux='base_CircularApertureFlux_35_0'
config.measurement.slots.calibFlux='base_CircularApertureFlux_35_0'
config.measurement.algorithms["base_CompensatedTophatFlux"].apertures = [35]
config.normalizedCalibrationFlux.raw_calibflux_name = "base_CompensatedTophatFlux_35"
config.normalizedCalibrationFlux.measure_ap_corr.refFluxName = "base_CircularApertureFlux_35_0"
# As above, turn off S/N cut for aperture correction source selection.
config.normalizedCalibrationFlux.measure_ap_corr.sourceSelector["science"].doSignalToNoise = False
# Put in the correct override fields in case we revisit this in the future.
config.normalizedCalibrationFlux.measure_ap_corr.sourceSelector["science"].signalToNoise.fluxField = "base_CompensatedTophatFlux_35_instFlux"
config.normalizedCalibrationFlux.measure_ap_corr.sourceSelector["science"].signalToNoise.errField = "base_CompensatedTophatFlux_35_instFluxErr"
config.measurement.slots.apFlux = "base_CircularApertureFlux_35_0"
config.measurement.slots.calibFlux = "base_CircularApertureFlux_35_0"
8 changes: 1 addition & 7 deletions config/latiss/fgcmBuildFromIsolatedStars.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,12 @@
config.minPerBand = 2
config.connections.ref_cat = "atlas_refcat2_20220201"

config.instFluxField="apFlux_35_0_instFlux"
config.sourceSelector["science"].signalToNoise.fluxField="apFlux_35_0_instFlux"

config.sourceSelector["science"].signalToNoise.errField="apFlux_35_0_instFluxErr"

config.apertureInnerInstFluxField="apFlux_35_0_instFlux"
config.apertureOuterInstFluxField="apFlux_50_0_instFlux"

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.doSubtractLocalBackground = False
config.fgcmLoadReferenceCatalog.load(os.path.join(configDir, "filterMap.py"))
config.fgcmLoadReferenceCatalog.applyColorTerms = True
config.fgcmLoadReferenceCatalog.colorterms.load(os.path.join(configDir, 'colorterms.py'))
Expand Down
25 changes: 8 additions & 17 deletions config/latiss/isolatedStarAssociation.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
# Override calibration apertures as appropriate for LATISS plate scale.
config.inst_flux_field='apFlux_35_0_instFlux'

config.extra_columns = [
'x',
'y',
'xErr',
'yErr',
'apFlux_35_0_instFlux',
'apFlux_35_0_instFluxErr',
'apFlux_35_0_flag',
'apFlux_50_0_instFlux',
'apFlux_50_0_instFluxErr',
'apFlux_50_0_flag',
'localBackground_instFlux',
'localBackground_flag',
'ixx',
'iyy',
'ixy',
]

config.source_selector['science'].flags.bad = [
'pixelFlags_edge',
'pixelFlags_interpolatedCenter',
'pixelFlags_saturatedCenter',
'pixelFlags_crCenter',
'pixelFlags_bad',
'pixelFlags_interpolated',
'pixelFlags_saturated',
'centroid_flag',
'apFlux_35_0_flag',
]

config.source_selector['science'].signalToNoise.fluxField = 'apFlux_35_0_instFlux'
config.source_selector['science'].signalToNoise.errField = 'apFlux_35_0_instFluxErr'
Loading