lsst.ts.ess.common

This package contains code to read environmental sensor data and documentation for those sensors.

Overview

The ESS (Environmental Sensors Suite) reports environmental data, such as temperature, pressure, rain, lightning, and even acceleration. Note that the ESS is not the only reporter of environmental data; some systems such as cameras and the TMA have their own sensors and report that data directly. But where practical, we use the ESS, in order to provide a unified interface.

The ESS CSC is coded in ts_ess_csc. It is an indexed CSC, and each instance reads a specific set of sensors.

Terminology

  • Sensor: a device that measures one or more environmental parameters, such as temperature, pressure, or vibration. One “sensor” includes all the different channels of data reported by the device that serves the data. For example, multi-channel thermal sensors have multiple temperature probes, and the Omega HX85BA sensor measures relative humidity, air temperature, and barometric pressure.

  • Data client: software (subclasses of BaseDataClient) that connects to a data server, reads the data, and reports it using SAL. Most data clients live in ts_ess_csc but a few live in packages such as ts_ess_labjack. (They do not live in ts_ess_common because they depend on ts_salobj, and that package cannot.) Each ESS CSC instance is a collection of data clients that are specified and configured by the CSC’s configuration.

Sensors

Most sensors serve their own data (directly or by being plugged into an electronics box provided by the vendor). Protocols include RS-232, RS-485, TCP/IP, USB, and FTDI.

  • Sensors that serve their data via TCP/IP are be directly read by an ESS instance running on Kubernetes. These sensors are read by a subclass of BaseDataClient.

  • Sensors that serve their data via USB or FTDI cannot be directly read by an ESS instance, because software running on Kubernetes cannot read these protocols. In this case we run custom software (in ts_ess_controller) on RPis to read the data and transmit it via TCP/IP. For this one case, we represent sensors using a subclass of sensor.BaseSensor. The data is read by RpiDataClient in ts_ess_csc, or a specialized variant.

  • Sensors that serve their data via RS-232 or RS-485 serial are served in two different ways:

    • Some sensors are read by a Raspberry Pi running custom software, as per the “USB or FTDI” case above. This includes sensors that receive power from a custom serial cable: our custom Raspberry Pis systems provide power on their RS-232 ports.

    • Other sensors are read by serial-to-ethernet adapters, as per the TCP/IP case mentioned above.

  • Sensors that provide analog or binary signals are read by LabJack T4 or T7 modules. LabJack modules are read by LabJack data client in ts_ess_labjack.

See Adding New Sensors for more information.

Sensor Documentation

Documentation for sensors:

Related documentation:

Computing Dew Point

Sensor that detect relative humidity, air temperature, and barometric pressure should compute and report dew point. Our standard equation for computing dew point is the Magnus formula, as encoded in compute_dew_point_magnus.

SNMP Support

Documentation for SNMP support:

Python API reference

lsst.ts.ess.common Package

Classes

AbstractCommandHandler(callback, simulation_mode)

Handle incoming commands and send replies.

Command(value[, names, module, qualname, ...])

Commands accepted by the Socket Server and Command Handler.

CommandError(msg, response_code)

Exception raised if a command fails.

DeviceConfig(name, sens_type, baud_rate, ...)

Configuration for a device.

DeviceName(value[, names, module, qualname, ...])

Device names.

DeviceType(value[, names, module, qualname, ...])

Supported device types.

Key(value[, names, module, qualname, type, ...])

Keys that may be present in the device configuration or as command parameters.

LD250TelemetryPrefix(value[, names, module, ...])

Telemetry prefixes for the LD-250 sensor.

MibTreeElement(name, description, oid, ...)

MIB Tree Element.

MibTreeElementType(value[, names, module, ...])

MIB Tree Element Type.

MibTreeHolder()

Holder of information in an MIB tree.

MockCommandHandler(callback, simulation_mode)

RaritanItemId(value[, names, module, ...])

Raritan item IDs.

RaritanOid(value[, names, module, qualname, ...])

Raritan OIDs.

ResponseCode(value[, names, module, ...])

SensorType(value[, names, module, qualname, ...])

Supported sensor types.

SnmpServerSimulator(log)

SNMP server simulator.

SocketServer(name, host, port, log[, ...])

A socket server for exchanging JSON messages via TCP/IP.

TelemetryItemName(value[, names, module, ...])

TelemetryItemType(value[, names, module, ...])

TelemetryItemUnit(value[, names, module, ...])

Class Inheritance Diagram

Inheritance diagram of lsst.ts.ess.common.abstract_command_handler.AbstractCommandHandler, lsst.ts.ess.common.constants.Command, lsst.ts.ess.common.command_error.CommandError, lsst.ts.ess.common.device_config.DeviceConfig, lsst.ts.ess.common.utils.DeviceName, lsst.ts.ess.common.constants.DeviceType, lsst.ts.ess.common.constants.Key, lsst.ts.ess.common.constants.LD250TelemetryPrefix, lsst.ts.ess.common.utils.MibTreeElement, lsst.ts.ess.common.utils.MibTreeElementType, lsst.ts.ess.common.mib_tree_holder.MibTreeHolder, lsst.ts.ess.common.mock_command_handler.MockCommandHandler, lsst.ts.ess.common.utils.RaritanItemId, lsst.ts.ess.common.utils.RaritanOid, lsst.ts.ess.common.constants.ResponseCode, lsst.ts.ess.common.constants.SensorType, lsst.ts.ess.common.snmp_server_simulator.SnmpServerSimulator, lsst.ts.ess.common.socket_server.SocketServer, lsst.ts.ess.common.utils.TelemetryItemName, lsst.ts.ess.common.utils.TelemetryItemType, lsst.ts.ess.common.utils.TelemetryItemUnit

lsst.ts.ess.common.device Package

Classes

BaseDevice(name, device_id, sensor, ...)

Base class for the different types of Sensor Devices.

MockDevice(name, device_id, sensor, ...)

Mock Sensor Device.

MockFormatter()

MockTemperatureFormatter()

MockWindsonicFormatter()

TcpipDevice(name, host, port, sensor, ...)

Remote device that publishes telemetry via TCP/IP.

Class Inheritance Diagram

Inheritance diagram of lsst.ts.ess.common.device.base_device.BaseDevice, lsst.ts.ess.common.device.mock_device.MockDevice, lsst.ts.ess.common.device.mock_formatter.MockFormatter, lsst.ts.ess.common.device.mock_temperature_formatter.MockTemperatureFormatter, lsst.ts.ess.common.device.mock_windsonic_formatter.MockWindsonicFormatter, lsst.ts.ess.common.device.tcpip_device.TcpipDevice

lsst.ts.ess.common.sensor Package

Functions

add_missing_telemetry(telemetry, expected_length)

Prepend a telemetry list with NaN values to make sure that it has the expected length.

compute_checksum(checksum_string)

Compute the checksum for a Gill Windsonic 2D Sensor.

compute_dew_point_magnus(relative_humidity, ...)

Compute dew point using the Magnus formula.

compute_signature(input_str, delimiter)

Compute the signature of the sensor telemetry.

create_sensor(device_configuration, log)

Create the sensor to connect to by using the specified configuration.

register_sensor(sensor_type, sensor_class)

Register a BaseSensor subclass against a SensorType.

Classes

AuroraSensor(log[, num_channels])

Aurora Cloud Sensor Reader.

AuroraSensorData(seq_num, ...)

Dataclass representing Aurora Cloud Sensor data.

BaseSensor(log[, num_channels])

Base class for the different types of Sensors.

Csat3bSensor(log[, num_channels])

Cambpell Scientific CSAT3B 3-D Anemometer Sensor.

Efm100cSensor(log[, num_channels])

Boltek EFM-100C Electric Field Strength Sensor.

Hx85aSensor(log[, num_channels])

Omega HX85A Humidity Sensor.

Hx85baSensor(log[, num_channels])

Omega HX85BA Humidity Sensor.

Ld250Sensor(log[, num_channels])

Boltek LD-250 Lightning Detector.

TemperatureSensor(log[, num_channels])

SEL multi-channel temperature reader.

WindsonicSensor(log[, num_channels])

GILL Windsonic 2-D Sonic Anemometer Sensor.

Class Inheritance Diagram

Inheritance diagram of lsst.ts.ess.common.sensor.aurora_sensor.AuroraSensor, lsst.ts.ess.common.sensor.aurora_sensor.AuroraSensorData, lsst.ts.ess.common.sensor.base_sensor.BaseSensor, lsst.ts.ess.common.sensor.campbell_csat3b.Csat3bSensor, lsst.ts.ess.common.sensor.boltek_efm100c.Efm100cSensor, lsst.ts.ess.common.sensor.omega_hx85a.Hx85aSensor, lsst.ts.ess.common.sensor.omega_hx85ba.Hx85baSensor, lsst.ts.ess.common.sensor.boltek_ld250.Ld250Sensor, lsst.ts.ess.common.sensor.temperature_sensor.TemperatureSensor, lsst.ts.ess.common.sensor.gill_windsonic.WindsonicSensor

Contributing

lsst.ts.ess.common is developed at https://github.com/lsst-ts/ts_ess_common. You can find Jira issues for this module using labels=ts_ess_common.

Version History