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
Gas1Dtime series with TEM sampling metadata.
- Parameters:
file (str) – Path to the Tiger
.txtexport 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:
- Raises:
FileNotFoundError – If
filedoes not exist or cannot be opened.UnicodeDecodeError – If the file cannot be decoded using the encodings tried by
sniff().
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 indtype, per theGas1Dcontract).
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
Gas1Dobject using the core columns:Datetime,Concentration,
Populates metadata:
instrumentset to"Tiger",serial_numberfrom the first header line (last 3 characters),unitmapping:"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()