Skip to content

Commit

Permalink
Add final repair/measure to CalibrateImage
Browse files Browse the repository at this point in the history
We need to run repair with keepCRs=False (the default) and re-measure
in order to not have CRs included in the final output.
  • Loading branch information
parejkoj committed Oct 25, 2023
1 parent c99fbdf commit b01659e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/lsst/pipe/tasks/calibrateImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,11 @@ def _compute_psf(self, exposure, guess_psf=True):
self.psf_source_measurement.run(detections.sources, exposure)
psf_result = self.psf_measure_psf.run(exposure=exposure, sources=detections.sources)

# Final repair with final PSF, removing cosmic rays this time.
self.psf_repair.run(exposure=exposure)
# Final measurement with the CRs removed.
self.psf_source_measurement.run(detections.sources, exposure)

# PSF is set on exposure; only return candidates for optional saving.
return detections.sources, background, psf_result.cellSet

Expand Down

0 comments on commit b01659e

Please sign in to comment.