metobs_toolkit.qc_collection.whitelist.SensorWhiteSet#

class SensorWhiteSet(white_timestamps: None | List = None, all_timestamps: bool = False)[source]#

Whitelist container for a single sensor (station-obstype combination).

This class manages whitelisted timestamps for a specific sensor, allowing certain observations to be excluded from outlier detection in QC checks.

Parameters:
  • white_timestamps (list, optional) – List of datetime objects to whitelist. Default is empty list.

  • all_timestamps (bool, optional) – If True, all timestamps are whitelisted. Default is False.

__init__(white_timestamps: None | List = None, all_timestamps: bool = False) None[source]#

Initialize the SensorWhiteSet with whitelisted timestamps.

Parameters:
  • white_timestamps (list or None, optional) – List of datetime objects to whitelist for this sensor. Default is None, which is treated as an empty list.

  • all_timestamps (bool, optional) – If True, all timestamps are considered whitelisted. Cannot be True when white_timestamps is non-empty. Default is False.

Raises:

MetObsArgumentError – If all_timestamps is True and white_timestamps is non-empty.

Methods

__init__([white_timestamps, all_timestamps])

Initialize the SensorWhiteSet with whitelisted timestamps.

catch_white_records(outliers_idx)

Remove whitelisted timestamps from outliers index.