LSST Applications 27.0.0,g0265f82a02+469cd937ee,g02d81e74bb+21ad69e7e1,g1470d8bcf6+cbe83ee85a,g2079a07aa2+e67c6346a6,g212a7c68fe+04a9158687,g2305ad1205+94392ce272,g295015adf3+81dd352a9d,g2bbee38e9b+469cd937ee,g337abbeb29+469cd937ee,g3939d97d7f+72a9f7b576,g487adcacf7+71499e7cba,g50ff169b8f+5929b3527e,g52b1c1532d+a6fc98d2e7,g591dd9f2cf+df404f777f,g5a732f18d5+be83d3ecdb,g64a986408d+21ad69e7e1,g858d7b2824+21ad69e7e1,g8a8a8dda67+a6fc98d2e7,g99cad8db69+f62e5b0af5,g9ddcbc5298+d4bad12328,ga1e77700b3+9c366c4306,ga8c6da7877+71e4819109,gb0e22166c9+25ba2f69a1,gb6a65358fc+469cd937ee,gbb8dafda3b+69d3c0e320,gc07e1c2157+a98bf949bb,gc120e1dc64+615ec43309,gc28159a63d+469cd937ee,gcf0d15dbbd+72a9f7b576,gdaeeff99f8+a38ce5ea23,ge6526c86ff+3a7c1ac5f1,ge79ae78c31+469cd937ee,gee10cc3b42+a6fc98d2e7,gf1cff7945b+21ad69e7e1,gfbcc870c63+9a11dc8c8f
LSST Data Management Base Package
|
Public Member Functions | |
__init__ (self, detector=None, nAmp=0, **kwargs) | |
updateMetadata (self, setDate=False, **kwargs) | |
fromDetector (self, detector, coeffVector=None) | |
fromDict (cls, dictionary) | |
toDict (self) | |
fromTable (cls, tableList) | |
toTable (self) | |
subtractCrosstalk (self, thisExposure, sourceExposure=None, crosstalkCoeffs=None, badPixels=["BAD"], minPixelToMask=45000, crosstalkStr="CROSSTALK", isTrimmed=False, backgroundMethod="None") | |
subtractCrosstalkParallelOverscanRegion (self, thisExposure, crosstalkCoeffs=None, badPixels=["BAD"], crosstalkStr="CROSSTALK", detectorConfig=None) | |
Static Public Member Functions | |
extractAmp (image, amp, ampTarget, isTrimmed=False) | |
calculateBackground (mi, badPixels=["BAD"]) | |
Public Attributes | |
hasCrosstalk | |
nAmp | |
crosstalkShape | |
coeffs | |
coeffErr | |
coeffNum | |
coeffValid | |
interChip | |
Protected Attributes | |
_detectorId | |
_detectorName | |
_detectorSerial | |
Static Protected Attributes | |
str | _OBSTYPE = 'CROSSTALK' |
str | _SCHEMA = 'Gen3 Crosstalk' |
float | _VERSION = 1.0 |
Calibration of amp-to-amp crosstalk coefficients. Parameters ---------- detector : `lsst.afw.cameraGeom.Detector`, optional Detector to use to pull coefficients from. nAmp : `int`, optional Number of amplifiers to initialize. log : `logging.Logger`, optional Log to write messages to. **kwargs : Parameters to pass to parent constructor. Notes ----- The crosstalk attributes stored are: hasCrosstalk : `bool` Whether there is crosstalk defined for this detector. nAmp : `int` Number of amplifiers in this detector. crosstalkShape : `tuple` [`int`, `int`] A tuple containing the shape of the ``coeffs`` matrix. This should be equivalent to (``nAmp``, ``nAmp``). coeffs : `numpy.ndarray` A matrix containing the crosstalk coefficients. coeff[i][j] contains the coefficients to calculate the contribution amplifier_j has on amplifier_i (each row[i] contains the corrections for detector_i). coeffErr : `numpy.ndarray`, optional A matrix (as defined by ``coeffs``) containing the standard distribution of the crosstalk measurements. coeffNum : `numpy.ndarray`, optional A matrix containing the number of pixel pairs used to measure the ``coeffs`` and ``coeffErr``. coeffValid : `numpy.ndarray`, optional A matrix of Boolean values indicating if the coefficient is valid, defined as abs(coeff) > coeffErr / sqrt(coeffNum). interChip : `dict` [`numpy.ndarray`] A dictionary keyed by detectorName containing ``coeffs`` matrices used to correct for inter-chip crosstalk with a source on the detector indicated.
Definition at line 41 of file crosstalk.py.
lsst.ip.isr.crosstalk.CrosstalkCalib.__init__ | ( | self, | |
detector = None, | |||
nAmp = 0, | |||
** | kwargs ) |
Reimplemented from lsst.ip.isr.calibType.IsrCalib.
Definition at line 90 of file crosstalk.py.
|
static |
Estimate median background in image. Getting a great background model isn't important for crosstalk correction, since the crosstalk is at a low level. The median should be sufficient. Parameters ---------- mi : `lsst.afw.image.MaskedImage` MaskedImage for which to measure background. badPixels : `list` of `str` Mask planes to ignore. Returns ------- bg : `float` Median background level.
Definition at line 435 of file crosstalk.py.
|
static |
Extract the image data from an amp, flipped to match ampTarget. Parameters ---------- image : `lsst.afw.image.Image` or `lsst.afw.image.MaskedImage` Image containing the amplifier of interest. amp : `lsst.afw.cameraGeom.Amplifier` Amplifier on image to extract. ampTarget : `lsst.afw.cameraGeom.Amplifier` Target amplifier that the extracted image will be flipped to match. isTrimmed : `bool` The image is already trimmed. TODO : DM-15409 will resolve this. Returns ------- output : `lsst.afw.image.Image` Image of the amplifier in the desired configuration.
Definition at line 394 of file crosstalk.py.
lsst.ip.isr.crosstalk.CrosstalkCalib.fromDetector | ( | self, | |
detector, | |||
coeffVector = None ) |
Set calibration parameters from the detector. Parameters ---------- detector : `lsst.afw.cameraGeom.Detector` Detector to use to set parameters from. coeffVector : `numpy.array`, optional Use the detector geometry (bounding boxes and flip information), but use ``coeffVector`` instead of the output of ``detector.getCrosstalk()``. Returns ------- calib : `lsst.ip.isr.CrosstalkCalib` The calibration constructed from the detector.
Reimplemented from lsst.ip.isr.calibType.IsrCalib.
Definition at line 134 of file crosstalk.py.
lsst.ip.isr.crosstalk.CrosstalkCalib.fromDict | ( | cls, | |
dictionary ) |
Construct a calibration from a dictionary of properties. Must be implemented by the specific calibration subclasses. Parameters ---------- dictionary : `dict` Dictionary of properties. Returns ------- calib : `lsst.ip.isr.CalibType` Constructed calibration. Raises ------ RuntimeError Raised if the supplied dictionary is for a different calibration.
Reimplemented from lsst.ip.isr.calibType.IsrCalib.
Definition at line 182 of file crosstalk.py.
lsst.ip.isr.crosstalk.CrosstalkCalib.fromTable | ( | cls, | |
tableList ) |
Construct calibration from a list of tables. This method uses the `fromDict` method to create the calibration, after constructing an appropriate dictionary from the input tables. Parameters ---------- tableList : `list` [`lsst.afw.table.Table`] List of tables to use to construct the crosstalk calibration. Returns ------- calib : `lsst.ip.isr.CrosstalkCalib` The calibration defined in the tables.
Reimplemented from lsst.ip.isr.calibType.IsrCalib.
Definition at line 314 of file crosstalk.py.
lsst.ip.isr.crosstalk.CrosstalkCalib.subtractCrosstalk | ( | self, | |
thisExposure, | |||
sourceExposure = None, | |||
crosstalkCoeffs = None, | |||
badPixels = ["BAD"], | |||
minPixelToMask = 45000, | |||
crosstalkStr = "CROSSTALK", | |||
isTrimmed = False, | |||
backgroundMethod = "None" ) |
Subtract the crosstalk from thisExposure, optionally using a different source. We set the mask plane indicated by ``crosstalkStr`` in a target amplifier for pixels in a source amplifier that exceed ``minPixelToMask``. Note that the correction is applied to all pixels in the amplifier, but only those that have a substantial crosstalk are masked with ``crosstalkStr``. The uncorrected image is used as a template for correction. This is good enough if the crosstalk is small (e.g., coefficients < ~ 1e-3), but if it's larger you may want to iterate. Parameters ---------- thisExposure : `lsst.afw.image.Exposure` Exposure for which to subtract crosstalk. sourceExposure : `lsst.afw.image.Exposure`, optional Exposure to use as the source of the crosstalk. If not set, thisExposure is used as the source (intra-detector crosstalk). crosstalkCoeffs : `numpy.ndarray`, optional. Coefficients to use to correct crosstalk. badPixels : `list` of `str` Mask planes to ignore. minPixelToMask : `float` Minimum pixel value (relative to the background level) in source amplifier for which to set ``crosstalkStr`` mask plane in target amplifier. crosstalkStr : `str` Mask plane name for pixels greatly modified by crosstalk (above minPixelToMask). isTrimmed : `bool` The image is already trimmed. This should no longer be needed once DM-15409 is resolved. backgroundMethod : `str` Method used to subtract the background. "AMP" uses amplifier-by-amplifier background levels, "DETECTOR" uses full exposure/maskedImage levels. Any other value results in no background subtraction.
Definition at line 458 of file crosstalk.py.
lsst.ip.isr.crosstalk.CrosstalkCalib.subtractCrosstalkParallelOverscanRegion | ( | self, | |
thisExposure, | |||
crosstalkCoeffs = None, | |||
badPixels = ["BAD"], | |||
crosstalkStr = "CROSSTALK", | |||
detectorConfig = None ) |
Subtract crosstalk just from the parallel overscan region. This assumes that serial overscan has been previously subtracted. Parameters ---------- thisExposure : `lsst.afw.image.Exposure` Exposure for which to subtract crosstalk. crosstalkCoeffs : `numpy.ndarray`, optional. Coefficients to use to correct crosstalk. badPixels : `list` of `str` Mask planes to ignore. crosstalkStr : `str` Mask plane name for pixels greatly modified by crosstalk (above minPixelToMask). detectorConfig : `lsst.ip.isr.overscanDetectorConfig`, optional Per-amplifier configs to use.
Definition at line 570 of file crosstalk.py.
lsst.ip.isr.crosstalk.CrosstalkCalib.toDict | ( | self | ) |
Return a dictionary containing the calibration properties. The dictionary should be able to be round-tripped through `fromDict`. Returns ------- dictionary : `dict` Dictionary of properties.
Reimplemented from lsst.ip.isr.calibType.IsrCalib.
Definition at line 275 of file crosstalk.py.
lsst.ip.isr.crosstalk.CrosstalkCalib.toTable | ( | self | ) |
Construct a list of tables containing the information in this calibration. The list of tables should create an identical calibration after being passed to this class's fromTable method. Returns ------- tableList : `list` [`lsst.afw.table.Table`] List of tables containing the crosstalk calibration information.
Reimplemented from lsst.ip.isr.calibType.IsrCalib.
Definition at line 357 of file crosstalk.py.
lsst.ip.isr.crosstalk.CrosstalkCalib.updateMetadata | ( | self, | |
setDate = False, | |||
** | kwargs ) |
Update calibration metadata. This calls the base class's method after ensuring the required calibration keywords will be saved. Parameters ---------- setDate : `bool`, optional Update the CALIBDATE fields in the metadata to the current time. Defaults to False. kwargs : Other keyword parameters to set in the metadata.
Reimplemented from lsst.ip.isr.calibType.IsrCalib.
Definition at line 110 of file crosstalk.py.
|
protected |
Definition at line 153 of file crosstalk.py.
|
protected |
Definition at line 154 of file crosstalk.py.
|
protected |
Definition at line 155 of file crosstalk.py.
|
staticprotected |
Definition at line 86 of file crosstalk.py.
|
staticprotected |
Definition at line 87 of file crosstalk.py.
|
staticprotected |
Definition at line 88 of file crosstalk.py.
lsst.ip.isr.crosstalk.CrosstalkCalib.coeffErr |
Definition at line 96 of file crosstalk.py.
lsst.ip.isr.crosstalk.CrosstalkCalib.coeffNum |
Definition at line 97 of file crosstalk.py.
lsst.ip.isr.crosstalk.CrosstalkCalib.coeffs |
Definition at line 95 of file crosstalk.py.
lsst.ip.isr.crosstalk.CrosstalkCalib.coeffValid |
Definition at line 99 of file crosstalk.py.
lsst.ip.isr.crosstalk.CrosstalkCalib.crosstalkShape |
Definition at line 93 of file crosstalk.py.
lsst.ip.isr.crosstalk.CrosstalkCalib.hasCrosstalk |
Definition at line 91 of file crosstalk.py.
lsst.ip.isr.crosstalk.CrosstalkCalib.interChip |
Definition at line 101 of file crosstalk.py.
lsst.ip.isr.crosstalk.CrosstalkCalib.nAmp |
Definition at line 92 of file crosstalk.py.