Skip to content

Commit

Permalink
DM-46272 prep: don't force astrometry failures
Browse files Browse the repository at this point in the history
Until we've fully figured out how to handle partial outputs in DRP
tasks downstream of calibrateImage, we can't use this to test failed
astrometry.
  • Loading branch information
parejkoj authored and TallJimbo committed Nov 7, 2024
1 parent 86d5e11 commit 957eda2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 3 additions & 1 deletion bin/pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,14 @@ HIPS_QGRAPH_FILE=$(mktemp)_hips.qgraph
trap 'rm -f $QGRAPH_FILE $INJECTION_QGRAPH_FILE $RESOURCE_USAGE_QGRAPH_FILE \
$HIPS_QGRAPH_FILE' EXIT

# DM-46272: Change maxMeanDistanceArcsec to something smaller, so that it fails;
# even better, move those settings into DRP-ci_hsc.yaml!
pipetask --long-log --log-level="$loglevel" qgraph \
-d "skymap='discrete/ci_hsc' AND tract=0 AND patch=69" \
-b "$repo"/butler.yaml \
--input "$INPUTCOLL" --output "$COLLECTION" \
-p "$DRP_PIPE_DIR/pipelines/HSC/DRP-ci_hsc.yaml" \
-c calibrateImage:astrometry.maxMeanDistanceArcsec=0.020 \
-c calibrateImage:astrometry.maxMeanDistanceArcsec=0.20 \
-c makeWarp:select.maxPsfTraceRadiusDelta=0.2 \
--save-qgraph "$QGRAPH_FILE"

Expand Down
4 changes: 3 additions & 1 deletion python/lsst/ci/hsc/gen3/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@
# set. This list is sensitive to the astrometry algorithms and dataset
# under consideration, so may require updating if either of those change
# in the context of this repository.
# DM-46272: not forcing these failures until we can handle partial outputs;
# uncomment this line as that ticket is sorted out.
ASTROMETRY_FAILURE_DATA_IDS = [
{'visit': 903344, 'detector': 0, 'physical_filter': 'HSC-R'},
# {'visit': 903344, 'detector': 0, 'physical_filter': 'HSC-R'},
]
# The following lists the dataIds that fail the PSF Model robustness check
# with the config override makeWarp.select.maxPsfTraceRadiusDelta=0.2 set.
Expand Down
6 changes: 6 additions & 0 deletions tests/test_astrometryFail.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
from lsst.utils import getPackageDir


# DM-46272: not forcing these failures until we can handle partial outputs;
# remove the expectedFailures as that ticket is sorted out.
class TestAstrometryFails(lsst.utils.tests.TestCase):
"""Tests the outputs of the forced astrometry failures.
"""
Expand All @@ -45,6 +47,7 @@ def setUp(self):
universe=self.butler.dimensions,
)

@unittest.expectedFailure
def testWcsAndPhotoCalibIsNoneForFailedAstrom(self):
"""Test the WCS and photoCalib objects attached to failed WCS exposure.
Expand All @@ -61,6 +64,7 @@ def testWcsAndPhotoCalibIsNoneForFailedAstrom(self):
calexpPhotoCalib = self.butler.get("calexp.photoCalib", self.calexpMinimalDataId)
self.assertTrue(calexpPhotoCalib is None)

@unittest.expectedFailure
def testSrcCoordsAreNanForFailedAstrom(self):
"""Test coord values in all source catalogs.
Expand All @@ -81,6 +85,7 @@ def testSrcCoordsAreNanForFailedAstrom(self):
self.assertFalse(np.all(np.isnan(sourceCat["coord_ra"])))
self.assertFalse(np.all(np.isnan(sourceCat["coord_dec"])))

@unittest.expectedFailure
def testCentroidsAreNotNanForFailedAstrom(self):
"""Test that at least some src catalog centroids have finite values.
Expand All @@ -99,6 +104,7 @@ def testCentroidsAreNotNanForFailedAstrom(self):
self.assertFalse(np.all(np.isnan(sourceCat["x"])))
self.assertFalse(np.all(np.isnan(sourceCat["y"])))

@unittest.expectedFailure
def testVisitCoordsAreNanForFailedAstrom(self):
"""Test coord and astrom values for visitTable and visitSummary.
Expand Down

0 comments on commit 957eda2

Please sign in to comment.