LSST Applications g02d81e74bb+86cf3d8bc9,g180d380827+7a4e862ed4,g2079a07aa2+86d27d4dc4,g2305ad1205+e1ca1c66fa,g29320951ab+012e1474a1,g295015adf3+341ea1ce94,g2bbee38e9b+0e5473021a,g337abbeb29+0e5473021a,g33d1c0ed96+0e5473021a,g3a166c0a6a+0e5473021a,g3ddfee87b4+c429d67c83,g48712c4677+f88676dd22,g487adcacf7+27e1e21933,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+b41db86c35,g5a732f18d5+53520f316c,g64a986408d+86cf3d8bc9,g858d7b2824+86cf3d8bc9,g8a8a8dda67+585e252eca,g99cad8db69+84912a7fdc,g9ddcbc5298+9a081db1e4,ga1e77700b3+15fc3df1f7,ga8c6da7877+a2b54eae19,gb0e22166c9+60f28cb32d,gba4ed39666+c2a2e4ac27,gbb8dafda3b+6681f309db,gc120e1dc64+f0fcc2f6d8,gc28159a63d+0e5473021a,gcf0d15dbbd+c429d67c83,gdaeeff99f8+f9a426f77a,ge6526c86ff+0433e6603d,ge79ae78c31+0e5473021a,gee10cc3b42+585e252eca,gff1a9f87cc+86cf3d8bc9,w.2024.17
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
lsst.ip.isr.crosstalk.CrosstalkConfig Class Reference
Inheritance diagram for lsst.ip.isr.crosstalk.CrosstalkConfig:
lsst.pex.config.config.Config lsst.pex.config.config.ConfigMeta lsst.obs.decam.crosstalk.DecamCrosstalkConfig

Public Member Functions

 getCrosstalk (self, detector=None)
 
 hasCrosstalk (self, detector=None)
 

Static Public Attributes

 minPixelToMask
 
 crosstalkMaskPlane
 
 crosstalkBackgroundMethod
 
 useConfigCoefficients
 
 crosstalkValues
 
 crosstalkShape
 

Detailed Description

Configuration for intra-detector crosstalk removal.

Definition at line 639 of file crosstalk.py.

Member Function Documentation

◆ getCrosstalk()

lsst.ip.isr.crosstalk.CrosstalkConfig.getCrosstalk ( self,
detector = None )
Return a 2-D numpy array of crosstalk coefficients in the proper
shape.

Parameters
----------
detector : `lsst.afw.cameraGeom.detector`
    Detector that is to be crosstalk corrected.

Returns
-------
coeffs : `numpy.ndarray`
    Crosstalk coefficients that can be used to correct the detector.

Raises
------
RuntimeError
    Raised if no coefficients could be generated from this
    detector/configuration.

Definition at line 680 of file crosstalk.py.

680 def getCrosstalk(self, detector=None):
681 """Return a 2-D numpy array of crosstalk coefficients in the proper
682 shape.
683
684 Parameters
685 ----------
686 detector : `lsst.afw.cameraGeom.detector`
687 Detector that is to be crosstalk corrected.
688
689 Returns
690 -------
691 coeffs : `numpy.ndarray`
692 Crosstalk coefficients that can be used to correct the detector.
693
694 Raises
695 ------
696 RuntimeError
697 Raised if no coefficients could be generated from this
698 detector/configuration.
699 """
700 if self.useConfigCoefficients is True:
701 coeffs = np.array(self.crosstalkValues).reshape(self.crosstalkShape)
702 if detector is not None:
703 nAmp = len(detector)
704 if coeffs.shape != (nAmp, nAmp):
705 raise RuntimeError("Constructed crosstalk coeffients do not match detector shape. "
706 f"{coeffs.shape} {nAmp}")
707 return coeffs
708 elif detector is not None and detector.hasCrosstalk() is True:
709 # Assume the detector defines itself consistently.
710 return detector.getCrosstalk()
711 else:
712 raise RuntimeError("Attempted to correct crosstalk without crosstalk coefficients")
713

◆ hasCrosstalk()

lsst.ip.isr.crosstalk.CrosstalkConfig.hasCrosstalk ( self,
detector = None )
Return a boolean indicating if crosstalk coefficients exist.

Parameters
----------
detector : `lsst.afw.cameraGeom.detector`
    Detector that is to be crosstalk corrected.

Returns
-------
hasCrosstalk : `bool`
    True if this detector/configuration has crosstalk coefficients
    defined.

Definition at line 714 of file crosstalk.py.

714 def hasCrosstalk(self, detector=None):
715 """Return a boolean indicating if crosstalk coefficients exist.
716
717 Parameters
718 ----------
719 detector : `lsst.afw.cameraGeom.detector`
720 Detector that is to be crosstalk corrected.
721
722 Returns
723 -------
724 hasCrosstalk : `bool`
725 True if this detector/configuration has crosstalk coefficients
726 defined.
727 """
728 if self.useConfigCoefficients is True and self.crosstalkValues is not None:
729 return True
730 elif detector is not None and detector.hasCrosstalk() is True:
731 return True
732 else:
733 return False
734
735

Member Data Documentation

◆ crosstalkBackgroundMethod

lsst.ip.isr.crosstalk.CrosstalkConfig.crosstalkBackgroundMethod
static
Initial value:
= ChoiceField(
dtype=str,
doc="Type of background subtraction to use when applying correction.",
default="None",
allowed={
"None": "Do no background subtraction.",
"AMP": "Subtract amplifier-by-amplifier background levels.",
"DETECTOR": "Subtract detector level background."
},
)

Definition at line 651 of file crosstalk.py.

◆ crosstalkMaskPlane

lsst.ip.isr.crosstalk.CrosstalkConfig.crosstalkMaskPlane
static
Initial value:
= Field(
dtype=str,
doc="Name for crosstalk mask plane.",
default="CROSSTALK"
)

Definition at line 646 of file crosstalk.py.

◆ crosstalkShape

lsst.ip.isr.crosstalk.CrosstalkConfig.crosstalkShape
static
Initial value:
= ListField(
dtype=int,
doc="Shape of the coefficient array. This should be equal to [nAmp, nAmp].",
default=[1],
)

Definition at line 674 of file crosstalk.py.

◆ crosstalkValues

lsst.ip.isr.crosstalk.CrosstalkConfig.crosstalkValues
static
Initial value:
= ListField(
dtype=float,
doc=("Amplifier-indexed crosstalk coefficients to use. This should be arranged as a 1 x nAmp**2 "
"list of coefficients, such that when reshaped by crosstalkShape, the result is nAmp x nAmp. "
"This matrix should be structured so CT * [amp0 amp1 amp2 ...]^T returns the column "
"vector [corr0 corr1 corr2 ...]^T."),
default=[0.0],
)

Definition at line 666 of file crosstalk.py.

◆ minPixelToMask

lsst.ip.isr.crosstalk.CrosstalkConfig.minPixelToMask
static
Initial value:
= Field(
dtype=float,
doc="Set crosstalk mask plane for pixels over this value.",
default=45000
)

Definition at line 641 of file crosstalk.py.

◆ useConfigCoefficients

lsst.ip.isr.crosstalk.CrosstalkConfig.useConfigCoefficients
static
Initial value:
= Field(
dtype=bool,
doc="Ignore the detector crosstalk information in favor of CrosstalkConfig values?",
default=False,
)

Definition at line 661 of file crosstalk.py.


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