Young32400RawDataGenerator

class lsst.ts.ess.csc.Young32400RawDataGenerator(mean_wind_direction: float = 359.9, std_wind_direction: float = 3.6, mean_wind_speed: float = 12.3, std_wind_speed: float = 2.3, mean_temperature: float = 13.4, std_temperature: float = 2.4, mean_humidity: float = 14.5, std_humidity: float = 2.5, mean_pressure: float = 105000, std_pressure: float = 10000, mean_rain_rate: float = 15.6, std_rain_rate: float = 2.6, read_interval: float = 0.5, start_rain_tip_count: int = 9990)

Bases: object

Generate simulated raw data for the Young 32400 weather station.

Default values are fairly arbitrary but vaguely plausible. Default wind direction is intentionally close to 360, in order to exercise the wrapping code. Units are as follows:

  • wind_direction: deg

  • wind_speed: m/s

  • temperature: C

  • humidity: %

  • pressure: Pa

  • rain_rate: mm/hr

The class property stat_names is a list of the statistic names, in the same order as the associated field in raw data. For each statistics name there is a corresponding f”mean_{name}” and f”mean_{name}” constructor argument and attribute. Almost all raw fields in DATA_REGEX have the same name as the statistic; the one exception is “rain_rate”, whose raw field is “rain_tip_count”.

Attributes Summary

max_rain_tip_count

mean_humidity

mean_pressure

mean_rain_rate

mean_temperature

mean_wind_direction

mean_wind_speed

read_interval

start_rain_tip_count

stat_names

std_humidity

std_pressure

std_rain_rate

std_temperature

std_wind_direction

std_wind_speed

Methods Summary

create_raw_data_list(config, num_items[, ...])

Create simulated raw data for all sensors.

Attributes Documentation

max_rain_tip_count: int = 9999
mean_humidity: float = 14.5
mean_pressure: float = 105000
mean_rain_rate: float = 15.6
mean_temperature: float = 13.4
mean_wind_direction: float = 359.9
mean_wind_speed: float = 12.3
read_interval: float = 0.5
start_rain_tip_count: int = 9990
stat_names: Sequence[str] = ('wind_speed', 'wind_direction', 'temperature', 'humidity', 'pressure', 'rain_rate')
std_humidity: float = 2.5
std_pressure: float = 10000
std_rain_rate: float = 2.6
std_temperature: float = 2.4
std_wind_direction: float = 3.6
std_wind_speed: float = 2.3

Methods Documentation

create_raw_data_list(config: SimpleNamespace, num_items: int, random_seed: int = 47) list[str]

Create simulated raw data for all sensors.

Use a normal distribution, but truncate out-of-range values.

Parameters:
configtypes.SimpleNamespace

Configuration for the data client.

num_itemsint

Number of raw strings to create.

random_seedint

Random seed.