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
Methods Summary
create_raw_data_list
(config, num_items[, ...])Create simulated raw data for all sensors.
Attributes Documentation
- stat_names: Sequence[str] = ('wind_speed', 'wind_direction', 'temperature', 'humidity', 'pressure', 'rain_rate')¶
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:
- config
types.SimpleNamespace
Configuration for the data client.
- num_items
int
Number of raw strings to create.
- random_seed
int
Random seed.
- config