Skip to content

Commit

Permalink
Merge pull request #163 from lsst/tickets/DM-26007
Browse files Browse the repository at this point in the history
DM-26007: defaultFilter is not used if a filterName is given to loadSkyCircle
  • Loading branch information
parejkoj committed Aug 4, 2020
2 parents 16625d3 + d29832e commit b0260a2
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 22 deletions.
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
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

0 comments on commit b0260a2

Please sign in to comment.