LSST Applications g180d380827+78227d2bc4,g2079a07aa2+86d27d4dc4,g2305ad1205+bdd7851fe3,g2bbee38e9b+c6a8a0fb72,g337abbeb29+c6a8a0fb72,g33d1c0ed96+c6a8a0fb72,g3a166c0a6a+c6a8a0fb72,g3d1719c13e+260d7c3927,g3ddfee87b4+723a6db5f3,g487adcacf7+29e55ea757,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+9443c4b912,g62aa8f1a4b+7e2ea9cd42,g858d7b2824+260d7c3927,g864b0138d7+8498d97249,g95921f966b+dffe86973d,g991b906543+260d7c3927,g99cad8db69+4809d78dd9,g9c22b2923f+e2510deafe,g9ddcbc5298+9a081db1e4,ga1e77700b3+03d07e1c1f,gb0e22166c9+60f28cb32d,gb23b769143+260d7c3927,gba4ed39666+c2a2e4ac27,gbb8dafda3b+e22341fd87,gbd998247f1+585e252eca,gc120e1dc64+713f94b854,gc28159a63d+c6a8a0fb72,gc3e9b769f7+385ea95214,gcf0d15dbbd+723a6db5f3,gdaeeff99f8+f9a426f77a,ge6526c86ff+fde82a80b9,ge79ae78c31+c6a8a0fb72,gee10cc3b42+585e252eca,w.2024.18
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Static Protected Attributes | List of all members
lsst.ip.isr.overscan.SerialOverscanCorrectionTask Class Reference
Inheritance diagram for lsst.ip.isr.overscan.SerialOverscanCorrectionTask:
lsst.ip.isr.overscan.OverscanCorrectionTaskBase

Public Member Functions

 run (self, exposure, amp, isTransposed=False)
 

Static Public Attributes

 ConfigClass = SerialOverscanCorrectionTaskConfig
 

Static Protected Attributes

str _DefaultName = "serialOverscan"
 

Detailed Description

Correction task for serial overscan.

Parameters
----------
statControl : `lsst.afw.math.StatisticsControl`, optional
    Statistics control object.

Definition at line 1060 of file overscan.py.

Member Function Documentation

◆ run()

lsst.ip.isr.overscan.SerialOverscanCorrectionTask.run ( self,
exposure,
amp,
isTransposed = False )
Measure and remove serial overscan from an amplifier image.

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    Image data that will have the overscan corrections applied.
amp : `lsst.afw.cameraGeom.Amplifier`
    Amplifier to use for debugging purposes.
isTransposed : `bool`, optional
    Is the image transposed, such that serial and parallel
    overscan regions are reversed?  Default is False.

Returns
-------
overscanResults : `lsst.pipe.base.Struct`
    Result struct with components:

    ``imageFit``
        Value or fit subtracted from the amplifier image data
        (scalar or `lsst.afw.image.Image`).
    ``overscanFit``
        Value or fit subtracted from the serial overscan image
        data (scalar or `lsst.afw.image.Image`).
    ``overscanImage``
        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.
    ``overscanMean``
        Mean of the fit serial overscan region.
    ``overscanMedian``
        Median of the fit serial overscan region.
    ``overscanSigma``
        Sigma of the fit serial overscan region.
    ``residualMean``
        Mean of the residual of the serial overscan region after
        correction.
    ``residualMedian``
        Median of the residual of the serial overscan region after
        correction.
    ``residualSigma``
        Mean of the residual of the serial overscan region after
        correction.

Raises
------
RuntimeError
    Raised if an invalid overscan type is set.

Reimplemented from lsst.ip.isr.overscan.OverscanCorrectionTaskBase.

Definition at line 1071 of file overscan.py.

1071 def run(self, exposure, amp, isTransposed=False):
1072 """Measure and remove serial overscan from an amplifier image.
1073
1074 Parameters
1075 ----------
1076 exposure : `lsst.afw.image.Exposure`
1077 Image data that will have the overscan corrections applied.
1078 amp : `lsst.afw.cameraGeom.Amplifier`
1079 Amplifier to use for debugging purposes.
1080 isTransposed : `bool`, optional
1081 Is the image transposed, such that serial and parallel
1082 overscan regions are reversed? Default is False.
1083
1084 Returns
1085 -------
1086 overscanResults : `lsst.pipe.base.Struct`
1087 Result struct with components:
1088
1089 ``imageFit``
1090 Value or fit subtracted from the amplifier image data
1091 (scalar or `lsst.afw.image.Image`).
1092 ``overscanFit``
1093 Value or fit subtracted from the serial overscan image
1094 data (scalar or `lsst.afw.image.Image`).
1095 ``overscanImage``
1096 Image of the serial overscan region with the serial
1097 overscan correction applied
1098 (`lsst.afw.image.Image`). This quantity is used to
1099 estimate the amplifier read noise empirically.
1100 ``overscanMean``
1101 Mean of the fit serial overscan region.
1102 ``overscanMedian``
1103 Median of the fit serial overscan region.
1104 ``overscanSigma``
1105 Sigma of the fit serial overscan region.
1106 ``residualMean``
1107 Mean of the residual of the serial overscan region after
1108 correction.
1109 ``residualMedian``
1110 Median of the residual of the serial overscan region after
1111 correction.
1112 ``residualSigma``
1113 Mean of the residual of the serial overscan region after
1114 correction.
1115
1116 Raises
1117 ------
1118 RuntimeError
1119 Raised if an invalid overscan type is set.
1120 """
1121 serialOverscanBBox = amp.getRawSerialOverscanBBox()
1122 imageBBox = amp.getRawDataBBox()
1123
1124 # We always want to extend the serial overscan bounding box to
1125 # the full size of the detector.
1126 parallelOverscanBBox = amp.getRawParallelOverscanBBox()
1127 imageBBox = imageBBox.expandedTo(parallelOverscanBBox)
1128
1129 if isTransposed:
1130 serialOverscanBBox = geom.Box2I(
1131 geom.Point2I(serialOverscanBBox.getMinX(), imageBBox.getEndY()),
1132 geom.Extent2I(imageBBox.getWidth(), serialOverscanBBox.getHeight()),
1133 )
1134 else:
1135 serialOverscanBBox = geom.Box2I(
1136 geom.Point2I(serialOverscanBBox.getMinX(),
1137 imageBBox.getMinY()),
1138 geom.Extent2I(serialOverscanBBox.getWidth(),
1139 imageBBox.getHeight()),
1140 )
1141
1142 results = self.correctOverscan(
1143 exposure,
1144 amp,
1145 imageBBox,
1146 serialOverscanBBox,
1147 isTransposed=isTransposed,
1148 leadingToSkip=self.config.leadingToSkip,
1149 trailingToSkip=self.config.trailingToSkip,
1150 )
1151 overscanMean = results.overscanMean
1152 overscanMedian = results.overscanMedian
1153 overscanSigma = results.overscanSigma
1154 residualMean = results.overscanMeanResidual
1155 residualMedian = results.overscanMedianResidual
1156 residualSigma = results.overscanSigmaResidual
1157
1158 return pipeBase.Struct(
1159 imageFit=results.ampOverscanModel,
1160 overscanFit=results.overscanOverscanModel,
1161 overscanImage=results.overscanImage,
1162 overscanMean=overscanMean,
1163 overscanMedian=overscanMedian,
1164 overscanSigma=overscanSigma,
1165 residualMean=residualMean,
1166 residualMedian=residualMedian,
1167 residualSigma=residualSigma,
1168 )
1169
1170
An integer coordinate rectangle.
Definition Box.h:55

Member Data Documentation

◆ _DefaultName

str lsst.ip.isr.overscan.SerialOverscanCorrectionTask._DefaultName = "serialOverscan"
staticprotected

Definition at line 1069 of file overscan.py.

◆ ConfigClass

lsst.ip.isr.overscan.SerialOverscanCorrectionTask.ConfigClass = SerialOverscanCorrectionTaskConfig
static

Definition at line 1068 of file overscan.py.


The documentation for this class was generated from the following file: