LinearitySolveConfig#

class lsst.cp.pipe.LinearitySolveConfig(*args, **kw)#

Bases: PipelineTaskConfig

Configuration for solving the linearity from PTC dataset.

Attributes Summary

applyPhotodiodeCorrection

Calculate and apply a correction to the photodiode readings? (bool, default False)

autoGroupingMaxSignalFraction

Only do auto-grouping when the signal is this fraction of the maximum signal.

autoGroupingThreshold

Minimum relative jump from sorted conversion values to determine a group.

autoGroupingUseExptime

Use exposure time to determine automatic grouping.

connections

Field which refers to a dynamically added configuration class which is based on a PipelineTaskConnections class.

doAutoGrouping

Do automatic group detection? Cannot be True if splineGroupingColumn is also set.

doSplineFitOffset

Fit a scattered light offset in the spline fit.

doSplineFitTemperature

Fit temperature coefficient in spline fit? (bool, default False)

doSplineFitTemporal

Fit a linear temporal parameter coefficient in spline fit? (bool, default False)

doSplineFitWeights

Fit linearity weight parameters in the spline fit.

ignorePtcMask

Ignore the expIdMask set by the PTC solver? Deprecated: This field is no longer used.

linearityType

Type of linearizer to construct.

maxFracLinearityDeviation

Maximum fraction deviation from raw linearity to compute linearityTurnoff and linearityMaxSignal.

maxLinearAdu

Maximum adu value to use to estimate linear term; not used with spline fits.

maxLookupTableAdu

Maximum DN value for a LookupTable linearizer.

minLinearAdu

Minimum adu value to use to estimate linear term.

minPhotodiodeCurrent

Minimum value to trust photodiode signals.

minSignalFitLinearityTurnoff

Minimum signal to compute raw linearity slope for linearityTurnoff.

nSigmaClipLinear

Maximum deviation from linear solution for Poissonian noise.

polynomialOrder

Degree of polynomial to fit.

saveLogOutput

Flag to enable/disable saving of log output for a task, enabled by default.

splineFitMaxIter

Maximum number of iterations for spline fit.

splineFitMaxRejectionPerIteration

Maximum number of rejections per iteration for spline fit.

splineFitMinIter

Minimum number of iterations for spline fit.

splineFitTemperatureColumn

Name of the temperature column to use when fitting temperature coefficients in spline fit; this must not be None if doSplineFitTemperature is True.

splineFitWeightParsStart

Starting parameters for weight fit, if doSplineFitWeights=True.

splineGroupingColumn

Column to use for grouping together points for Spline mode, to allow for different proportionality constants.

splineGroupingMinPoints

Minimum number of linearity points to allow grouping together points for Spline mode with splineGroupingColumn.

splineKnots

Number of spline knots to use in fit.

trimmedState

Will this linearizer be used on trimmed data? (bool, default True)

useFocalPlaneNormalization

Use focal-plane normalization in addition to/instead of photodiode? (Only used with spline fitting).

useLinearizerPtc

Use a linearizer ptc in a single pipeline? (bool, default False)

usePhotodiode

Use the photodiode info instead of the raw expTimes? (bool, default False)

Methods Summary

validate()

Validate the Config, raising an exception if invalid.

Attributes Documentation

applyPhotodiodeCorrection#

Calculate and apply a correction to the photodiode readings? (bool, default False)

autoGroupingMaxSignalFraction#

Only do auto-grouping when the signal is this fraction of the maximum signal. All exposures with signal higher than this threshold will be put into the largest signal group. This config is needed if the input PTC goes beyond the linearity turnoff. (float, default 0.9)

autoGroupingThreshold#

Minimum relative jump from sorted conversion values to determine a group. (float, default 0.1)

autoGroupingUseExptime#

Use exposure time to determine automatic grouping. Used if doAutoGrouping=True. (bool, default True)

connections: pexConfig.ConfigField#

Field which refers to a dynamically added configuration class which is based on a PipelineTaskConnections class.

doAutoGrouping#

Do automatic group detection? Cannot be True if splineGroupingColumn is also set. The automatic group detection will use the ratio of signal to exposure time (if autoGroupingUseExptime is True) or photodiode (if False) to determine which flat pairs were taken with different illumination settings. (bool, default False)

doSplineFitOffset#

Fit a scattered light offset in the spline fit. (bool, default True)

doSplineFitTemperature#

Fit temperature coefficient in spline fit? (bool, default False)

doSplineFitTemporal#

Fit a linear temporal parameter coefficient in spline fit? (bool, default False)

doSplineFitWeights#

Fit linearity weight parameters in the spline fit. (bool, default False)

ignorePtcMask#

Ignore the expIdMask set by the PTC solver? Deprecated: This field is no longer used. Will be removed after v28. (bool, default False)

linearityType#

Type of linearizer to construct. (str, default 'Squared')

Allowed values:

'LookupTable'

Create a lookup table solution.

'Polynomial'

Create an arbitrary polynomial solution.

'Squared'

Create a single order squared solution.

'Spline'

Create a spline based solution.

'None'

Create a dummy solution.

'None'

Field is optional

maxFracLinearityDeviation#

Maximum fraction deviation from raw linearity to compute linearityTurnoff and linearityMaxSignal. (float, default 0.01)

maxLinearAdu#

Maximum adu value to use to estimate linear term; not used with spline fits. (float, default 20000.0)

maxLookupTableAdu#

Maximum DN value for a LookupTable linearizer. (int, default 262144)

minLinearAdu#

Minimum adu value to use to estimate linear term. (float, default 30.0)

minPhotodiodeCurrent#

Minimum value to trust photodiode signals. (float, default 0.0)

minSignalFitLinearityTurnoff#

Minimum signal to compute raw linearity slope for linearityTurnoff. (float, default 1000.0)

nSigmaClipLinear#

Maximum deviation from linear solution for Poissonian noise. (float, default 5.0)

polynomialOrder#

Degree of polynomial to fit. Must be at least 2. (int, default 3)

Valid Range = [2,inf)

saveLogOutput#

Flag to enable/disable saving of log output for a task, enabled by default. (bool, default True)

splineFitMaxIter#

Maximum number of iterations for spline fit. (int, default 20)

splineFitMaxRejectionPerIteration#

Maximum number of rejections per iteration for spline fit. (int, default 5)

splineFitMinIter#

Minimum number of iterations for spline fit. (int, default 3)

splineFitTemperatureColumn#

Name of the temperature column to use when fitting temperature coefficients in spline fit; this must not be None if doSplineFitTemperature is True. (str, default None)

splineFitWeightParsStart#

Starting parameters for weight fit, if doSplineFitWeights=True. Parameters are such that sigma = sqrt(par[0]**2. + par[1]**2./mu).If doSplineFitWeights=False then these are used as-is; otherwise they are used as the initial values for fitting these parameters. (List, default [1.0, 0.0])

splineGroupingColumn#

Column to use for grouping together points for Spline mode, to allow for different proportionality constants. If None, then grouping will only be done if doAutoGrouping is True. (str, default None)

splineGroupingMinPoints#

Minimum number of linearity points to allow grouping together points for Spline mode with splineGroupingColumn. This configuration is here to prevent misuse of the Spline code to avoid over-fitting. (int, default 100)

splineKnots#

Number of spline knots to use in fit. (int, default 10)

trimmedState#

Will this linearizer be used on trimmed data? (bool, default True)

useFocalPlaneNormalization#

Use focal-plane normalization in addition to/instead of photodiode? (Only used with spline fitting). (bool, default False)

useLinearizerPtc#

Use a linearizer ptc in a single pipeline? (bool, default False)

usePhotodiode#

Use the photodiode info instead of the raw expTimes? (bool, default False)

Methods Documentation

validate()#

Validate the Config, raising an exception if invalid.

Raises#

lsst.pex.config.FieldValidationError

Raised if verification fails.

Notes#

The base class implementation performs type checks on all fields by calling their validate methods.

Complex single-field validation can be defined by deriving new Field types. For convenience, some derived lsst.pex.config.Field-types (ConfigField and ConfigChoiceField) are defined in lsst.pex.config that handle recursing into subconfigs.

Inter-field relationships should only be checked in derived Config classes after calling this method, and base validation is complete.