lsst.ip.isr
20.0.0-3-g2fa8bb8+2
|
Public Member Functions | |
def | __init__ (self, *args, **kwargs) |
def | parseAndRun (cls, *args, **kwargs) |
def | runDataRef (self, dataRef) |
def | run (self, exposure, dataId=None) |
def | extractCrosstalkRatios (self, exposure, threshold=None, badPixels=None) |
def | reduce (self, ratioList) |
def | measureCrosstalkCoefficients (self, ratios, rejIter=3, rejSigma=2.0) |
def | debugView (self, stepname, exposure) |
def | debugPixels (self, stepname, pixelsIn, pixelsOut, i, j) |
def | debugRatios (self, stepname, ratios, i, j) |
Public Attributes | |
calib | |
Static Public Attributes | |
ConfigClass = MeasureCrosstalkConfig | |
Measure intra-detector crosstalk. Notes ----- The crosstalk this method measures assumes that when a bright pixel is found in one detector amplifier, all other detector amplifiers may see an increase in the same pixel location (relative to the readout amplifier) as these other pixels are read out at the same time. After processing each input exposure through a limited set of ISR stages, bright unmasked pixels above the threshold are identified. The potential CT signal is found by taking the ratio of the appropriate background-subtracted pixel value on the other amplifiers to the input value on the source amplifier. If the source amplifier has a large number of bright pixels as well, the background level may be elevated, leading to poor ratio measurements. The set of ratios found between each pair of amplifiers across all input exposures is then gathered to produce the final CT coefficients. The sigma-clipped mean and sigma are returned from these sets of ratios, with the coefficient to supply to the ISR CrosstalkTask() being the multiplicative inverse of these values.
Definition at line 103 of file measureCrosstalk.py.
def lsst.ip.isr.measureCrosstalk.MeasureCrosstalkTask.__init__ | ( | self, | |
* | args, | ||
** | kwargs | ||
) |
Definition at line 132 of file measureCrosstalk.py.
def lsst.ip.isr.measureCrosstalk.MeasureCrosstalkTask.debugPixels | ( | self, | |
stepname, | |||
pixelsIn, | |||
pixelsOut, | |||
i, | |||
j | |||
) |
Utility function to examine the CT ratio pixel values. Parameters ---------- stepname : `str` State of processing to view. pixelsIn : `np.ndarray` Pixel values from the potential crosstalk "source". pixelsOut : `np.ndarray` Pixel values from the potential crosstalk "victim". i : `int` Index of the source amplifier. j : `int` Index of the target amplifier.
Definition at line 504 of file measureCrosstalk.py.
def lsst.ip.isr.measureCrosstalk.MeasureCrosstalkTask.debugRatios | ( | self, | |
stepname, | |||
ratios, | |||
i, | |||
j | |||
) |
Utility function to examine the final CT ratio set. Parameters ---------- stepname : `str` State of processing to view. ratios : `List` of `List` of `np.ndarray` Array of measured CT ratios, indexed by source/victim amplifier. i : `int` Index of the source amplifier. j : `int` Index of the target amplifier.
Definition at line 543 of file measureCrosstalk.py.
def lsst.ip.isr.measureCrosstalk.MeasureCrosstalkTask.debugView | ( | self, | |
stepname, | |||
exposure | |||
) |
Utility function to examine the image being processed. Parameters ---------- stepname : `str` State of processing to view. exposure : `lsst.afw.image.Exposure` Exposure to view.
Definition at line 482 of file measureCrosstalk.py.
def lsst.ip.isr.measureCrosstalk.MeasureCrosstalkTask.extractCrosstalkRatios | ( | self, | |
exposure, | |||
threshold = None , |
|||
badPixels = None |
|||
) |
Extract crosstalk ratios between different amplifiers. For pixels above ``threshold``, we calculate the ratio between each background-subtracted target amp and the source amp. We return a list of ratios for each pixel for each target/source combination, as a matrix of lists. Parameters ---------- exposure : `lsst.afw.image.Exposure` Exposure for which to measure crosstalk. threshold : `float`, optional Lower limit on pixels for which we measure crosstalk. badPixels : `list` of `str`, optional Mask planes indicating a pixel is bad. Returns ------- ratios : `list` of `list` of `numpy.ndarray` A matrix of pixel arrays. ``ratios[i][j]`` is an array of the fraction of the ``j``-th amp present on the ``i``-th amp. The value is `None` for the diagonal elements. Notes ----- This has been moved into MeasureCrosstalkTask to allow for easier debugging. The lsstDebug.Info() method can be rewritten for __name__ = `lsst.ip.isr.measureCrosstalk`, and supports the parameters: debug.display['extract'] : `bool` Display the exposure under consideration, with the pixels used for crosstalk measurement indicated by the DETECTED mask plane. debug.display['pixels'] : `bool` Display a plot of the ratio calculated for each pixel used in this exposure, split by amplifier pairs. The median value is listed for reference.
Definition at line 265 of file measureCrosstalk.py.
def lsst.ip.isr.measureCrosstalk.MeasureCrosstalkTask.measureCrosstalkCoefficients | ( | self, | |
ratios, | |||
rejIter = 3 , |
|||
rejSigma = 2.0 |
|||
) |
Measure crosstalk coefficients from the ratios. Given a list of ratios for each target/source amp combination, we measure a sigma clipped mean and error. The coefficient errors returned are the standard deviation of the final set of clipped input ratios. Parameters ---------- ratios : `list` of `list` of `numpy.ndarray` Matrix of arrays of ratios. rejIter : `int` Number of rejection iterations. rejSigma : `float` Rejection threshold (sigma). Returns ------- coeff : `numpy.ndarray` Crosstalk coefficients. coeffErr : `numpy.ndarray` Crosstalk coefficient errors. coeffNum : `numpy.ndarray` Number of pixels for each measurement. Notes ----- This has been moved into MeasureCrosstalkTask to allow for easier debugging. The lsstDebug.Info() method can be rewritten for __name__ = `lsst.ip.isr.measureCrosstalk`, and supports the parameters: debug.display['measure'] : `bool` Display a histogram of the combined ratio measurements for a pair of source/target amplifiers from the final set of clipped input ratios.
Definition at line 401 of file measureCrosstalk.py.
def lsst.ip.isr.measureCrosstalk.MeasureCrosstalkTask.parseAndRun | ( | cls, | |
* | args, | ||
** | kwargs | ||
) |
Collate crosstalk results from multiple exposures. Process all input exposures through runDataRef, construct final measurements from the final list of results from each input, and persist the output calibration. This method will be deprecated as part of DM-24760. Returns ------- coeff : `numpy.ndarray` Crosstalk coefficients. coeffErr : `numpy.ndarray` Crosstalk coefficient errors. coeffNum : `numpy.ndarray` Number of pixels used for crosstalk measurement. calib : `lsst.ip.isr.CrosstalkCalib` Crosstalk object created from the measurements.
Definition at line 149 of file measureCrosstalk.py.
def lsst.ip.isr.measureCrosstalk.MeasureCrosstalkTask.reduce | ( | self, | |
ratioList | |||
) |
Combine ratios to produce crosstalk coefficients. Parameters ---------- ratioList : `list` of `list` of `list` of `numpy.ndarray` A list of matrices of arrays; a list of results from `extractCrosstalkRatios`. Returns ------- coeff : `numpy.ndarray` Crosstalk coefficients. coeffErr : `numpy.ndarray` Crosstalk coefficient errors. coeffNum : `numpy.ndarray` Number of pixels used for crosstalk measurement. Raises ------ RuntimeError Raised if there is no crosstalk data available. Notes ----- The lsstDebug.Info() method can be rewritten for __name__ = `lsst.ip.isr.measureCrosstalk`, and supports the parameters: debug.display['reduce'] : `bool` Display a histogram of the combined ratio measurements for a pair of source/target amplifiers from all input exposures/detectors.
Definition at line 333 of file measureCrosstalk.py.
def lsst.ip.isr.measureCrosstalk.MeasureCrosstalkTask.run | ( | self, | |
exposure, | |||
dataId = None |
|||
) |
Extract and return cross talk ratios for an exposure. Parameters ---------- exposure : `lsst.afw.image.Exposure` Image data to measure crosstalk ratios from. dataId : Optional data ID for the exposure to process; used for logging. Returns ------- ratios : `list` of `list` of `numpy.ndarray` A matrix of pixel arrays.
Definition at line 245 of file measureCrosstalk.py.
def lsst.ip.isr.measureCrosstalk.MeasureCrosstalkTask.runDataRef | ( | self, | |
dataRef | |||
) |
Get crosstalk ratios for detector. Parameters ---------- dataRef : `lsst.daf.peristence.ButlerDataRef` Data references for detectors to process. Returns ------- ratios : `list` of `list` of `numpy.ndarray` A matrix of pixel arrays.
Definition at line 219 of file measureCrosstalk.py.
lsst.ip.isr.measureCrosstalk.MeasureCrosstalkTask.calib |
Definition at line 135 of file measureCrosstalk.py.
|
static |
Definition at line 129 of file measureCrosstalk.py.