|
LSST Applications g00274db5b6+edbf708997,g00d0e8bbd7+edbf708997,g199a45376c+5137f08352,g1fd858c14a+1d4b6db739,g262e1987ae+f4d9505c4f,g29ae962dfc+7156fb1a53,g2cef7863aa+73c82f25e4,g35bb328faa+edbf708997,g3e17d7035e+5b3adc59f5,g3fd5ace14f+852fa6fbcb,g47891489e3+6dc8069a4c,g53246c7159+edbf708997,g64539dfbff+9f17e571f4,g67b6fd64d1+6dc8069a4c,g74acd417e5+ae494d68d9,g786e29fd12+af89c03590,g7ae74a0b1c+a25e60b391,g7aefaa3e3d+536efcc10a,g7cc15d900a+d121454f8d,g87389fa792+a4172ec7da,g89139ef638+6dc8069a4c,g8d7436a09f+28c28d8d6d,g8ea07a8fe4+db21c37724,g92c671f44c+9f17e571f4,g98df359435+b2e6376b13,g99af87f6a8+b0f4ad7b8d,gac66b60396+966efe6077,gb88ae4c679+7dec8f19df,gbaa8f7a6c5+38b34f4976,gbf99507273+edbf708997,gc24b5d6ed1+9f17e571f4,gca7fc764a6+6dc8069a4c,gcc769fe2a4+97d0256649,gd7ef33dd92+6dc8069a4c,gdab6d2f7ff+ae494d68d9,gdbb4c4dda9+9f17e571f4,ge410e46f29+6dc8069a4c,geaed405ab2+e194be0d2b,w.2025.47
LSST Data Management Base Package
|
Public Member Functions | |
| __init__ (self, statControl=None, **kwargs) | |
| run (self, inputExp, untrimmedInputExposure=None, ptc=None, serialOverscanResults=None, parallelOverscanResults=None, doLegacyCtiStatistics=False, **kwargs) | |
| measureCti (self, inputExp, untrimmedInputExp, gains) | |
| measureCtiLegacy (self, inputExp, serialOverscans, gains) | |
| measureBanding (self, inputExp, overscans) | |
| measureProjectionStatistics (self, inputExp, overscans) | |
| copyCalibDistributionStatistics (self, inputExp, **kwargs) | |
| measureBiasShifts (self, inputExp, serialOverscanResults) | |
| measureAmpCorrelations (self, inputExp, serialOverscanResults) | |
| measureDivisaderoStatistics (self, inputExp, **kwargs) | |
Static Public Member Functions | |
| makeKernel (kernelSize) | |
Public Attributes | |
| statControl | |
| statType = afwMath.stringToStatisticsProperty(self.config.stat) | |
Static Public Attributes | |
| ConfigClass = IsrStatisticsTaskConfig | |
Protected Member Functions | |
| _scan_for_shifts (self, overscanData) | |
| _satisfies_flatness (self, shiftRow, shiftPeak, overscanData) | |
Static Protected Attributes | |
| str | _DefaultName = "isrStatistics" |
Task to measure arbitrary statistics on ISR processed exposures. The goal is to wrap a number of optional measurements that are useful for calibration production and detector stability.
Definition at line 213 of file isrStatistics.py.
| lsst.ip.isr.isrStatistics.IsrStatisticsTask.__init__ | ( | self, | |
| statControl = None, | |||
| ** | kwargs ) |
Definition at line 222 of file isrStatistics.py.
|
protected |
Determine if a region is flat.
Parameters
----------
shiftRow : `int`
Row with possible peak.
shiftPeak : `float`
Value at the possible peak.
overscanData : `list` [`float`]
Overscan data used to fit around the possible peak.
Returns
-------
isFlat : `bool`
Indicates if the region is flat, and so the peak is valid.
Definition at line 942 of file isrStatistics.py.
|
protected |
Scan overscan data for shifts.
Parameters
----------
overscanData : `list` [`float`]
Overscan data to search for shifts.
Returns
-------
noise : `float`
Noise estimated from Butterworth filtered overscan data.
peaks : `list` [`float`, `float`, `int`, `int`]
Shift peak information, containing the convolved peak
value, the raw peak value, and the lower and upper bounds
of the region checked.
Definition at line 898 of file isrStatistics.py.
| lsst.ip.isr.isrStatistics.IsrStatisticsTask.copyCalibDistributionStatistics | ( | self, | |
| inputExp, | |||
| ** | kwargs ) |
Copy calibration statistics for this exposure.
Parameters
----------
inputExp : `lsst.afw.image.Exposure`
The exposure being processed.
**kwargs :
Keyword arguments with calibrations.
Returns
-------
outputStats : `dict` [`str`, [`dict` [`str`, `float`]]]
Dictionary of measurements, keyed by amplifier name and
statistics segment.
Definition at line 790 of file isrStatistics.py.
|
static |
Make a boxcar smoothing kernel.
Parameters
----------
kernelSize : `int`
Size of the kernel in pixels.
Returns
-------
kernel : `np.array`
Kernel for boxcar smoothing.
Definition at line 636 of file isrStatistics.py.
| lsst.ip.isr.isrStatistics.IsrStatisticsTask.measureAmpCorrelations | ( | self, | |
| inputExp, | |||
| serialOverscanResults ) |
Measure correlations between amplifier segments.
Parameters
----------
inputExp : `lsst.afw.image.Exposure`
Exposure to measure.
overscans : `list` [`lsst.pipe.base.Struct`]
List of overscan results. Expected fields are:
``imageFit``
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`).
``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.
Returns
-------
outputStats : `dict` [`str`, [`dict` [`str`, `float`]]]
Dictionary of measurements, keyed by amplifier name and
statistics segment.
Notes
-----
Based on eo_pipe implementation:
https://github.com/lsst-camera-dh/eo_pipe/blob/main/python/lsst/eo/pipe/raft_level_correlations.py # noqa: E501 W505
Definition at line 974 of file isrStatistics.py.
| lsst.ip.isr.isrStatistics.IsrStatisticsTask.measureBanding | ( | self, | |
| inputExp, | |||
| overscans ) |
Task to measure banding statistics.
Parameters
----------
inputExp : `lsst.afw.image.Exposure`
Exposure to measure.
overscans : `list` [`lsst.pipe.base.Struct`]
List of overscan results. Expected fields are:
``imageFit``
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`).
``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.
Returns
-------
outputStats : `dict` [`str`, [`dict` [`str`, `float`]]]
Dictionary of measurements, keyed by amplifier name and
statistics segment.
Definition at line 655 of file isrStatistics.py.
| lsst.ip.isr.isrStatistics.IsrStatisticsTask.measureBiasShifts | ( | self, | |
| inputExp, | |||
| serialOverscanResults ) |
Measure number of bias shifts from overscan data.
Parameters
----------
inputExp : `lsst.afw.image.Exposure`
Exposure to measure.
overscans : `list` [`lsst.pipe.base.Struct`]
List of overscan results. Expected fields are:
``imageFit``
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`).
``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.
Returns
-------
outputStats : `dict` [`str`, [`dict` [`str`, `float`]]]
Dictionary of measurements, keyed by amplifier name and
statistics segment.
Notes
-----
Based on eo_pipe implementation:
https://github.com/lsst-camera-dh/eo_pipe/blob/main/python/lsst/eo/pipe/biasShiftsTask.py # noqa: E501 W505
Definition at line 836 of file isrStatistics.py.
| lsst.ip.isr.isrStatistics.IsrStatisticsTask.measureCti | ( | self, | |
| inputExp, | |||
| untrimmedInputExp, | |||
| gains ) |
Task to measure CTI statistics.
Parameters
----------
inputExp : `lsst.afw.image.Exposure`
The exposure to measure.
untrimmedInputExp : `lsst.afw.image.Exposure`
Exposure to measure overscan from.
gains : `dict` [`str` `float`]
Dictionary of per-amplifier gains, indexed by amplifier name.
Returns
-------
outputStats : `dict` [`str`, [`dict` [`str`, `float`]]]
Dictionary of measurements, keyed by amplifier name and
statistics segment. Everything in units based on electron.
Notes
-------
The input exposure is needed because it contains the last imaging
pixel, with defects applied. And the untrimmed input exposure is
needed because it contains the overscan regions. It needs to be
this way because the defect masking code requires that the image
be trimmed, but we need the image with defects masked to measure
the CTI from the last imaging pixel.
Definition at line 351 of file isrStatistics.py.
| lsst.ip.isr.isrStatistics.IsrStatisticsTask.measureCtiLegacy | ( | self, | |
| inputExp, | |||
| serialOverscans, | |||
| gains ) |
Task to measure CTI statistics.
Parameters
----------
inputExp : `lsst.afw.image.Exposure`
Exposure to measure.
serialOverscans : `list` [`lsst.pipe.base.Struct`]
List of serial overscan results (expects base units of adu).
Expected fields are:
``imageFit``
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`).
``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.
gains : `dict` [`str` `float`]
Dictionary of per-amplifier gains, indexed by amplifier name.
Returns
-------
outputStats : `dict` [`str`, [`dict` [`str`, `float`]]]
Dictionary of measurements, keyed by amplifier name and
statistics segment. Everything in units based on electron.
Definition at line 511 of file isrStatistics.py.
| lsst.ip.isr.isrStatistics.IsrStatisticsTask.measureDivisaderoStatistics | ( | self, | |
| inputExp, | |||
| ** | kwargs ) |
Measure Max Divisadero Tearing effect per amp.
Parameters
----------
inputExp : `lsst.afw.image.Exposure`
Exposure to measure. Usually a flat.
**kwargs :
The flat will be selected from here.
Returns
-------
outputStats : `dict` [`str`, [`dict` [`str`, `float`]]]
Dictionary of measurements, keyed by amplifier name and
statistics segment.
Measurements include
- DIVISADERO_PROFILE: Robust mean of rows between
divisaderoProjection<Maximum|Minumum> on readout edge of ccd
normalized by a linear fit to the same rows.
- DIVISADERO_MAX_PAIR: Tuple of maximum of the absolute values of
the DIVISADERO_PROFILE, for number of pixels (specified by
divisaderoNumImpactPixels on left and right side of amp.
- DIVISADERO_MAX: Maximum of the absolute values of the
the DIVISADERO_PROFILE, for the divisaderoNumImpactPixels on
boundaries of neighboring amps (including the pixels in those
neighborboring amps).
Definition at line 1066 of file isrStatistics.py.
| lsst.ip.isr.isrStatistics.IsrStatisticsTask.measureProjectionStatistics | ( | self, | |
| inputExp, | |||
| overscans ) |
Task to measure metrics from image slicing.
Parameters
----------
inputExp : `lsst.afw.image.Exposure`
Exposure to measure.
overscans : `list` [`lsst.pipe.base.Struct`]
List of overscan results. Expected fields are:
``imageFit``
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`).
``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.
Returns
-------
outputStats : `dict` [`str`, [`dict` [`str`, `float`]]]
Dictionary of measurements, keyed by amplifier name and
statistics segment.
Definition at line 708 of file isrStatistics.py.
| lsst.ip.isr.isrStatistics.IsrStatisticsTask.run | ( | self, | |
| inputExp, | |||
| untrimmedInputExposure = None, | |||
| ptc = None, | |||
| serialOverscanResults = None, | |||
| parallelOverscanResults = None, | |||
| doLegacyCtiStatistics = False, | |||
| ** | kwargs ) |
Task to run arbitrary statistics.
The statistics should be measured by individual methods, and
add to the dictionary in the return struct.
Parameters
----------
inputExp : `lsst.afw.image.Exposure`
The exposure to measure.
untrimmedInputExp :
The exposure to measure overscan statistics from.
ptc : `lsst.ip.isr.PtcDataset`, optional
A PTC object containing gains to use.
serialOverscanResults : `list` [`lsst.pipe.base.Struct`], optional
List of serial overscan results. Expected fields are:
``imageFit``
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`).
``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.
parallelOverscanResults : `list` [`lsst.pipe.base.Struct`], optional
List of parallel overscan results. Expected fields are:
``imageFit``
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`).
``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.
doLegacyCtiStatistics : `bool`, optional
Use the older version of measureCti (not recommended).
This should be True if and only if this task is called
from IsrTask. TODO: Deprecate legacy CTI + CTI correction
from IsrTask (DM-48757).
**kwargs :
Keyword arguments. Calibrations being passed in should
have an entry here.
Returns
-------
resultStruct : `lsst.pipe.base.Struct`
Contains the measured statistics as a dict stored in a
field named ``results``.
Raises
------
RuntimeError
Raised if the amplifier gains could not be found.
Definition at line 228 of file isrStatistics.py.
|
staticprotected |
Definition at line 220 of file isrStatistics.py.
|
static |
Definition at line 219 of file isrStatistics.py.
| lsst.ip.isr.isrStatistics.IsrStatisticsTask.statControl |
Definition at line 224 of file isrStatistics.py.
| lsst.ip.isr.isrStatistics.IsrStatisticsTask.statType = afwMath.stringToStatisticsProperty(self.config.stat) |
Definition at line 226 of file isrStatistics.py.