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-26007: defaultFilter is not used if a filterName is given to loadSkyCircle #163

Merged
merged 3 commits into from
Aug 4, 2020
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
7 changes: 1 addition & 6 deletions python/lsst/jointcal/jointcal.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,12 +375,7 @@ def setDefaults(self):
# PS1-DR1 for photometry, with a reasonable initial filterMap.
self.astrometryRefObjLoader.ref_dataset_name = "gaia_dr2_20200414"
self.astrometryRefObjLoader.requireProperMotion = True
self.astrometryRefObjLoader.filterMap = {'u': 'phot_g_mean',
'g': 'phot_g_mean',
'r': 'phot_g_mean',
'i': 'phot_g_mean',
'z': 'phot_g_mean',
'y': 'phot_g_mean'}
self.astrometryRefObjLoader.anyFilterMapsToThis = 'phot_g_mean'
self.photometryRefObjLoader.ref_dataset_name = "ps1_pv3_3pi_20170110"


Expand Down
7 changes: 5 additions & 2 deletions tests/config/astrometryReferenceErr-None-config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# To test that jointcal fails when loading a refcat without coordinate errors
# and with no "artificial error" suplied.
# We have to use the sdss refcat, as gaia supplies coord errors.
# We have to use the sdss refcat, as gaia includes coord errors; this tests
# how jointcal handles the case where there is no coord error in the refcat
# and no `astrometryReferenceErr` is supplied (should get a useful error message).
config.astrometryRefObjLoader.ref_dataset_name = "sdss-dr9-fink-v5b"
config.astrometryRefObjLoader.filterMap = {}
# jointcal overrides the refcat loader default for gaia, so we have to clear it for SDSS
config.astrometryRefObjLoader.anyFilterMapsToThis = None
parejkoj marked this conversation as resolved.
Show resolved Hide resolved
config.astrometryReferenceErr = None
7 changes: 2 additions & 5 deletions tests/config/hsc-config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

# Use Gaia-DR2 for astrometry (override HSC jointcal defaults, which are PS1 for both)
config.astrometryRefObjLoader.ref_dataset_name = "gaia_dr2_20200414"
config.astrometryRefObjLoader.filterMap = {"u": "phot_g_mean",
"g": "phot_g_mean",
"r": "phot_g_mean",
"i": "phot_g_mean",
"z": "phot_g_mean"}
config.astrometryRefObjLoader.filterMap = {}
config.astrometryRefObjLoader.anyFilterMapsToThis = 'phot_g_mean'
config.astrometryReferenceErr = None
8 changes: 0 additions & 8 deletions tests/config/hsc-gaia-config.py

This file was deleted.

2 changes: 1 addition & 1 deletion tests/test_jointcal_hsc.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def test_jointcalTask_2_visits_simpleMagnitude_colorterms_no_library(self):
with self.assertRaises(lsst.pex.config.FieldValidationError):
self._testJointcalTask(2, None, None, pa1)

def testJointcalTask_2_visits_simple_astrometry_no_photometry(self):
def test_JointcalTask_2_visits_simple_astrometry_no_photometry(self):
"""Test turning off fitting photometry."""
metrics = {'collected_astrometry_refStars': 568,
'selected_astrometry_refStars': 137,
Expand Down