Skip to content

Commit

Permalink
Prohibit LocalWcs and LocalPhotoCalib in CalibrateImageTask.
Browse files Browse the repository at this point in the history
  • Loading branch information
TallJimbo committed Dec 16, 2024
1 parent 5bf266f commit 44abe96
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions python/lsst/pipe/tasks/calibrateImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,36 @@ def validate(self):
CalibrateImageConfig.star_normalized_calibration_flux, self, msg,
)

# Ensure base_LocalPhotoCalib and base_LocalWcs plugins are not run,
# because they'd be running too early to pick up the fitted PhotoCalib
# and WCS.
if "base_LocalWcs" in self.psf_source_measurement.plugins.names:
raise pexConfig.FieldValidationError(
CalibrateImageConfig.psf_source_measurement,
self,
"base_LocalWcs cannot run CalibrateImageTask, as it would be run before the astrometry fit."
)
if "base_LocalWcs" in self.star_measurement.plugins.names:
raise pexConfig.FieldValidationError(
CalibrateImageConfig.star_measurement,
self,
"base_LocalWcs cannot run CalibrateImageTask, as it would be run before the astrometry fit."
)
if "base_LocalPhotoCalib" in self.psf_source_measurement.plugins.names:
raise pexConfig.FieldValidationError(
CalibrateImageConfig.psf_source_measurement,
self,
"base_LocalPhotoCalib cannot run CalibrateImageTask, "
"as it would be run before the photometry fit."
)
if "base_LocalPhotoCalib" in self.star_measurement.plugins.names:
raise pexConfig.FieldValidationError(
CalibrateImageConfig.star_measurement,
self,
"base_LocalPhotoCalib cannot run CalibrateImageTask, "
"as it would be run before the photometry fit."
)


class CalibrateImageTask(pipeBase.PipelineTask):
"""Compute the PSF, aperture corrections, astrometric and photometric
Expand Down

0 comments on commit 44abe96

Please sign in to comment.