slv.measurements.concentrations.load_concentrations#
- slv.measurements.concentrations.load_concentrations(pollutants, orgs=None, sites=None, time_range=None, site_config=None, include_location=False, valid_range=None, valid_flags=None, subset_hours=None, filter_pcaps=False, num_processes=1, mobile_kwargs=None, utc_offset=-7)[source]#
Concentrations for the requested sites in one long table.
Each site’s instruments (
site_config["instruments"]) are read at the calibrated level (qaqc for instruments flagged uncalibrated): UATAQ sites throughuataq.read_data, DAQ Picarro G2307 sites from the files under$SLV_DAQ_DIR. Concentration columns are renamed to the pollutant name and cleaned (normalize_pollutant()). Mobile sites are merged with their GPS (merge_with_gps()). Sites or instruments that fail to load are skipped with a message.- Parameters:
orgs (str or list of str, optional) – Take every site of these organizations when
sitesis not given.sites (str or list of str, optional) – Site names (case-insensitive).
time_range (TimeRange or tuple, optional) – Period to read.
site_config (pd.DataFrame, optional) – Default
load_site_config().include_location (bool) – Add
latitude,longitudeandheight; forced on when a site is mobile, which also addsis_mobile.valid_range (dict, optional) – Pollutant ->
(min, max); values outside become NaN.valid_flags (dict, optional) – Pollutant -> QC flag values to keep.
subset_hours (list of int, optional) – Keep these local standard-time hours.
filter_pcaps (bool) – Drop obs during persistent cold-air pool events.
num_processes (int) – Passed to the uataq reads.
mobile_kwargs (dict, optional) – Passed to
merge_with_gps().utc_offset (int) – Hours from UTC to local standard time (the
Time_MSTcolumn).
- Returns:
One row per record:
Time_UTC,Time_MST,site,org,instrument, one column per pollutant, and the location columns when requested. Sorted by time and site.- Return type:
pd.DataFrame
- Raises:
ValueError – Neither
sitesnororgsis given, or nothing loaded.