uataq.read_data#

uataq.read_data(SID, instruments='all', group=None, lvl=None, time_range=None, num_processes=1, file_pattern=None)[source]#

Read data from an instrument at a site.

Parameters:
  • SID (str) – The site ID.

  • instruments (Literal['all'] | str | list[str] | tuple[str, ...] | set[str]) – The instrument(s) to read data from.

  • 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 (see uataq.instruments.Instrument.resolve_group()).

  • lvl (str | None) – The data level: 'raw', 'qaqc', 'calibrated' or 'final'. 'final' is the ready-to-share level, with the pipeline’s default flags applied; the lower levels are for finer control. Which to use depends on how clean the data need to be for what you are doing, and on how much control you want over the QAQC. Default None reads the highest level the instrument has. See The four levels.

  • time_range (TimeRange | str | tuple[str | datetime | datetime64 | None, str | datetime | datetime64 | None] | list[str | datetime | datetime64 | None] | slice | None) – The time range to read data, in UTC (see Time range). Default is None which reads all available data.

  • num_processes (int | Literal['max']) – The number of processes to use. Default is 1.

  • file_pattern (str | None) – Keep only the files whose path contains this text (a plain substring, not a glob or a regular expression). Default None keeps every file. See File pattern.

Returns:

One table for each instrument, keyed by the instrument’s name.

Return type:

dict[str, DataFrame]