read_GHG
Functions for reading and processing LI-COR GHG high-frequency data files.
This module provides functionality to read and process high-frequency data from LI-COR GHG files, specifically focusing on the SMARTFLUX system output. It includes tools for:
Reading and extracting data from zipped GHG files
Processing diagnostic values from LI-7200 gas analyzer
Handling AGC (Automatic Gain Control) values and other diagnostic flags
Author: Ariane Faures Created: October 5, 2021
Functions
Read and extract high-frequency data from LI-COR SMARTFLUX GHG files. |
|
Process LI-7200 gas analyzer diagnostic values. |
- read_GHG.read_GHG(raw_file, raw_format='ghg', unzip_path=None)[source]
Read and extract high-frequency data from LI-COR SMARTFLUX GHG files.
This function handles the reading of high-frequency eddy covariance data from LI-COR SMARTFLUX GHG files. It extracts both data and metadata from zipped GHG files and returns them as pandas DataFrames.
- Parameters:
- Returns:
A list containing:
file_header : pandas.DataFrame Header information from the data file (first 6 lines)
file_data : pandas.DataFrame High frequency data with variable names as columns
data_name : str Path to the extracted data file
metadata_name : str Path to the extracted metadata file
- Return type:
Notes
The function automatically cleans up extracted files after reading them.
- read_GHG.read_diag_val(data)[source]
Process LI-7200 gas analyzer diagnostic values.
This function processes diagnostic values from a LI-7200 gas analyzer, converting binary diagnostic flags into meaningful status indicators. Each diagnostic value is a binary number where specific bits indicate the status of different analyzer components.
- Parameters:
data (
pandas.Series
ornumpy.ndarray
) – Series or array of diagnostic values from the analyzer- Returns:
DataFrame containing diagnostic information for each component:
- AGCfloat
Mean AGC value (Automatic Gain Control, scaled by 6.67)
- Syncint
Count of synchronization issues
- PLLint
Count of Phase-Locked Loop issues
- Detectorint
Count of detector issues
- Chopperint
Count of chopper wheel issues
- DeltaPressureint
Count of pressure differential issues
- Aux_inputint
Count of auxiliary input issues
- Tinletint
Count of inlet temperature issues
- Toutletint
Count of outlet temperature issues
- Head detectint
Count of head detection issues
- Return type: