TemperatureSensor

class lsst.ts.ess.common.sensor.TemperatureSensor(log: Logger, num_channels: int = 0)

Bases: BaseSensor

SEL multi-channel temperature reader.

Perform protocol conversion for a SEL multi-channel temperature reader.

Parameters:
loglogger

The logger for which to create a child logger.

num_channelsint

The number of temperature channels.

Attributes Summary

charset

delimiter

terminator

Methods Summary

extract_telemetry(line)

Extract the temperature telemetry from a line of Sensor data.

Attributes Documentation

charset = 'ASCII'
delimiter = ','
terminator = '\r\n'

Methods Documentation

async extract_telemetry(line: str) list[float | int | str]

Extract the temperature telemetry from a line of Sensor data.

Parameters:
linestr

A line of comma separated telemetry, each of the format CXX=XXXX.XXX

Returns:
outputlist

A list of floats containing the temperature telemetry as measured by the sensor. The length of the output list is the same as the number of channels. If a channel is disconnected (its value will be DISCONNECTED_VALUE) or if a channel is missing because the connection to the sensor is established mid output, then the value gets replaced by np.nan.