ShutterMotionProfile#

class lsst.ip.isr.ShutterMotionProfile(**kwargs)#

Bases: IsrCalib

Shutter motion profile measurements.

Parameters#

loglogging.Logger, optional

Log to write messages to. If None a default logger will be used.

**kwargs :

Additional parameters.

Methods Summary

calculateMidpoint([modelName])

Calculate time of midpoint of travel for this profile.

fromDict(dictionary)

Construct a ShutterMotionProfile from a dictionary of properties.

fromTable(tableList)

Construct calibration from a list of tables.

readEncodeSamples(inputSamples, formatVersion)

Read a list of input samples into the calibration.

readFitResults(fitResults)

Read a list of fit results into the calibration.

readHallTransitions(inputTransitions, ...)

Read a list of input samples into the calibration.

toDict()

Return a dictionary containing the calibration properties.

toTable()

Construct a list of tables containing the information in this calibration.

writeEncodeSamples()

Return list of samples as dictionaries.

writeFitResults()

Return list of samples as dictionaries.

writeHallTransitions()

Return list of samples as dictionaries.

Methods Documentation

calculateMidpoint(modelName='hallSensorFit')#

Calculate time of midpoint of travel for this profile.

Derived from Shuang Liang’s CTN-002 (https://ctn-002.lsst.io). Equation numbers listed are from this document. As the fits have already been done, we can ignore the raw position/Hall sensor data.

Parameters#

modelNamestr

Fit model to use to calculate the midpoint.

Returns#

tm_accelfloat

The time of the midpoint from the start of motion in seconds, as derived from the point where the acceleration on the shutter is zero.

tm_positionfloat

The time of the midpoint from the start of motion in seconds, as derived from the point where the shutter position is midway between its starting and ending locations.

Raises#

RuntimeError

Raised if the requested modelName is not found in the calibration.

classmethod fromDict(dictionary)#

Construct a ShutterMotionProfile from a dictionary of properties.

Parameters#

dictionarydict

Dictionary of properties.

Returns#

calib`lsst.ip.isr.ShutterMotionProfile

Constructed calibration.

Raises#

RuntimeError

Raised if the supplied dictionary is for a different calibration type.

classmethod fromTable(tableList)#

Construct calibration from a list of tables.

This method uses the fromDict method to create the calibration, after constructing an appropriate dictionary from the input tables.

Parameters#

tableListlist [lsst.afw.table.Table]

List of tables to use to construct the crosstalk calibration. For shutter motion profiles, the first table contains the samples, the second the Hall transition data, and the third the model fits.

Returns#

caliblsst.ip.isr.ShutterMotionProfile

The calibration defined in the tables.

readEncodeSamples(inputSamples, formatVersion)#

Read a list of input samples into the calibration.

Parameters#

inputSampleslist [dict [str str]]

List of dictionaries of samples.

formatVersionfloat

Version of the file format to read.

Raises#

RuntimeError

Raised if the calibration has already read samples, or if the format is not known.

readFitResults(fitResults)#

Read a list of fit results into the calibration.

Parameters#

inputTransitionslist [dict [str str]]

List of dictionaries of fit results.

Raises#

RuntimeError

Raised if the calibration has already read fit results.

readHallTransitions(inputTransitions, formatVersion)#

Read a list of input samples into the calibration.

Parameters#

inputTransitionslist [dict [str str]]

List of dictionaries of transitions.

formatVersionfloat

Version of the file format to read.

Raises#

RuntimeError

Raised if the calibration has already read samples, or if the format is not known.

toDict()#

Return a dictionary containing the calibration properties.

The dictionary should be able to be round-tripped through fromDict.

Returns#

dictionarydict

Dictionary of properties.

toTable()#

Construct a list of tables containing the information in this calibration.

The list of tables should create an identical calibration after being passed to this class’s fromTable method.

Returns#

tableListlist [lsst.afw.table.Table]

List of tables containing the shutter motion profile information.

writeEncodeSamples()#

Return list of samples as dictionaries.

Returns#

inputSampleslist [dict [str str]]

List of dictionaries of samples.

Raises#

RuntimeError

Raised if the calibration has not read samples.

writeFitResults()#

Return list of samples as dictionaries.

Returns#

inputTransitionslist [dict [str str]]

List of dictionaries of Hall transitions

Raises#

RuntimeError

Raised if the calibration has not read Hall transitions.

writeHallTransitions()#

Return list of samples as dictionaries.

Returns#

inputTransitionslist [dict [str str]]

List of dictionaries of Hall transitions

Raises#

RuntimeError

Raised if the calibration has not read Hall transitions.