PhotodiodeCalib#
- class lsst.ip.isr.PhotodiodeCalib(timeSamples=None, currentSamples=None, **kwargs)#
Bases:
IsrCalibIndependent current measurements from photodiode for linearity calculations.
Parameters#
- timeSamples
listornumpy.ndarray List of samples the photodiode was measured at.
- currentSamples
listornumpy.ndarray List of current measurements at each time sample.
- log
logging.Logger, optional Log to write messages to. If
Nonea default logger will be used.- **kwargs :
Additional parameters. These will be passed to the parent constructor with the exception of:
"integrationMethod"Name of the algorithm to use to integrate the current samples. Allowed values are
DIRECT_SUM,TRIMMED_SUM,CHARGE_SUM,MEAN(str)."currentScale"Scale factor to apply to the current samples for the
CHARGE_SUMintegration method. A typical value would be-1, to flip the sign of the integrated charge.
Methods Summary
fromDict(dictionary)Construct a PhotodiodeCalib from a dictionary of properties.
fromTable(tableList, **kwargs)Construct calibration from a list of tables.
integrate([exposureTime])Integrate the current.
For this method, the values in .currentSamples are actually the integrated charge values as measured by the ammeter for each sampling interval.
Integrate points.
integrateMean(exposureTime)Take the mean of the photodiode trace, and multiply by exposure time.
Integrate points with a baseline level subtracted.
readTwoColumnPhotodiodeData(filename)Construct a PhotodiodeCalib by reading the simple column format.
toDict()Return a dictionary containing the photodiode properties.
toTable()Construct a list of tables containing the information in this calibration.
Methods Documentation
- classmethod fromDict(dictionary)#
Construct a PhotodiodeCalib from a dictionary of properties.
Parameters#
- dictionary
dict Dictionary of properties.
Returns#
- calib
lsst.ip.isr.PhotodiodeCalib Constructed photodiode data.
Raises#
- RuntimeError
Raised if the supplied dictionary is for a different calibration type.
- dictionary
- classmethod fromTable(tableList, **kwargs)#
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[astropy.table.Table] List of tables to use to construct the crosstalk calibration.
Returns#
- calib
lsst.ip.isr.PhotodiodeCalib The calibration defined in the tables.
- tableList
- integrate(exposureTime=None)#
Integrate the current.
Parameters#
- exposureTime
float, optional Image exposure time. Required if integrationMethod is
MEAN.
Raises#
- RuntimeError
Raised if the integration method is not known.
- ValueError
Raised if the exposure time is not set and method is MEAN.
- exposureTime
- integrateChargeSum()#
For this method, the values in .currentSamples are actually the integrated charge values as measured by the ammeter for each sampling interval. We need to do a baseline subtraction, based on the charge values when the LED is off, then sum up the corrected signals.
Returns#
- sum
float Total charge measured.
- sum
- integrateDirectSum()#
Integrate points.
This uses numpy’s trapezoidal integrator.
Returns#
- sum
float Total charge measured.
- sum
- integrateMean(exposureTime)#
Take the mean of the photodiode trace, and multiply by exposure time.
The current scale is also used.
Parameters#
- exposureTime
float Exposure time in sections.
- exposureTime
- integrateTrimmedSum()#
Integrate points with a baseline level subtracted.
This uses numpy’s trapezoidal integrator.
Returns#
- sum
float Total charge measured.
See Also#
lsst.eotask.gen3.eoPtc
- sum
- classmethod readTwoColumnPhotodiodeData(filename)#
Construct a PhotodiodeCalib by reading the simple column format.
Parameters#
- filename
str File to read samples from.
Returns#
- calib
lsst.ip.isr.PhotodiodeCalib The calibration defined in the file.
- filename
- toDict()#
Return a dictionary containing the photodiode 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[astropy.table.Table] List of tables containing the photodiode calibration information.
- tableList
- timeSamples