uataq.sites.MobileSite.get_obs#
- MobileSite.get_obs(pollutants='all', format='wide', group=None, time_range=None, num_processes=1, include_gps=True, **kwargs)[source]#
Get mobile site observations for each pollutant.
Combines instruments by pollutant and, optionally, merges location data from GPS.
- Parameters:
pollutants (
Literal['all'] |str|list[str] |tuple[str,...] |set[str]) – pollutants to read. If ‘all’, read all pollutants. Default is ‘all’.format (
Literal['wide'] |Literal['long']) – Format of the data to return. Default is ‘wide’.group (
str|Mapping[str,str] |None) – The research group to read data from. A name applies to every instrument; a mapping of instrument name to group name sets it per instrument. Default None selects each instrument’s group automatically (seeresolve_group()).time_range (
TimeRange|str|tuple[str|datetime|datetime64|None,str|datetime|datetime64|None] |list[str|datetime|datetime64|None] |slice|None) – Time range to read data, in UTC (see Time range). Default is None.num_processes (
int|Literal['max']) – Number of processes to use for reading data. Default is 1.include_gps (
bool) – Whether to include GPS data in the returned dataframe. Default is True.
- Returns:
A dataframe containing mobile site observations for each pollutant with location data merged (a GeoDataFrame when
include_gps). The columns are those ofSite.get_obs(), including itsinstrumentcolumn (lgr_uggaorlgr_ugga_manual_calfor TRX01’s CO2 and CH4, whose_caland_rawcolumns mean different things in each), then the GPS columns.- Return type:
- Raises:
ValueError – If a pollutant is not measured at the site (see
Site.get_obs()).TypeError – If you pass
lvlorlevel:get_obsalways reads thefinallevel (seeSite.get_obs()).
- Warns:
EmptyResultWarning – If the instruments’ files hold no data in the range (see
Site.get_obs()), or, withinclude_gps, if they do but no row found a GPS fix (TRX01 has no lin GPS file for 2018-09 and 2018-10, so its methane those months has no position).DroppedPollutantWarning – If you name several pollutants and one of them has no data in the range (see
Site.get_obs()).
Notes
Each instrument’s rows are located with the GPS logged on the same clock, which is the GPS of the group they were read from (see
locate()). With no group named, one call can read TRAX methane from lin and ozone from horel, so the result can mix both groups’ GPS columns.