LSST Applications g1cfbe01172+01aa18f939,g20cdd03214+31e6b93548,g28da252d5a+ea8665a95b,g2bbee38e9b+9ec6cc348d,g2bc492864f+9ec6cc348d,g347aa1857d+9ec6cc348d,g3a166c0a6a+9ec6cc348d,g4322eb9e3a+65eff1e020,g461a3dce89+b86e4b8053,g50ff169b8f+f991eae79d,g52b1c1532d+b86e4b8053,g607f77f49a+31e6b93548,g78056777b3+8ae2798781,g858d7b2824+31e6b93548,g8cd86fa7b1+4851e61ca4,g9ddcbc5298+f24b38b85a,ga1e77700b3+3309dba821,gae0086650b+b86e4b8053,gb0e22166c9+6076c0b52b,gbb886bcc26+dccb771098,gbd462c55f0+dc07f8e65d,gc0c51c7ec2+31e6b93548,gc120e1dc64+a417ce3171,gc28159a63d+9ec6cc348d,gc2a6998b7e+f95f64aeae,gcdd4ae20e8+507450c4cd,gcf0d15dbbd+507450c4cd,gd1535ee943+bcf88ba65f,gd598c5cd71+66126f91fb,gdaeeff99f8+006e14e809,gdbce86181e+39d5515b1a,ge3d4d395c2+b12d4d6a95,ge79ae78c31+9ec6cc348d,gf048a9a2f4+d9c36e6b63,gfbcc870c63+ea41c4420b,w.2024.27
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
 
 doQuadraticCrosstalkCorrection
 

Detailed Description

Configuration for intra-detector crosstalk removal.

Definition at line 791 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 837 of file crosstalk.py.

837 def getCrosstalk(self, detector=None):
838 """Return a 2-D numpy array of crosstalk coefficients in the proper
839 shape.
840
841 Parameters
842 ----------
843 detector : `lsst.afw.cameraGeom.detector`
844 Detector that is to be crosstalk corrected.
845
846 Returns
847 -------
848 coeffs : `numpy.ndarray`
849 Crosstalk coefficients that can be used to correct the detector.
850
851 Raises
852 ------
853 RuntimeError
854 Raised if no coefficients could be generated from this
855 detector/configuration.
856 """
857 if self.useConfigCoefficients is True:
858 coeffs = np.array(self.crosstalkValues).reshape(self.crosstalkShape)
859 if detector is not None:
860 nAmp = len(detector)
861 if coeffs.shape != (nAmp, nAmp):
862 raise RuntimeError("Constructed crosstalk coeffients do not match detector shape. "
863 f"{coeffs.shape} {nAmp}")
864 return coeffs
865 elif detector is not None and detector.hasCrosstalk() is True:
866 # Assume the detector defines itself consistently.
867 return detector.getCrosstalk()
868 else:
869 raise RuntimeError("Attempted to correct crosstalk without crosstalk coefficients")
870

◆ 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 871 of file crosstalk.py.

871 def hasCrosstalk(self, detector=None):
872 """Return a boolean indicating if crosstalk coefficients exist.
873
874 Parameters
875 ----------
876 detector : `lsst.afw.cameraGeom.detector`
877 Detector that is to be crosstalk corrected.
878
879 Returns
880 -------
881 hasCrosstalk : `bool`
882 True if this detector/configuration has crosstalk coefficients
883 defined.
884 """
885 if self.useConfigCoefficients is True and self.crosstalkValues is not None:
886 return True
887 elif detector is not None and detector.hasCrosstalk() is True:
888 return True
889 else:
890 return False
891
892

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 803 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 798 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 826 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 818 of file crosstalk.py.

◆ doQuadraticCrosstalkCorrection

lsst.ip.isr.crosstalk.CrosstalkConfig.doQuadraticCrosstalkCorrection
static
Initial value:
= Field(
dtype=bool,
doc="Use quadratic crosstalk coefficients in the crosstalk correction",
default=False,
)

Definition at line 831 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 793 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 813 of file crosstalk.py.


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