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

Merge in fgcmcal config updates until w_2020_41 (October 9th, 2020) #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions config/hsc/fgcmBuildStars.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@

from lsst.utils import getPackageDir

# Demand at least 2 observations of a star to be considered for calibration
config.minPerBand = 2
# High density cut to keep high density regions from dominating statistics.
# 2000 is chosen to be reasonable for typical HSC depths
config.densityCutMaxPerPixel = 2000
# The mapping from HSC short filter name to FGCM "band". This mapping
# ensures that stars observed in HSC-R + HSC-R2 can be matched, and
# HSC-I + HSC-I2 can be matched.
config.filterMap = {'g': 'g', 'r': 'r', 'r2': 'r', 'i': 'i', 'i2': 'i',
'z': 'z', 'y': 'y',
'N387': 'N387', 'N816': 'N816', 'N921': 'N921',
Expand All @@ -16,6 +22,8 @@
config.doSubtractLocalBackground = True

config.fgcmLoadReferenceCatalog.refObjLoader.ref_dataset_name = 'ps1_pv3_3pi_20170110'
# This is the mapping from HSC short filter name to the closest PS1 filter from
# the reference catalog. PS1 does not have narrow-band filters.
config.fgcmLoadReferenceCatalog.refFilterMap = {'g': 'g', 'r': 'r', 'r2': 'r',
'i': 'i', 'i2': 'i', 'z': 'z', 'y': 'y',
'N387': 'g', 'N816': 'i', 'N921': 'z',
Expand All @@ -24,7 +32,9 @@
hscConfigDir = os.path.join(getPackageDir("obs_subaru"), "config", "hsc")
config.fgcmLoadReferenceCatalog.colorterms.load(os.path.join(hscConfigDir, 'colorterms.py'))
config.fgcmLoadReferenceCatalog.referenceSelector.doSignalToNoise = True
# Choose reference catalog signal-to-noise based on the PS1 i-band.
config.fgcmLoadReferenceCatalog.referenceSelector.signalToNoise.fluxField = 'i_flux'
config.fgcmLoadReferenceCatalog.referenceSelector.signalToNoise.errField = 'i_fluxErr'
# Minimum signal-to-noise cut for a reference star to be considered a match.
config.fgcmLoadReferenceCatalog.referenceSelector.signalToNoise.minimum = 10.0

39 changes: 39 additions & 0 deletions config/hsc/fgcmBuildStarsTable.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
"""
HSC-specific overrides for FgcmBuildStarsTable
"""

import os.path


# Demand at least 2 observations of a star to be considered for calibration
config.minPerBand = 2
# High density cut to keep high density regions from dominating statistics.
# 2000 is chosen to be reasonable for typical HSC depths
config.densityCutMaxPerPixel = 2000
# The mapping from HSC short filter name to FGCM "band". This mapping
# ensures that stars observed in HSC-R + HSC-R2 can be matched, and
# HSC-I + HSC-I2 can be matched.
config.filterMap = {'g': 'g', 'r': 'r', 'r2': 'r', 'i': 'i', 'i2': 'i',
'z': 'z', 'y': 'y',
'N387': 'N387', 'N816': 'N816', 'N921': 'N921',
'N1010': 'N1010'}
config.primaryBands = ('i', 'r', 'g', 'z', 'y', 'N387', 'N816', 'N921', 'N1010')
config.doSubtractLocalBackground = True

config.fgcmLoadReferenceCatalog.refObjLoader.ref_dataset_name = 'ps1_pv3_3pi_20170110'
# This is the mapping from HSC short filter name to the closest PS1 filter from
# the reference catalog. PS1 does not have narrow-band filters.
config.fgcmLoadReferenceCatalog.refFilterMap = {'g': 'g', 'r': 'r', 'r2': 'r',
'i': 'i', 'i2': 'i', 'z': 'z', 'y': 'y',
'N387': 'g', 'N816': 'i', 'N921': 'z',
'N1010': 'y'}
config.fgcmLoadReferenceCatalog.applyColorTerms = True
hscConfigDir = os.path.join(os.path.dirname(__file__))
config.fgcmLoadReferenceCatalog.colorterms.load(os.path.join(hscConfigDir, 'colorterms.py'))
config.fgcmLoadReferenceCatalog.referenceSelector.doSignalToNoise = True
# Choose reference catalog signal-to-noise based on the PS1 i-band.
config.fgcmLoadReferenceCatalog.referenceSelector.signalToNoise.fluxField = 'i_flux'
config.fgcmLoadReferenceCatalog.referenceSelector.signalToNoise.errField = 'i_fluxErr'
# Minimum signal-to-noise cut for a reference star to be considered a match.
config.fgcmLoadReferenceCatalog.referenceSelector.signalToNoise.minimum = 10.0

2 changes: 2 additions & 0 deletions config/hsc/fgcmCalibrateTract.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
'config',
'hsc',
'fgcmOutputProducts.py'))
# In tract mode, Do not fit aperture correction terms.
config.fgcmFitCycle.aperCorrFitNBins = 0
# In tract mode, we use "repeatability" metric for cuts for all filters.
config.fgcmFitCycle.useRepeatabilityForExpGrayCutsDict = {'N387': True,
'g': True,
'r': True,
Expand Down
20 changes: 20 additions & 0 deletions config/hsc/fgcmCalibrateTractTable.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import os.path

config.fgcmBuildStars.load(os.path.join(os.path.dirname(__file__),
'fgcmBuildStarsTable.py'))
config.fgcmFitCycle.load(os.path.join(os.path.dirname(__file__),
'fgcmFitCycle.py'))
config.fgcmOutputProducts.load(os.path.join(os.path.dirname(__file__),
'fgcmOutputProducts.py'))
# In tract mode, Do not fit aperture correction terms.
config.fgcmFitCycle.aperCorrFitNBins = 0
# In tract mode, we use "repeatability" metric for cuts for all filters.
config.fgcmFitCycle.useRepeatabilityForExpGrayCutsDict = {'N387': True,
'g': True,
'r': True,
'i': True,
'N816': True,
'z': True,
'N921': True,
'y': True,
'N1010': True}
20 changes: 20 additions & 0 deletions config/hsc/fgcmFitCycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
config.colorSplitBands = ['g', 'i']
config.freezeStdAtmosphere = True
config.precomputeSuperStarInitialCycle = True
# The shallow narrow-band filters (N387, N1010) do not get
# reliable fits for the super-star flat (illumination correction)
# on a per-ccd level.
config.superStarSubCcdDict = {'N387': False,
'g': True,
'r': True,
Expand All @@ -64,6 +67,8 @@
'y': True,
'N1010': False}
config.superStarSubCcdChebyshevOrder = 2
# The shallow narrow-band filters (N387, N1010) do not get
# reliable fits for the per-ccd gray correction.
config.ccdGraySubCcdDict = {'N387': False,
'g': True,
'r': True,
Expand All @@ -73,6 +78,21 @@
'N921': True,
'y': True,
'N1010': False}
# All the filters, including the shallow narrow-band filters,
# can be fit per-visit for the full focal plane, improving
# ccd-to-ccd continuity.
config.ccdGrayFocalPlaneDict = {'N387': True,
'g': True,
'r': True,
'i': True,
'N816': True,
'z': True,
'N921': True,
'y': True,
'N1010': True}
# Only do the full focal plane fitting if over 50% of the focal plane
# is covered on a given visit
config.ccdGrayFocalPlaneFitMinCcd = 50
config.instrumentParsPerBand = True
config.minStarPerExp = 100
config.expVarGrayPhotometricCutDict = {'N387': 0.05,
Expand Down