|
| | __init__ (self, *args, **kwargs) |
| |
| | run (self, exposure) |
| |
| | getAmpAssociations (self, amps) |
| |
| | getNeighbors (self, ampIds, ampId) |
| |
| | getAmpOffsets (self, im, amps, associations, sides) |
| |
| | getAmpEdges (self, im, amps, ampSides) |
| |
| | getInterfaceOffset (self, ampNameA, ampNameB, edgeA, edgeB) |
| |
Calculate and apply amp offset corrections to an exposure.
Definition at line 141 of file ampOffset.py.
◆ __init__()
| lsst.ip.isr.ampOffset.AmpOffsetTask.__init__ |
( |
| self, |
|
|
* | args, |
|
|
** | kwargs ) |
◆ getAmpAssociations()
| lsst.ip.isr.ampOffset.AmpOffsetTask.getAmpAssociations |
( |
| self, |
|
|
| amps ) |
Determine amp geometry and amp associations from a list of
amplifiers.
Parse an input list of amplifiers to determine the layout of amps
within a detector, and identify all amp sides (i.e., the
horizontal and vertical junctions between amps).
Returns a matrix with a shape corresponding to the geometry of the amps
in the detector.
Parameters
----------
amps : `list` [`lsst.afw.cameraGeom.Amplifier`]
List of amplifier objects used to deduce associations.
Returns
-------
ampAssociations : `numpy.ndarray`
An N x N matrix (N = number of amplifiers) that illustrates the
connections between amplifiers within the detector layout. Each row
and column index corresponds to the ampIds of a specific pair of
amplifiers, and the matrix elements indicate their associations as
follows:
* 0: No association
* -1: Association exists (direction specified in the ampSides
matrix)
* n >= 1: Diagonal elements indicate the number of neighboring
amplifiers for the corresponding ampId==row==column number.
ampSides : `numpy.ndarray`
An N x N matrix (N = the number of amplifiers) representing the amp
side information corresponding to the `ampAssociations`
matrix. The elements are integers defined as below:
* -1: No side due to no association or the same amp (diagonals)
* 0: Side on the bottom
* 1: Side on the right
* 2: Side on the top
* 3: Side on the left
Definition at line 297 of file ampOffset.py.
◆ getAmpEdges()
| lsst.ip.isr.ampOffset.AmpOffsetTask.getAmpEdges |
( |
| self, |
|
|
| im, |
|
|
| amps, |
|
|
| ampSides ) |
Calculate the amp edges for all amplifiers.
Parameters
----------
im : `lsst.afw.image._image.ImageF`
Amplifier image to extract data from.
amps : `list` [`lsst.afw.cameraGeom.Amplifier`]
List of amplifier objects.
ampSides : `numpy.ndarray`
An N x N matrix containing amp side information, where N is the
number of amplifiers.
Returns
-------
ampEdges : `dict` [`int`, `dict` [`int`, `numpy.ndarray`]]
A dictionary containing amp edge(s) for each amplifier,
corresponding to one or more potential sides, where each edge is
associated with a side. The outer dictionary has integer keys
representing amplifier IDs, and the inner dictionary has integer
keys representing side IDs for each amplifier and values that are
1D arrays of floats representing the median values of strips from
the amp image, referred to as an "amp edge":
{ampID: {sideID: numpy.ndarray}, ...}
Definition at line 526 of file ampOffset.py.
◆ getAmpOffsets()
| lsst.ip.isr.ampOffset.AmpOffsetTask.getAmpOffsets |
( |
| self, |
|
|
| im, |
|
|
| amps, |
|
|
| associations, |
|
|
| sides ) |
Calculate the amp offsets for all amplifiers.
Parameters
----------
im : `lsst.afw.image._image.ImageF`
Amplifier image to extract data from.
amps : `list` [`lsst.afw.cameraGeom.Amplifier`]
List of amplifier objects.
associations : numpy.ndarray
An N x N matrix containing amp association information, where N is
the number of amplifiers.
sides : numpy.ndarray
An N x N matrix containing amp side information, where N is the
number of amplifiers.
Returns
-------
ampOffsets : `numpy.ndarray`
1D float array containing the calculated amp offsets for all
amplifiers (optionally weighted by interface length).
interfaceOffsetDict : `dict` [`str`, `float`]
Dictionary mapping interface IDs to their corresponding raw
(uncapped) offset values.
Definition at line 411 of file ampOffset.py.
◆ getInterfaceOffset()
| lsst.ip.isr.ampOffset.AmpOffsetTask.getInterfaceOffset |
( |
| self, |
|
|
| ampNameA, |
|
|
| ampNameB, |
|
|
| edgeA, |
|
|
| edgeB ) |
Calculate the amp offset for a given interface between two
amplifiers.
Parameters
----------
ampNameA : str
Name of the first amplifier.
ampNameB : str
Name of the second amplifier.
edgeA : numpy.ndarray
Amp edge for the first amplifier.
edgeB : numpy.ndarray
Amp edge for the second amplifier.
Returns
-------
interfaceId : str
Identifier for the interface between amps A and B, formatted as
"A-B", where A and B are the respective amp names.
interfaceOffset : float
The calculated amp offset value for the given interface between
amps A and B.
interfaceOffsetOriginal : float
The original calculated amp offset value for the given interface
between amps A and B.
ampEdgeGoodFrac : float
Fraction of viable pixel rows along the amp edge.
minFracFail : bool
True if the fraction of unmasked pixel rows is below the
ampEdgeMinFrac threshold.
maxOffsetFail : bool
True if the absolute offset value exceeds the ampEdgeMaxOffset
threshold.
Definition at line 573 of file ampOffset.py.
◆ getNeighbors()
| lsst.ip.isr.ampOffset.AmpOffsetTask.getNeighbors |
( |
| self, |
|
|
| ampIds, |
|
|
| ampId ) |
Get the neighbor amplifiers and their sides for a given
amplifier.
Parameters
----------
ampIds : `numpy.ndarray`
Matrix with amp side association information.
ampId : `int`
The amplifier ID for which neighbor amplifiers and side IDs
are to be found.
Returns
-------
neighbors : `list` [`int`]
List of neighbor amplifier IDs.
sides : `list` [`int`]
List of side IDs, with each ID corresponding to its respective
neighbor amplifier.
Definition at line 376 of file ampOffset.py.
◆ run()
| lsst.ip.isr.ampOffset.AmpOffsetTask.run |
( |
| self, |
|
|
| exposure ) |
Calculate amp offset values, determine corrective pedestals for each
amp, and update the input exposure in-place.
Parameters
----------
exposure: `lsst.afw.image.Exposure`
Exposure to be corrected for amp offsets.
Definition at line 157 of file ampOffset.py.
◆ _DefaultName
| str lsst.ip.isr.ampOffset.AmpOffsetTask._DefaultName = "isrAmpOffset" |
|
staticprotected |
◆ ampDims
| lsst.ip.isr.ampOffset.AmpOffsetTask.ampDims = ampDims[0] |
◆ ConfigClass
◆ interfaceLengthLookupBySide
| dict lsst.ip.isr.ampOffset.AmpOffsetTask.interfaceLengthLookupBySide = {i: self.ampDims[i % 2] for i in range(4)} |
◆ shortAmpSide
| int lsst.ip.isr.ampOffset.AmpOffsetTask.shortAmpSide = 0 |
The documentation for this class was generated from the following file: