ShutterMotionProfile#
- class lsst.ip.isr.ShutterMotionProfile(**kwargs)#
Bases:
IsrCalibShutter motion profile measurements.
Parameters#
- log
logging.Logger, optional Log to write messages to. If
Nonea 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.
Return list of samples as dictionaries.
Return list of samples as dictionaries.
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#
- modelName
str Fit model to use to calculate the midpoint.
Returns#
- tm_accel
float 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_position
float 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
modelNameis not found in the calibration.
- modelName
- classmethod fromDict(dictionary)#
Construct a ShutterMotionProfile from a dictionary of properties.
Parameters#
- dictionary
dict Dictionary of properties.
Returns#
- calib`lsst.ip.isr.ShutterMotionProfile
Constructed calibration.
Raises#
- RuntimeError
Raised if the supplied dictionary is for a different calibration type.
- dictionary
- classmethod fromTable(tableList)#
Construct calibration from a list of tables.
This method uses the
fromDictmethod to create the calibration, after constructing an appropriate dictionary from the input tables.Parameters#
- tableList
list[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#
- calib
lsst.ip.isr.ShutterMotionProfile The calibration defined in the tables.
- tableList
- readEncodeSamples(inputSamples, formatVersion)#
Read a list of input samples into the calibration.
Parameters#
- inputSamples
list[dict[strstr]] List of dictionaries of samples.
- formatVersion
float Version of the file format to read.
Raises#
- RuntimeError
Raised if the calibration has already read samples, or if the format is not known.
- inputSamples
- readFitResults(fitResults)#
Read a list of fit results into the calibration.
Parameters#
- inputTransitions
list[dict[strstr]] List of dictionaries of fit results.
Raises#
- RuntimeError
Raised if the calibration has already read fit results.
- inputTransitions
- readHallTransitions(inputTransitions, formatVersion)#
Read a list of input samples into the calibration.
Parameters#
- inputTransitions
list[dict[strstr]] List of dictionaries of transitions.
- formatVersion
float Version of the file format to read.
Raises#
- RuntimeError
Raised if the calibration has already read samples, or if the format is not known.
- inputTransitions
- toDict()#
Return a dictionary containing the calibration properties.
The dictionary should be able to be round-tripped through
fromDict.Returns#
- dictionary
dict Dictionary of properties.
- dictionary
- 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#
- tableList
list[lsst.afw.table.Table] List of tables containing the shutter motion profile information.
- tableList
- writeEncodeSamples()#
Return list of samples as dictionaries.
Returns#
- inputSamples
list[dict[strstr]] List of dictionaries of samples.
Raises#
- RuntimeError
Raised if the calibration has not read samples.
- inputSamples
- log