lsst.ip.isr g02d81e74bb+3975d4ac1c
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Static Protected Attributes | List of all members
lsst.ip.isr.ampOffset.AmpOffsetTask Class Reference
Inheritance diagram for lsst.ip.isr.ampOffset.AmpOffsetTask:

Public Member Functions

 __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, ampIdA, ampIdB, edgeA, edgeB)
 

Public Attributes

 shortAmpSide
 
 ampDims
 
 interfaceLengthLookupBySide
 

Static Public Attributes

 ConfigClass = AmpOffsetConfig
 

Static Protected Attributes

str _DefaultName = "isrAmpOffset"
 

Detailed Description

Calculate and apply amp offset corrections to an exposure.

Definition at line 119 of file ampOffset.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.ip.isr.ampOffset.AmpOffsetTask.__init__ ( self,
* args,
** kwargs )

Definition at line 125 of file ampOffset.py.

Member Function Documentation

◆ 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 246 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 1D medianified strips from the
    amp image, referred to as "amp edge":
    {ampID: {sideID: numpy.ndarray}, ...}

Definition at line 402 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
-------
ampsOffsets : `numpy.ndarray`
    1D float array containing the calculated amp offsets for all
    amplifiers.

Definition at line 359 of file ampOffset.py.

◆ getInterfaceOffset()

lsst.ip.isr.ampOffset.AmpOffsetTask.getInterfaceOffset ( self,
ampIdA,
ampIdB,
edgeA,
edgeB )
Calculate the amp offset for a given interface between two
amplifiers.

Parameters
----------
ampIdA : int
    ID of the first amplifier.
ampIdB : int
    ID of the second amplifier.
edgeA : numpy.ndarray
    Amp edge for the first amplifier.
edgeB : numpy.ndarray
    Amp edge for the second amplifier.

Returns
-------
interfaceOffset : float
    The calculated amp offset value for the given interface between
    amps A and B.

Definition at line 449 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 324 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 135 of file ampOffset.py.

Member Data Documentation

◆ _DefaultName

str lsst.ip.isr.ampOffset.AmpOffsetTask._DefaultName = "isrAmpOffset"
staticprotected

Definition at line 123 of file ampOffset.py.

◆ ampDims

lsst.ip.isr.ampOffset.AmpOffsetTask.ampDims

Definition at line 156 of file ampOffset.py.

◆ ConfigClass

lsst.ip.isr.ampOffset.AmpOffsetTask.ConfigClass = AmpOffsetConfig
static

Definition at line 122 of file ampOffset.py.

◆ interfaceLengthLookupBySide

lsst.ip.isr.ampOffset.AmpOffsetTask.interfaceLengthLookupBySide

Definition at line 159 of file ampOffset.py.

◆ shortAmpSide

lsst.ip.isr.ampOffset.AmpOffsetTask.shortAmpSide

Definition at line 133 of file ampOffset.py.


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