CpFlatFitGradientsTask¶
CpFlatFitGradientsTask
is a task to fit large scale radial and planar gradients in the full field-of-view, with emphasis on LSSTCam flat-fields.
This task is intended to be used in two ways:
The task can be applied to a sky flat to generate a reference gradient calibration product, with the default name of
flat_gradient_reference
(with one per physical filter).The task can be applied to a dome flat to generate an intermediate gradient product, with the default name of
flat_gradient
.
There is a second task, CpFlatApplyGradientsTask, that can be used to remove any planar gradients from a dome flat and adjust the radial function so that it matches the reference gradient generated from the sky flat.
Processing Summary¶
CpFlatFitGradientsTask
runs this sequence of operations:
All flats over the full focal plane are loaded, defects are applied, they are rebinned according to the configuration, and the bins are projected into focal plane coordinates (with x and y in millimeters).
The flat may be normalized over the central region (rather than the default focal-plane average).
A spline model to the radial gradient is fit, along with a nuisance parameter for the average relative throughput of the ITL to E2V detectors. Additionally, a planar gradient may be fit; an extra planar gradient that only applies at large radii; and an offset to the centroid for the radial spline model.
Basic QA plots showing the focal plane model and residuals, along with the radial function, are created.
The gradient is output, with the precise dataset type determined by whether this is a reference gradient or a dome gradient.
Python API summary¶
from lsst.cp.pipe.cpFlatGradients import CpFlatFitGradientsTask
-
class
CpFlatFitGradientsTask
(*, config=None, log=None, initInputs=None, **kwargs) Task to measure gradients on sky/dome flats
...
- attributeconfig
Access configuration fields and retargetable subtasks.
-
method
run
(*, camera, input_flat_handle_dict, input_defect_handle_dict) Run the CpFlatFitGradientsTask
...
See also
See the CpFlatFitGradientsTask
API reference for complete details.
Configuration fields¶
bin_factor¶
Binning factor for flats going into the focal plane.
connections¶
- Data type
lsst.pipe.base.config.CpFlatFitGradientsConfigConnections
- Field type
Configurations describing the connections of the PipelineTask to datatypes
detector_boundary¶
Do not use pixels within detector_boundary of the edge for fitting.
do_constrain_zero¶
Constrain the outermost radial spline value to zero?
do_fit_centroid¶
Fit a centroid offset from the focal plane centroid?
do_fit_gradient¶
Fit a linear gradient over the focal plane?
do_fit_outer_gradient¶
Fit a separate gradient to the outer region of the focal plane?
do_normalize_center¶
Normalize center of focal plane to 1.0?
do_reference_gradient¶
Use task to produce a reference gradient (from sky)? This is used to control the dataset type of the output.
fit_eps¶
Minimizer epsilon parameter.
fit_gtol¶
Minimizer gtol parameter.
fp_centroid_x¶
Focal plane centroid x (mm).
fp_centroid_y¶
Focal plane centroid y (mm).
max_flat_value¶
Maximum (relative) flat value to use in fit.
min_flat_value¶
Minimum (relative) flat value to use in fit.
normalize_center_radius¶
Center normalization will be done using the average within this radius (mm).
outer_gradient_radius¶
Minimum radius (mm) for the outer gradient fit.
radial_spline_nodes¶
- Default
[0.0, 200.0, 250.0, 300.0, 310.0, 320.0, 330.0, 340.0, 350.0, 360.0, 368.0]
- Field type
Spline nodes to use for radial fit.
saveLogOutput¶
Flag to enable/disable saving of log output for a task, enabled by default.