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-27013: Change CalibrateTask refcat defaults to Gaia DR2 for astrometry and PS1 for photometry #215

Merged
merged 1 commit into from
Apr 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 1 addition & 18 deletions config/calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,10 @@

obsConfigDir = os.path.join(os.path.dirname(__file__))

# Astrometry/Photometry
# This sets the reference catalog name for Gen2.
for refObjLoader in (config.astromRefObjLoader,
config.photoRefObjLoader,
):
refObjLoader.ref_dataset_name = "ps1_pv3_3pi_20170110"
# Note the u-band results may not be useful without a color term
refObjLoader.filterMap['u'] = 'g'
refObjLoader.filterMap['Y'] = 'y'
refObjLoader.filterMap['N419'] = 'g'
refObjLoader.filterMap['N540'] = 'g'
refObjLoader.filterMap['N708'] = 'i'
refObjLoader.filterMap['N964'] = 'z'

# This sets up the reference catalog for Gen3.
config.connections.astromRefCat = "ps1_pv3_3pi_20170110"
config.connections.photoRefCat = "ps1_pv3_3pi_20170110"
config.photoRefObjLoader.load(os.path.join(obsConfigDir, "filterMap.py"))

# Photometric calibration: use color terms
config.photoCal.applyColorTerms = True
config.photoCal.photoCatName = "ps1_pv3_3pi_20170110"
colors = config.photoCal.match.referenceSelection.colorLimits
# The following two color limits are adopted from obs_subaru for the HSC SSP survey
colors["g-r"] = ColorLimit(primary="g_flux", secondary="r_flux", minimum=0.0)
Expand Down
19 changes: 12 additions & 7 deletions config/filterMap.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Mapping of camera filter name: reference catalog filter name; each reference filter must exist in the refcat.
# Note that this does not perform any bandpass corrections: it is just a lookup.
for source, target in [
('N419', 'g'),
('N540', 'g'),
('N708', 'i'),
('N964', 'z'),
]:
config.filterMap[source] = target
# Note u-band photometry may not be useful without a color term.
config.filterMap = {'u': 'g',
'Y': 'y',
'N419': 'g',
'N540': 'g',
'N708': 'i',
'N964': 'z',
'N419': 'g',
'N540': 'g',
'N708': 'i',
'N964': 'z',
}