LSST Applications g180d380827+770a9040cc,g2079a07aa2+86d27d4dc4,g2305ad1205+09cfdadad9,g2bbee38e9b+c6a8a0fb72,g337abbeb29+c6a8a0fb72,g33d1c0ed96+c6a8a0fb72,g3a166c0a6a+c6a8a0fb72,g3ddfee87b4+1ea5e09c42,g48712c4677+7e2ea9cd42,g487adcacf7+301d09421d,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+96fcb956a6,g64a986408d+23540ee355,g858d7b2824+23540ee355,g864b0138d7+aa38e45daa,g95921f966b+d83dc58ecd,g991b906543+23540ee355,g99cad8db69+7f13b58a93,g9c22b2923f+e2510deafe,g9ddcbc5298+9a081db1e4,ga1e77700b3+03d07e1c1f,gb0e22166c9+60f28cb32d,gb23b769143+23540ee355,gba4ed39666+c2a2e4ac27,gbb8dafda3b+49e7449578,gbd998247f1+585e252eca,gc120e1dc64+1bbfa184e1,gc28159a63d+c6a8a0fb72,gc3e9b769f7+385ea95214,gcf0d15dbbd+1ea5e09c42,gdaeeff99f8+f9a426f77a,ge6526c86ff+1bccc98490,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.ParallelOverscanCorrectionTask Class Reference
Inheritance diagram for lsst.ip.isr.overscan.ParallelOverscanCorrectionTask:
lsst.ip.isr.overscan.OverscanCorrectionTaskBase

Public Member Functions

 run (self, exposure, amp, isTransposed=False)
 
 maskParallelOverscan (self, exposure, detector, saturationLevel=None)
 

Static Public Attributes

 ConfigClass = ParallelOverscanCorrectionTaskConfig
 

Static Protected Attributes

str _DefaultName = "parallelOverscan"
 

Detailed Description

Correction task for parallel overscan.

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

Definition at line 1202 of file overscan.py.

Member Function Documentation

◆ maskParallelOverscan()

lsst.ip.isr.overscan.ParallelOverscanCorrectionTask.maskParallelOverscan ( self,
exposure,
detector,
saturationLevel = None )
Mask parallel overscan, growing saturated pixels.

This operates on the image in-place.

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    An untrimmed raw exposure.
detector : `lsst.afw.cameraGeom.Detector`
    The detetor to use for amplifier geometry.
saturationLevel : `float`, optional
    Saturation level to use for masking.

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

Definition at line 1309 of file overscan.py.

1309 def maskParallelOverscan(self, exposure, detector, saturationLevel=None):
1310 """Mask parallel overscan, growing saturated pixels.
1311
1312 This operates on the image in-place.
1313
1314 Parameters
1315 ----------
1316 exposure : `lsst.afw.image.Exposure`
1317 An untrimmed raw exposure.
1318 detector : `lsst.afw.cameraGeom.Detector`
1319 The detetor to use for amplifier geometry.
1320 saturationLevel : `float`, optional
1321 Saturation level to use for masking.
1322 """
1323 if not self.config.doParallelOverscanSaturation:
1324 # This is a no-op.
1325 return
1326
1327 if saturationLevel is None:
1328 saturationLevel = self.config.parallelOverscanSaturationLevel
1329
1330 for amp in detector:
1331 dataView = afwImage.MaskedImageF(exposure.getMaskedImage(),
1332 amp.getRawParallelOverscanBBox(),
1333 afwImage.PARENT)
1334 makeThresholdMask(
1335 maskedImage=dataView,
1336 threshold=saturationLevel,
1337 growFootprints=self.config.parallelOverscanMaskGrowSize,
1338 maskName="BAD"
1339 )

◆ run()

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

This method assumes that serial overscan has already been
removed from the amplifier.

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 parallel overscan image
        data (scalar or `lsst.afw.image.Image`).
    ``overscanImage``
        Image of the parallel overscan region with the parallel
        overscan correction applied
        (`lsst.afw.image.Image`). This quantity is used to
        estimate the amplifier read noise empirically.
    ``overscanMean``
        Mean of the fit parallel overscan region.
    ``overscanMedian``
        Median of the fit parallel overscan region.
    ``overscanSigma``
        Sigma of the fit parallel overscan region.
    ``residualMean``
        Mean of the residual of the parallel overscan region after
        correction.
    ``residualMedian``
        Median of the residual of the parallel overscan region after
        correction.
    ``residualSigma``
        Mean of the residual of the parallel overscan region after
        correction.

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

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

Definition at line 1213 of file overscan.py.

1213 def run(self, exposure, amp, isTransposed=False):
1214 """Measure and remove parallel overscan from an amplifier image.
1215
1216 This method assumes that serial overscan has already been
1217 removed from the amplifier.
1218
1219 Parameters
1220 ----------
1221 exposure : `lsst.afw.image.Exposure`
1222 Image data that will have the overscan corrections applied.
1223 amp : `lsst.afw.cameraGeom.Amplifier`
1224 Amplifier to use for debugging purposes.
1225 isTransposed : `bool`, optional
1226 Is the image transposed, such that serial and parallel
1227 overscan regions are reversed? Default is False.
1228
1229 Returns
1230 -------
1231 overscanResults : `lsst.pipe.base.Struct`
1232 Result struct with components:
1233
1234 ``imageFit``
1235 Value or fit subtracted from the amplifier image data
1236 (scalar or `lsst.afw.image.Image`).
1237 ``overscanFit``
1238 Value or fit subtracted from the parallel overscan image
1239 data (scalar or `lsst.afw.image.Image`).
1240 ``overscanImage``
1241 Image of the parallel overscan region with the parallel
1242 overscan correction applied
1243 (`lsst.afw.image.Image`). This quantity is used to
1244 estimate the amplifier read noise empirically.
1245 ``overscanMean``
1246 Mean of the fit parallel overscan region.
1247 ``overscanMedian``
1248 Median of the fit parallel overscan region.
1249 ``overscanSigma``
1250 Sigma of the fit parallel overscan region.
1251 ``residualMean``
1252 Mean of the residual of the parallel overscan region after
1253 correction.
1254 ``residualMedian``
1255 Median of the residual of the parallel overscan region after
1256 correction.
1257 ``residualSigma``
1258 Mean of the residual of the parallel overscan region after
1259 correction.
1260
1261 Raises
1262 ------
1263 RuntimeError
1264 Raised if an invalid overscan type is set.
1265 """
1266 # This does not need any extending, as we only subtract
1267 # from the data region.
1268 parallelOverscanBBox = amp.getRawParallelOverscanBBox()
1269 imageBBox = amp.getRawDataBBox()
1270
1271 # The serial overscan correction has removed some signal
1272 # from the parallel overscan region, but that is largely a
1273 # constant offset. The collapseArray method now attempts
1274 # to fill fully masked columns with the median of
1275 # neighboring values, with a fallback to the median of the
1276 # correction in all other columns. Filling with neighbor
1277 # values ensures that large variations in the parallel
1278 # overscan do not create new outlier points. The
1279 # MEDIAN_PER_ROW method does this filling as a separate
1280 # operation, using the same method.
1281 results = self.correctOverscan(
1282 exposure,
1283 amp,
1284 imageBBox,
1285 parallelOverscanBBox,
1286 isTransposed=not isTransposed,
1287 leadingToSkip=self.config.leadingToSkip,
1288 trailingToSkip=self.config.trailingToSkip,
1289 )
1290 overscanMean = results.overscanMean
1291 overscanMedian = results.overscanMedian
1292 overscanSigma = results.overscanSigma
1293 residualMean = results.overscanMeanResidual
1294 residualMedian = results.overscanMedianResidual
1295 residualSigma = results.overscanSigmaResidual
1296
1297 return pipeBase.Struct(
1298 imageFit=results.ampOverscanModel,
1299 overscanFit=results.overscanOverscanModel,
1300 overscanImage=results.overscanImage,
1301 overscanMean=overscanMean,
1302 overscanMedian=overscanMedian,
1303 overscanSigma=overscanSigma,
1304 residualMean=residualMean,
1305 residualMedian=residualMedian,
1306 residualSigma=residualSigma,
1307 )
1308

Member Data Documentation

◆ _DefaultName

str lsst.ip.isr.overscan.ParallelOverscanCorrectionTask._DefaultName = "parallelOverscan"
staticprotected

Definition at line 1211 of file overscan.py.

◆ ConfigClass

lsst.ip.isr.overscan.ParallelOverscanCorrectionTask.ConfigClass = ParallelOverscanCorrectionTaskConfig
static

Definition at line 1210 of file overscan.py.


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