Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-36653: Ensure overscan task returns all overscan models and images #238

Merged
merged 1 commit into from
Oct 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 18 additions & 6 deletions python/lsst/ip/isr/overscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,20 @@ def run(self, exposure, amp, isTransposed=False):
Value or fit subtracted from the amplifier image data
(scalar or `lsst.afw.image.Image`).
``overscanFit``
Value or fit subtracted from the overscan image data
(scalar or `lsst.afw.image.Image`).
Value or fit subtracted from the serial overscan image
data (scalar or `lsst.afw.image.Image`).
``overscanImage``
Image of the overscan region with the overscan
correction applied (`lsst.afw.image.Image`). This
quantity is used to estimate the amplifier read noise
empirically.
Image of the serial overscan region with the serial
overscan correction applied
(`lsst.afw.image.Image`). This quantity is used to
estimate the amplifier read noise empirically.
``parallelOverscanFit``
Value or fit subtracted from the parallel overscan
image data (scalar, `lsst.afw.image.Image`, or None).
``parallelOverscanImage``
Image of the parallel overscan region with the
parallel overscan correction applied
(`lsst.afw.image.Image` or None).

Raises
------
Expand Down Expand Up @@ -202,6 +209,7 @@ def run(self, exposure, amp, isTransposed=False):
residualSigma = serialResults.overscanSigmaResidual

# Do Parallel Overscan
parallelResults = None
if self.config.doParallelOverscan:
# This does not need any extensions, as we'll only
# subtract it from the data region.
Expand All @@ -227,11 +235,15 @@ def run(self, exposure, amp, isTransposed=False):
overscanSigma = (overscanSigma, parallelResults.overscanSigma)
residualMean = (residualMean, parallelResults.overscanMeanResidual)
residualSigma = (residualSigma, parallelResults.overscanSigmaResidual)
parallelOverscanFit = parallelResults.overscanOverscanModel if parallelResults else None
parallelOverscanImage = parallelResults.overscanImage if parallelResults else None

return pipeBase.Struct(imageFit=serialResults.ampOverscanModel,
overscanFit=serialResults.overscanOverscanModel,
overscanImage=serialResults.overscanImage,

parallelOverscanFit=parallelOverscanFit,
parallelOverscanImage=parallelOverscanImage,
overscanMean=overscanMean,
overscanSigma=overscanSigma,
residualMean=residualMean,
Expand Down