Skip to content

Commit

Permalink
Actually save calibrated catalog in ReprocessVisitImage.
Browse files Browse the repository at this point in the history
  • Loading branch information
TallJimbo committed Nov 27, 2024
1 parent a33e1fb commit db50336
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions python/lsst/drp/tasks/reprocess_visit_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,11 @@ def run(
result.exposure.info.setSummaryStats(
self.compute_summary_stats.run(result.exposure, result.sources_footprints, background)
)
self._apply_photo_calib(result.exposure, result.sources_footprints, photo_calib)
result.sources_footprints = self._apply_photo_calib(
result.exposure,
result.sources_footprints,
photo_calib,
)
result.sources = result.sources_footprints.asAstropy()

return result
Expand Down Expand Up @@ -592,11 +596,11 @@ def _apply_photo_calib(self, exposure, sources_footprints, photo_calib):
Star catalog with flux/magnitude columns computed from the
supplied PhotoCalib.
"""
sources_footprints = photo_calib.calibrateCatalog(sources_footprints)
calibrated_sources_footprints = photo_calib.calibrateCatalog(sources_footprints)
exposure.maskedImage = photo_calib.calibrateImage(exposure.maskedImage)
identity = afwImage.PhotoCalib(1.0, photo_calib.getCalibrationErr(), bbox=exposure.getBBox())
exposure.setPhotoCalib(identity)
return sources_footprints
return calibrated_sources_footprints


def combine_backgrounds(initial_pvi_background, sky_corr):
Expand Down

0 comments on commit db50336

Please sign in to comment.