PhotodiodeCalib#

class lsst.ip.isr.PhotodiodeCalib(timeSamples=None, currentSamples=None, **kwargs)#

Bases: IsrCalib

Independent current measurements from photodiode for linearity calculations.

Parameters#

timeSampleslist or numpy.ndarray

List of samples the photodiode was measured at.

currentSampleslist or numpy.ndarray

List of current measurements at each time sample.

loglogging.Logger, optional

Log to write messages to. If None a 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_SUM integration 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.

integrateChargeSum()

For this method, the values in .currentSamples are actually the integrated charge values as measured by the ammeter for each sampling interval.

integrateDirectSum()

Integrate points.

integrateMean(exposureTime)

Take the mean of the photodiode trace, and multiply by exposure time.

integrateTrimmedSum()

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#

dictionarydict

Dictionary of properties.

Returns#

caliblsst.ip.isr.PhotodiodeCalib

Constructed photodiode data.

Raises#

RuntimeError

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

classmethod fromTable(tableList, **kwargs)#

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 [astropy.table.Table]

List of tables to use to construct the crosstalk calibration.

Returns#

caliblsst.ip.isr.PhotodiodeCalib

The calibration defined in the tables.

integrate(exposureTime=None)#

Integrate the current.

Parameters#

exposureTimefloat, 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.

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#

sumfloat

Total charge measured.

integrateDirectSum()#

Integrate points.

This uses numpy’s trapezoidal integrator.

Returns#

sumfloat

Total charge measured.

integrateMean(exposureTime)#

Take the mean of the photodiode trace, and multiply by exposure time.

The current scale is also used.

Parameters#

exposureTimefloat

Exposure time in sections.

integrateTrimmedSum()#

Integrate points with a baseline level subtracted.

This uses numpy’s trapezoidal integrator.

Returns#

sumfloat

Total charge measured.

See Also#

lsst.eotask.gen3.eoPtc

classmethod readTwoColumnPhotodiodeData(filename)#

Construct a PhotodiodeCalib by reading the simple column format.

Parameters#

filenamestr

File to read samples from.

Returns#

caliblsst.ip.isr.PhotodiodeCalib

The calibration defined in the file.

toDict()#

Return a dictionary containing the photodiode 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 [astropy.table.Table]

List of tables containing the photodiode calibration information.