aerosoltools.loaders.tiger

Module Contents

aerosoltools.loaders.tiger.load_tiger_file(file, year=2026)[source]
Description:

Load a Tiger LDSA text export and return it as an Gas1D time series with TEM sampling metadata.

Parameters:
  • file (str) – Path to the Tiger .txt export file.

  • year (int, optional) – Due to inconsistency in dating for the software, it is required to provide the year of the onset of the data, which will then correct the year. It is still required to perform time_shift to ensure that the month, day, hour, minute and second fits.

Returns:

Tiger total VOC time series with a datetime index, TVOC and associated metadata.

Return type:

Gas1D

Raises:

Notes

Detailed description:

This loader is tailored to Tiger text exports that provide Total VOC measurements as a function of time.

Internally, the function:

  • Attempts to infer encoding and delimiter via sniff(). If delimiter detection fails.

  • Reads the main data block with numpy.genfromtxt(), starting at the Tiger data header (header=14).

  • Renames core columns:

    • "Date" → "Datetime",

    • "TVOC (ppb)" → "Concentration" (the species is kept in dtype, per the Gas1D contract).

  • Reads the header region (first 8 lines) via numpy.genfromtxt().

  • Converts the "Date" and "Time" columns from date and time to absolute timestamps by suptracting the difference in year from the recorded year.

  • Constructs a Gas1D object using the core columns:

    • Datetime,

    • Concentration,

  • Populates metadata:

    • instrument set to "Tiger",

    • serial_number from the first header line (last 3 characters),

    • unit mapping:

      • "VOC" → "ppb" or "ppm",

Theory:

The Tiger logs total VOC in either ppb or ppm

Examples:

Typical usage is to load a Tiger file and inspect VOC sampling information:

import aerosoltools as at

# Load Tiger VOC data
tiger = at.Load_Tiger_file("data/Tiger_export.txt",
                              extra_data=True)

# Inspect the main time series
print(tiger.data.head())

# Plot VOC over time
fig, ax = tiger.plot_total_conc()