PhotonTransferCurveExtractTask

PhotonTransferCurveExtractTask constructs a photon transfer curve (PTC) dataset from a single pair of flat field exposures.

Processing summary

PhotonTransferCurveExtractTask runs these operations:

  1. Pairs exposures together by either exposure time (the default) or by exposure id (in the case where the exposure time does not track with the observed flux).

  2. Measures the mean, variances, and covariances from the difference of the pair of exposures.

  3. Persists these results in a set of partial PTC datasets.

Python API summary

from lsst.cp.pipe.ptc.cpPtcExtract import PhotonTransferCurveExtractTask
classPhotonTransferCurveExtractTask(*, config=None, log=None, initInputs=None, **kwargs)

Task to measure covariances from flat fields...

attributeconfig

Access configuration fields and retargetable subtasks.

methodrun(inputExp, inputDims, inputPhotodiodeData=None)

Measure covariances from difference of flat pairs...

See also

See the PhotonTransferCurveExtractTask API reference for complete details.

Retargetable subtasks

No subtasks.

Configuration fields

auxiliaryHeaderKeys

Default
[]
Field type

str ListField

Auxiliary header keys to store with the PTC dataset.

binSize

Default
1
Field type

int Field

Bin the image by this factor in both dimensions.

connections

Data type

lsst.pipe.base.config.PhotonTransferCurveExtractConfigConnections

Field type

ConfigField

Configurations describing the connections of the PipelineTask to datatypes

detectorMeasurementRegion

Default
'AMP'
Field type

str ChoiceField (optional)

Choices
'AMP'

Amplifier of the detector.

'FULL'

Full image.

None

Field is optional

Region of each exposure where to perform the calculations (amplifier or full image).

doExtractPhotodiodeData

Default
False
Field type

bool Field

Extract photodiode data?

doGain

Default
True
Field type

bool Field

Calculate a gain per input flat pair.

doKsHistMeasurement

Default
False
Field type

bool Field

Do the Ks test of gaussianity? If False, kspValue will be filled with all 1.0s.

doVignetteFunctionRegionSelection

Default
False
Field type

bool Field

Use vignette function to select PTC region?

edgeMaskLevel

Default
'DETECTOR'
Field type

str ChoiceField (optional)

Choices
'DETECTOR'

Mask only the edges of the full detector.

'AMP'

Mask edges of each amplifier.

None

Field is optional

Mask edge pixels in which coordinate frame: DETECTOR or AMP?

efdPhotodiodeSeries

Default
'lsst.sal.Electrometer.logevent_logMessage'
Field type

str Field

EFD series to use to get photodiode values.

efdSalIndex

Default
201
Field type

int Field

EFD SAL Index to select electrometer. This is 101 for mainTel, 201 for auxTel.

gainCorrectionType

Default
'FULL'
Field type

str ChoiceField (optional)

Choices
'NONE'

No correction.

'SIMPLE'

First order correction.

'FULL'

Second order correction.

None

Field is optional

Correction type for the gain.

ksHistLimitMultiplier

Default
8.0
Field type

float Field

Number of sigma (as predicted from the mean value) to compute KS test histogram.

ksHistMinDataValues

Default
100
Field type

int Field

Minimum number of good data values to compute KS test histogram.

ksHistNBins

Default
100
Field type

int Field

Number of bins for the KS test histogram.

maskNameList

Default
['SUSPECT', 'BAD', 'NO_DATA', 'SAT']
Field type

str ListField

Mask list to exclude from statistics calculations.

matchExposuresByFluxKeyword

Default
'CCOBFLUX'
Field type

str Field

Header keyword for flux if matchExposuresType is FLUX.

matchExposuresType

Default
'TIME'
Field type

str ChoiceField (optional)

Choices
'TIME'

Match exposures by reported exposure time. Entries that are within 5e-3 seconds.

'FLUX'

Match exposures by target flux. Use header keyword in matchExposuresByFluxKeyword to find the flux.

'EXPID'

Match exposures by exposure ID.

None

Field is optional

Match input exposures by time, flux, or expId

maximumRangeCovariancesAstier

Default
8
Field type

int Field

Maximum range of covariances as in Astier+19

minNumberGoodPixelsForCovariance

Default
10000
Field type

int Field

Minimum number of acceptable good pixels per amp to calculate the covariances (via FFT or direclty).

nIterSigmaClipPtc

Default
3
Field type

int Field

Number of sigma-clipping iterations for afwMath.StatisticsControl()

nSigmaClipPtc

Default
5.5
Field type

float Field

Sigma cut for afwMath.StatisticsControl()

numEdgeSuspect

Default
0
Field type

int Field

Number of edge pixels to be flagged as untrustworthy.

photodiodeCurrentScale

Default
-1.0
Field type

float Field

Scale factor to apply to photodiode current values for the CHARGE_SUM, TRIMMED_SUM, and MEAN integration methods.

photodiodeIntegrationMethod

Default
'TRIMMED_SUM'
Field type

str ChoiceField (optional)

Choices
'DIRECT_SUM'

Use numpy’s trapezoid integrator on all photodiode readout entries

'TRIMMED_SUM'

Use numpy’s trapezoid integrator, clipping the leading and trailing entries, which are nominally at zero baseline level.

'CHARGE_SUM'

Treat the current values as integrated charge over the sampling interval and simply sum the values, after subtracting a baseline level.

'MEAN'

{‘Take the average of the photodiode measurements and multiply by the exposure time.’}

None

Field is optional

Integration method for photodiode monitoring data.

saveLogOutput

Default
True
Field type

bool Field

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

thresholdDiffAfwVarVsCov00

Default
1.0
Field type

float Field

If the absolute fractional differece between afwMath.VARIANCECLIP and Cov00 for a region of a difference image is greater than this threshold (percentage), a warning will be issued.

useEfdPhotodiodeData

Default
False
Field type

bool Field

Extract photodiode values from EFD?

vignetteFunctionPolynomialCoeffs

Default
None
Field type

float ListField (optional)

Polynomial terms for radial vignetting function. This is used with vig = np.polyval(coeffs, radius), where radius is in meters. This must be set if doVignetteFunctionRegionSelection is True.

vignetteFunctionRegionSelectionMinimumPixels

Default
250000
Field type

int Field

Minumum number of pixels to select for vignette function region selection.

vignetteFunctionRegionSelectionPercent

Default
2.0
Field type

float Field

Vignetting function variation over the focal plane that is determined to be satisfactory. If this does not yield vignetteFunctionRegionSelectionMinimumPixels then this will be increased until vignetteFunctionRegionSelectionMinimumPixels is reached.