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
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: