CpFlatFitGradientsTask#

class lsst.cp.pipe.CpFlatFitGradientsTask(*, config: PipelineTaskConfig | None = None, log: logging.Logger | LsstLogAdapter | None = None, initInputs: dict[str, Any] | None = None, **kwargs: Any)#

Bases: PipelineTask

Task to measure gradients on sky/dome flats.

Methods Summary

run(*, camera, input_flat_handle_dict, ...)

Run the CpFlatFitGradientsTask.

runQuantum(butlerQC, inputRefs, outputRefs)

Do butler IO and transform to provide in memory objects for tasks run method.

Methods Documentation

run(*, camera, input_flat_handle_dict, input_defect_handle_dict, binned_image=None)#

Run the CpFlatFitGradientsTask.

This task will fit full focal-plane gradients. See lsst.cp.pipe.utils.FlatGradientFitter for details.

The return struct will contain output_gradient if do_reference_gradient is False, or output_reference_gradient otherwise.

Parameters#

cameralsst.afw.cameraGeom.Camera

Camera object.

input_flat_handle_dictdict [int,

Dictionary of input flat handles, keyed by detector.

input_defect_handle_dictdict [int,

Dictionary of input defect handles, keyed by detector.

binned_imagenp.ndarray, optional

Binned image from a previous run of the task. This will take precedence over the input handles, for easy re-use. This may be used for debugging, or if CpFlatFitGradientsTask is used as a sub-task.

Returns#

structlsst.pipe.base.Struct
Output structure with:

output_gradient: lsst.ip.isr.FlatGradient or output_reference_gradient: lsst.ip.isr.FlatGradient model_residual_plot: matplotlib.Figure radial_model_plot: matplotlib.Figure binned_image: np.ndarray

runQuantum(butlerQC, inputRefs, outputRefs)#

Do butler IO and transform to provide in memory objects for tasks run method.

Parameters#

butlerQCQuantumContext

A butler which is specialized to operate in the context of a lsst.daf.butler.Quantum.

inputRefsInputQuantizedConnection

Datastructure whose attribute names are the names that identify connections defined in corresponding PipelineTaskConnections class. The values of these attributes are the lsst.daf.butler.DatasetRef objects associated with the defined input/prerequisite connections.

outputRefsOutputQuantizedConnection

Datastructure whose attribute names are the names that identify connections defined in corresponding PipelineTaskConnections class. The values of these attributes are the lsst.daf.butler.DatasetRef objects associated with the defined output connections.