CpCtiSolveTask#
- class lsst.cp.pipe.CpCtiSolveTask(**kwargs)#
Bases:
PipelineTaskCombine CTI measurements to a final calibration.
This task uses the extended pixel edge response (EPER) method as described by Snyder et al. 2021, Journal of Astronimcal Telescopes, Instruments, and Systems, 7, 048002. doi:10.1117/1.JATIS.7.4.048002
Methods Summary
calcCtiTurnoff(signalVec, dataVec, ctiRange, amp)Solve for turnoff value in a sequenced dataset.
calcEper(mode, inputMeasurements, amp)Solve for serial or parallel global CTI using the extended pixel edge response (EPER) method.
debugView(ampName, signal, test)Debug method for global CTI test value.
findTraps(inputMeasurements, calib, detector)Solve for serial trap parameters.
run(inputMeasurements, camera, inputDims, ...)Solve for charge transfer inefficiency from overscan measurements.
runQuantum(butlerQC, inputRefs, outputRefs)Do butler IO and transform to provide in memory objects for tasks
runmethod.solveEper(inputMeasurements, calib, detector)Solve for serial and parallel extended pixel edge response (EPER), which is an esimator of CTI defined in Snyder et al. 2021.
solveGlobalCti(inputMeasurements, calib, ...)Solve for global CTI constant.
solveLocalOffsets(inputMeasurements, calib, ...)Solve for local (pixel-to-pixel) electronic offsets.
Methods Documentation
- calcCtiTurnoff(signalVec, dataVec, ctiRange, amp)#
Solve for turnoff value in a sequenced dataset.
Parameters#
- signalVec
np.ndarray Signal values for the dataset. Must be sorted in ascending order.
- dataVec
np.ndarray Data values for the dataset. Must be sorted in ascending order.
- ctiRange
list[float] Range of CTI within which to search for the turnoff point.
Returns#
- turnoff
float The turnoff point in the same units as the input signals
- turnoffSamplingError
float The sampling error of the turnoff point, equals turnoff when not enough data points.
Notes#
If the data is sparse and does not cover the turnoff region, it will likely just return the highest signal in the dataset.
However, it will issue a warning if the turnoff point is at the edge of the search range.
- signalVec
- calcEper(mode, inputMeasurements, amp)#
Solve for serial or parallel global CTI using the extended pixel edge response (EPER) method.
Parameters#
- mode
str The orientation of the calculation to perform. Can be either “SERIAL” or “PARALLEL”.
- inputMeasurements
list[dict] List of overscan measurements from each input exposure. Each dictionary is nested within a top level “CTI” key, with measurements organized by amplifier name, containing keys:
"FIRST_COLUMN_MEAN"Mean value of first image column (
float)."LAST_COLUMN_MEAN"Mean value of last image column (
float)."IMAGE_MEAN"Mean value of the entire image region (
float)."SERIAL_OVERSCAN_COLUMNS"List of serial overscan column indicies (
list[int])."SERIAL_OVERSCAN_VALUES"List of serial overscan column means (
list[float])."PARALLEL_OVERSCAN_ROWS"List of parallel overscan row indicies (
list[int])."PARALLEL_OVERSCAN_VALUES"List of parallel overscan row means (
list[float]).
- calib
lsst.ip.isr.DeferredChargeCalib Calibration to populate with values.
- amp
lsst.afw.cameraGeom.Amplifier Amplifier object containing the geometry information for the amplifier.
Returns#
- calib
lsst.ip.isr.DeferredChargeCalib Populated calibration.
Raises#
- RuntimeErrorRaised if no data remains after flux filtering or if
the mode string is not one of “SERIAL” or “PARALLEL”.
- mode
- debugView(ampName, signal, test)#
Debug method for global CTI test value.
Parameters#
- ampName
str Name of the amp for plot title.
- signal
list[float] Image means for the input exposures.
- test
list[float] CTI test value to plot.
- ampName
- findTraps(inputMeasurements, calib, detector)#
Solve for serial trap parameters.
Parameters#
- inputMeasurements
list[dict] List of overscan measurements from each input exposure. Each dictionary is nested within a top level “CTI” key, with measurements organized by amplifier name, containing keys:
"FIRST_COLUMN_MEAN"Mean value of first image column (
float)."LAST_COLUMN_MEAN"Mean value of last image column (
float)."IMAGE_MEAN"Mean value of the entire image region (
float)."SERIAL_OVERSCAN_COLUMNS"List of overscan column indicies (
list[int])."SERIAL_OVERSCAN_VALUES"List of overscan column means (
list[float]).
- calib
lsst.ip.isr.DeferredChargeCalib Calibration to populate with values.
- detector
lsst.afw.cameraGeom.Detector Detector object containing the geometry information for the amplifiers.
Returns#
- calib
lsst.ip.isr.DeferredChargeCalib Populated calibration.
Raises#
- RuntimeError
Raised if no data remains after flux filtering.
Notes#
The original CTISIM code uses a data model in which the “overscan” consists of the standard serial overscan bbox with the values for the last imaging data column prepended to that list. This version of the code keeps the overscan and imaging sections separate, and so a -1 offset is needed to ensure that the same columns are used for fitting between this code and CTISIM. This offset removes that last imaging data column from the count.
- inputMeasurements
- run(inputMeasurements, camera, inputDims, linearizer)#
Solve for charge transfer inefficiency from overscan measurements.
Parameters#
- inputMeasurements
list[dict] List of overscan measurements from each input exposure. Each dictionary is nested within a top level “CTI” key, with measurements organized by amplifier name, containing keys:
"FIRST_COLUMN_MEAN"Mean value of first image column (
float)."LAST_COLUMN_MEAN"Mean value of last image column (
float)."IMAGE_MEAN"Mean value of the entire image region (
float)."SERIAL_OVERSCAN_COLUMNS"List of overscan column indicies (
list[int])."SERIAL_OVERSCAN_VALUES"List of overscan column means (
list[float])."PARALLEL_OVERSCAN_ROWS"List of overscan row indicies (
list[int])."PARALLEL_OVERSCAN_VALUES"List of overscan row means (
list[float)."INPUT_GAIN"The gains used to convert the image to electrons before calculating CTI statistics. (
float).
- camera
lsst.afw.cameraGeom.Camera Camera geometry to use to find detectors.
- inputDims
list[dict] List of input dimensions from each input exposure.
- linearizer
lsst.ip.isr.Linearizer Input linearizer. Used for metadata inheritance.
Returns#
- results
lsst.pipe.base.Struct Result struct containing:
outputCalibFinal CTI calibration data (
lsst.ip.isr.DeferredChargeCalib).
Raises#
- RuntimeError
Raised if data from multiple detectors are passed in.
- inputMeasurements
- runQuantum(butlerQC, inputRefs, outputRefs)#
Do butler IO and transform to provide in memory objects for tasks
runmethod.Parameters#
- butlerQC
QuantumContext A butler which is specialized to operate in the context of a
lsst.daf.butler.Quantum.- inputRefs
InputQuantizedConnection Datastructure whose attribute names are the names that identify connections defined in corresponding
PipelineTaskConnectionsclass. The values of these attributes are thelsst.daf.butler.DatasetRefobjects associated with the defined input/prerequisite connections.- outputRefs
OutputQuantizedConnection Datastructure whose attribute names are the names that identify connections defined in corresponding
PipelineTaskConnectionsclass. The values of these attributes are thelsst.daf.butler.DatasetRefobjects associated with the defined output connections.
- butlerQC
- solveEper(inputMeasurements, calib, detector)#
Solve for serial and parallel extended pixel edge response (EPER), which is an esimator of CTI defined in Snyder et al. 2021.
Parameters#
- inputMeasurements
list[dict] List of overscan measurements from each input exposure. Each dictionary is nested within a top level “CTI” key, with measurements organized by amplifier name, containing keys:
"FIRST_COLUMN_MEAN"Mean value of first image column (
float)."LAST_COLUMN_MEAN"Mean value of last image column (
float)."IMAGE_MEAN"Mean value of the entire image region (
float)."SERIAL_OVERSCAN_COLUMNS"List of overscan column indicies (
list[int])."SERIAL_OVERSCAN_VALUES"List of overscan column means (
list[float])."PARALLEL_OVERSCAN_ROWS"List of overscan row indicies (
list[int])."PARALLEL_OVERSCAN_VALUES"List of overscan row means (
list[float).
- calib
lsst.ip.isr.DeferredChargeCalib Calibration to populate with values.
- detector
lsst.afw.cameraGeom.Detector Detector object containing the geometry information for the amplifiers.
Returns#
- calib
lsst.ip.isr.DeferredChargeCalib Populated calibration.
Notes#
The original CTISIM code uses a data model in which the “overscan” consists of the standard serial overscan bbox with the values for the last imaging data column prepended to that list. This version of the code keeps the overscan and imaging sections separate, and so a -1 offset is needed to ensure that the same columns are used for fitting between this code and CTISIM. This offset removes that last imaging data column from the count.
- inputMeasurements
- solveGlobalCti(inputMeasurements, calib, detector)#
Solve for global CTI constant.
This method solves for the mean global CTI, b.
Parameters#
- inputMeasurements
list[dict] List of overscan measurements from each input exposure. Each dictionary is nested within a top level “CTI” key, with measurements organized by amplifier name, containing keys:
"FIRST_COLUMN_MEAN"Mean value of first image column (
float)."LAST_COLUMN_MEAN"Mean value of last image column (
float)."IMAGE_MEAN"Mean value of the entire image region (
float)."SERIAL_OVERSCAN_COLUMNS"List of overscan column indicies (
list[int])."SERIAL_OVERSCAN_VALUES"List of overscan column means (
list[float])."PARALLEL_OVERSCAN_ROWS"List of overscan row indicies (
list[int])."PARALLEL_OVERSCAN_VALUES"List of overscan row means (
list[float).
- calib
lsst.ip.isr.DeferredChargeCalib Calibration to populate with values.
- detector
lsst.afw.cameraGeom.Detector Detector object containing the geometry information for the amplifiers.
Returns#
- calib
lsst.ip.isr.DeferredChargeCalib Populated calibration.
Raises#
- RuntimeError
Raised if no data remains after flux filtering.
Notes#
The original CTISIM code uses a data model in which the “overscan” consists of the standard serial overscan bbox with the values for the last imaging data column prepended to that list. This version of the code keeps the overscan and imaging sections separate, and so a -1 offset is needed to ensure that the same columns are used for fitting between this code and CTISIM. This offset removes that last imaging data column from the count.
- inputMeasurements
- solveLocalOffsets(inputMeasurements, calib, detector)#
Solve for local (pixel-to-pixel) electronic offsets.
This method fits for au_L, the local electronic offset decay time constant, and A_L, the local electronic offset constant of proportionality.
Parameters#
- inputMeasurements
list[dict] List of overscan measurements from each input exposure. Each dictionary is nested within a top level “CTI” key, with measurements organized by amplifier name, containing keys:
"FIRST_COLUMN_MEAN"Mean value of first image column (
float)."LAST_COLUMN_MEAN"Mean value of last image column (
float)."IMAGE_MEAN"Mean value of the entire image region (
float)."SERIAL_OVERSCAN_COLUMNS"List of overscan column indicies (
list[int])."SERIAL_OVERSCAN_VALUES"List of overscan column means (
list[float])."PARALLEL_OVERSCAN_ROWS"List of overscan row indicies (
list[int])."PARALLEL_OVERSCAN_VALUES"List of overscan row means (
list[float).
- calib
lsst.ip.isr.DeferredChargeCalib Calibration to populate with values.
- detector
lsst.afw.cameraGeom.Detector Detector object containing the geometry information for the amplifiers.
Returns#
- calib
lsst.ip.isr.DeferredChargeCalib Populated calibration.
Raises#
- RuntimeError
Raised if no data remains after flux filtering.
Notes#
The original CTISIM code (Snyder005/ctisim) uses a data model in which the “overscan” consists of the standard serial overscan bbox with the values for the last imaging data column prepended to that list. This version of the code keeps the overscan and imaging sections separate, and so a -1 offset is needed to ensure that the same columns are used for fitting between this code and CTISIM. This offset removes that last imaging data column from the count.
- inputMeasurements