Skip to content

Commit

Permalink
Replace short filter names with physical filter names
Browse files Browse the repository at this point in the history
  • Loading branch information
erykoff committed Feb 1, 2021
1 parent d9fd864 commit f826fde
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 24 deletions.
14 changes: 6 additions & 8 deletions config/fgcmBuildStars.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,18 @@
# 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'}
from lsst.obs.hsc.hscFilters import HSC_FILTER_DEFINITIONS
config.physicalFilterMap = HSC_FILTER_DEFINITIONS.physical_to_band
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.refFilterMap = {'HSC-G': 'g', 'HSC-R': 'r', 'HSC-R2': 'r2',
'HSC-I': 'i', 'HSC-I2': 'i', 'HSC-Z': 'z',
'HSC-Y': 'y', 'NB0387': 'g', 'NB0816': 'i',
'NB0921': 'z', 'NB1010': 'y'}
config.fgcmLoadReferenceCatalog.applyColorTerms = True
hscConfigDir = os.path.join(os.path.dirname(__file__))
config.fgcmLoadReferenceCatalog.colorterms.load(os.path.join(hscConfigDir, 'colorterms.py'))
Expand Down
14 changes: 6 additions & 8 deletions config/fgcmBuildStarsTable.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,18 @@
# 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'}
from lsst.obs.hsc.hscFilters import HSC_FILTER_DEFINITIONS
config.physicalFilterMap = HSC_FILTER_DEFINITIONS.physical_to_band
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.refFilterMap = {'HSC-G': 'g', 'HSC-R': 'r', 'HSC-R2': 'r2',
'HSC-I': 'i', 'HSC-I2': 'i', 'HSC-Z': 'z',
'HSC-Y': 'y', 'NB0387': 'g', 'NB0816': 'i',
'NB0921': 'z', 'NB1010': 'y'}
config.fgcmLoadReferenceCatalog.applyColorTerms = True
hscConfigDir = os.path.join(os.path.dirname(__file__))
config.fgcmLoadReferenceCatalog.colorterms.load(os.path.join(hscConfigDir, 'colorterms.py'))
Expand Down
6 changes: 2 additions & 4 deletions config/fgcmFitCycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
config.outfileBase = 'fgcmHscCalibrations'
config.bands = ['N387', 'g', 'r', 'i', 'N816', 'z', 'N921', 'y', 'N1010']
config.fitBands = ['N387', 'g', 'r', 'i', 'N816', 'z', 'N921', 'y', 'N1010']
config.filterMap = {'g': 'g', 'r': 'r', 'r2': 'r', 'i': 'i', 'i2': 'i',
'z': 'z', 'y': 'y',
'N387': 'N387', 'N816': 'N816', 'N921': 'N921',
'N1010': 'N1010'}
from lsst.obs.hsc.hscFilters import HSC_FILTER_DEFINITIONS
config.physicalFilterMap = HSC_FILTER_DEFINITIONS.physical_to_band
config.maxIterBeforeFinalCycle = 75
config.nCore = 4
config.cycleNumber = 0
Expand Down
10 changes: 6 additions & 4 deletions config/fgcmMakeLut.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Filter names to build LUT ('short' names)
config.filterNames = ('g', 'r', 'r2', 'i', 'i2', 'z', 'y',
'N387', 'N816', 'N921', 'N1010')
config.physicalFilters = ('HSC-G', 'HSC-R', 'HSC-R2', 'HSC-I', 'HSC-I2',

This comment has been minimized.

Copy link
@timj

timj Feb 1, 2021

Member

Can't you get this from the keys of physical_to_band?

This comment has been minimized.

Copy link
@erykoff

erykoff Feb 1, 2021

Author Contributor

So this needs to be matched 1-1 with the stdPhysicalFilters so I can't rely on what's stored or you might get things mixed up.

This comment has been minimized.

Copy link
@erykoff

erykoff Feb 1, 2021

Author Contributor

Though this could/should be a dict. I didn't make this a dict before because I didn't want to deprecate where it wasn't needed, but I'm deprecating now, so I'll do that.

'HSC-Z', 'HSC-Y',
'NB0387', 'NB0816', 'NB0921', 'NB1010')

# Standard filterNames ('short' names)
# These settings will put both "r" and "r2" filters on the
# "r2" standard, and similar for "i" and "i2".
config.stdFilterNames = ('g', 'r2', 'r2', 'i2', 'i2', 'z', 'y',
'N387', 'N816', 'N921', 'N1010')
config.stdPhysicalFilters = ('HSC-G', 'HSC-R2', 'HSC-R2', 'HSC-I2', 'HSC-I2',
'HSC-Z', 'HSC-Y',
'NB0387', 'NB0816', 'NB0921', 'NB1010')

# FGCM name or filename of precomputed atmospheres
config.atmosphereTableName = 'fgcm_atm_subaru3'
Expand Down

0 comments on commit f826fde

Please sign in to comment.