metobs_toolkit.qc_collection.whitelist.WhiteSet#
- class WhiteSet(white_records: Index = Index([], dtype='object'))[source]#
Whitelist container for multiple stations and observation types.
This class manages a collection of whitelisted records across multiple stations and observation types. It uses a pandas Index or MultiIndex with optional levels for ‘name’ (station), ‘obstype’, and ‘datetime’ to define which records should be excluded from outlier detection in QC checks.
- Parameters:
white_records (pd.Index, optional) – Index with levels ‘name’, ‘obstype’, and/or ‘datetime’ defining whitelisted records. Default is an empty Index.
Notes
The white_records index must contain at least one of: ‘name’, ‘obstype’, or ‘datetime’ as level names. If ‘datetime’ is not present, all timestamps for matching station/obstype combinations are whitelisted.
Timezone handling: If a ‘datetime’ level is present:
Timezone-aware timestamps are automatically converted to UTC
Timezone-naive timestamps are localized to UTC with a warning
It is strongly recommended to provide timezone-aware timestamps to avoid ambiguity
Methods
__init__([white_records])create_sensorwhitelist(stationname, obstype)Create a sensor-specific whitelist for a station and observation type.
get_info([printout])Retrieve and optionally print detailed information about the WhiteSet.