Lin Group#

John Lin group - UUCON, TRAX, etc.

This module contains classes and functions for working with the Lin group data in the CHPC UATAQ filesystem.

Module Attributes

MEASUREMENTS_DIR

Directory for Lin group measurements.

CONFIG_DIR

Directory for Lin group pipeline configuration.

DATA_DIR

Directory for Lin group data.

CONFIG_URL

Where the pipeline configuration is fetched from off-cluster.

CONFIG_FETCH_TIMEOUT

Seconds to wait for each off-cluster fetch before giving up.

DATA_CONFIG

Data configuration.

SITE_CONFIG

Site configuration.

column_mapping

Lin to UATAQ column mapping

Functions

dms2dd([d, m, s])

Degree-minute-second to decimal degree

Classes

AirTrendFile(path)

A class for parsing AirTrend data files.

LGR_UGGA_File(path)

A class for parsing LGR UGGA data files.

LinDatFile(path)

A class for parsing Lin data files.

LinGroup()

A class representing the Lin group space in the CHPC UATAQ filesystem.

uataq.filesystem.groupspaces.lin.MEASUREMENTS_DIR: str = '/uufs/chpc.utah.edu/common/home/lin-group20/measurements'#

Directory for Lin group measurements.

uataq.filesystem.groupspaces.lin.CONFIG_DIR: str = '/uufs/chpc.utah.edu/common/home/lin-group20/measurements/pipeline/config'#

Directory for Lin group pipeline configuration.

uataq.filesystem.groupspaces.lin.DATA_DIR: str = '/uufs/chpc.utah.edu/common/home/lin-group20/measurements/data'#

Directory for Lin group data.

uataq.filesystem.groupspaces.lin.CONFIG_URL: str = 'https://raw.githubusercontent.com/uataq/data-pipeline/main/config'#

Where the pipeline configuration is fetched from off-cluster.

uataq.filesystem.groupspaces.lin.CONFIG_FETCH_TIMEOUT: float = 10#

Seconds to wait for each off-cluster fetch before giving up.

uataq.filesystem.groupspaces.lin.DATA_CONFIG: dict = {'2b_205': {'air_trend': {'col_names': ['time', 'o3_ppb', 't_c', 'p_hpa', 'flow_ccpm'], 'col_types': 'Tdddd'}, 'final': {'col_names': ['Time_UTC', 'O3_ppb'], 'col_types': 'Td'}, 'qaqc': {'col_names': ['Time_UTC', 'O3_ppb', 'Cavity_T_C', 'Cavity_P_hPa', 'Flow_CCmin', 'QAQC_Flag'], 'col_types': 'Tddddd'}}, 'gps': {'air_trend_gpgga': {'col_names': ['time', 'inst_time', 'latitude_dm', 'n_s', 'longitude_dm', 'e_w', 'fix_quality', 'n_sat', 'altitude_amsl'], 'col_types': 'Tcdcdcddd'}, 'air_trend_gprmc': {'col_names': ['time', 'inst_time', 'status', 'latitude_dm', 'n_s', 'longitude_dm', 'e_w', 'speed_kt', 'true_course', 'inst_date'], 'col_types': 'Tccdcdcddc'}, 'final': {'col_names': ['Time_UTC', 'Pi_Time', 'Latitude_deg', 'Longitude_deg', 'Altitude_msl', 'Speed_m_s', 'Course_deg'], 'col_types': 'TTddddd'}, 'qaqc': {'col_names': ['Time_UTC', 'Pi_Time', 'Latitude_deg', 'Longitude_deg', 'Altitude_msl', 'Speed_m_s', 'Course_deg', 'N_Sat', 'Fix_Quality', 'Status', 'QAQC_Flag'], 'col_types': 'TTddddddd'}}, 'lgr_no2': {'air_trend': {'col_names': ['time', 'inst_time', 'Relative_Time_s', 'NO2_ppb', 'NO2_ppb_SE', 'Pressure_torr', 'Temperature_C', 'LED_T_V', 'Instrument_T_C', 'Tau_s', 'BG_Subtracted_Tau_s', 'Tau_SE_s', 'Loss_ppm_cm-1', 'BG_Subtracted_Loss_ppm_cm-1', 'Loss_SE_ppm_cm-1', 'Num_Good_Fits', 'Fit_Amplitude_V', 'Fit_Amplitude_SE_V', 'Fit_Offset_V', 'Fit_Offset_SE_V', 'Valve_Number', 'Valve_Description', 'Collection_State', 'Checksum'], 'col_types': 'TTdddddddddddddddddddccc'}, 'final': {'col_names': ['Time_UTC', 'NO2_ppb'], 'col_types': 'Td'}, 'qaqc': {'col_names': ['Time_UTC', 'NO2_ppb', 'NO2_ppb_se', 'Cavity_P_torr', 'Cavity_T_C', 'LED_T_V', 'Instrument_T_C', 'Tau_s', 'BG_Subtracted_Tau_s', 'Tau_SE_s', 'Loss_ppm_cm-1', 'BG_Subtracted_Loss_ppm_cm-1', 'Loss_SE_ppm_cm-1', 'Num_Good_Fits', 'Fit_Amplitude_V', 'Fit_Amplitude_SE_V', 'Fit_Offset_V', 'Fit_Offset_SE_V', 'ID', 'QAQC_Flag'], 'col_types': 'Tddddddddddddddddddd'}}, 'lgr_ugga': {'air_trend': {'col_names': ['time', 'CH4_ppm', 'CH4_ppm_sd', 'H2O_ppm', 'H2O_ppm_sd', 'CO2_ppm', 'CO2_ppm_sd', 'CH4d_ppm', 'CH4d_ppm_sd', 'CO2d_ppm', 'CO2d_ppm_sd', 'GasP_torr', 'GasP_torr_sd', 'GasT_C', 'GasT_C_sd', 'AmbT_C', 'AmbT_C_sd', 'RD0_us', 'RD0_us_sd', 'RD1_us', 'RD1_us_sd', 'Fit_Flag', 'ID'], 'col_types': 'Tdddddddddddddddddddddc'}, 'calibrated': {'col_names': ['Time_UTC', 'CO2d_ppm_cal', 'CO2d_ppm_raw', 'CO2d_m', 'CO2d_b', 'CO2d_n', 'CO2d_rsq', 'CO2d_rmse', 'ID_CO2', 'CH4d_ppm_cal', 'CH4d_ppm_raw', 'CH4d_m', 'CH4d_b', 'CH4d_n', 'CH4d_rsq', 'CH4d_rmse', 'ID_CH4', 'QAQC_Flag'], 'col_types': 'Tddddddddddddddddd'}, 'final': {'col_names': ['Time_UTC', 'CO2d_ppm_cal', 'CO2d_ppm_raw', 'CH4d_ppm_cal', 'CH4d_ppm_raw', 'H2O_ppm'], 'col_types': 'Tddddd'}, 'qaqc': {'col_names': ['Time_UTC', 'CH4_ppm', 'CH4_ppm_sd', 'H2O_ppm', 'H2O_ppm_sd', 'CO2_ppm', 'CO2_ppm_sd', 'CH4d_ppm', 'CH4d_ppm_sd', 'CO2d_ppm', 'CO2d_ppm_sd', 'Cavity_P_torr', 'Cavity_P_torr_sd', 'Cavity_T_C', 'Cavity_T_C_sd', 'Ambient_T_C', 'Ambient_T_C_sd', 'RD0_us', 'RD0_us_sd', 'RD1_us', 'RD1_us_sd', 'Fit_Flag', 'ID', 'ID_CO2', 'ID_CH4', 'QAQC_Flag'], 'col_types': 'Tdddddddddddddddddddddcddd'}, 'raw': {'col_names': ['Time_UTC', 'CH4_ppm', 'CH4_ppm_sd', 'H2O_ppm', 'H2O_ppm_sd', 'CO2_ppm', 'CO2_ppm_sd', 'CH4d_ppm', 'CH4d_ppm_sd', 'CO2d_ppm', 'CO2d_ppm_sd', 'GasP_torr', 'GasP_torr_sd', 'GasT_C', 'GasT_C_sd', 'AmbT_C', 'AmbT_C_sd', 'RD0_us', 'RD0_us_sd', 'RD1_us', 'RD1_us_sd', 'Fit_Flag', 'ID'], 'col_types': 'cdddddddddddddddddddddc'}}, 'lgr_ugga_manual_cal': {'air_trend': {'col_names': ['time', 'CH4_ppm', 'CH4_ppm_sd', 'H2O_ppm', 'H2O_ppm_sd', 'CO2_ppm', 'CO2_ppm_sd', 'CH4d_ppm', 'CH4d_ppm_sd', 'CO2d_ppm', 'CO2d_ppm_sd', 'GasP_torr', 'GasP_torr_sd', 'GasT_C', 'GasT_C_sd', 'AmbT_C', 'AmbT_C_sd', 'RD0_us', 'RD0_us_sd', 'RD1_us', 'RD1_us_sd', 'Fit_Flag', 'ID'], 'col_types': 'Tdddddddddddddddddddddc'}, 'calibrated': {'col_names': ['Time_UTC', 'CO2d_ppm_cal', 'CO2d_ppm_raw', 'CO2d_m', 'CO2d_b', 'CO2d_n', 'CO2d_rsq', 'CO2d_rmse', 'ID_CO2', 'CH4d_ppm_cal', 'CH4d_ppm_raw', 'CH4d_m', 'CH4d_b', 'CH4d_n', 'CH4d_rsq', 'CH4d_rmse', 'ID_CH4', 'QAQC_Flag'], 'col_types': 'Tddddddddddddddddd'}, 'final': {'col_names': ['Time_UTC', 'CO2d_ppm_cal', 'CO2d_ppm_raw', 'CH4d_ppm_cal', 'CH4d_ppm_raw', 'H2O_ppm'], 'col_types': 'Tddddd'}, 'qaqc': {'col_names': ['Time_UTC', 'CH4_ppm', 'CH4_ppm_sd', 'H2O_ppm', 'H2O_ppm_sd', 'CO2_ppm', 'CO2_ppm_sd', 'CH4d_ppm', 'CH4d_ppm_sd', 'CO2d_ppm', 'CO2d_ppm_sd', 'Cavity_P_torr', 'Cavity_P_torr_sd', 'Cavity_T_C', 'Cavity_T_C_sd', 'Ambient_T_C', 'Ambient_T_C_sd', 'RD0_us', 'RD0_us_sd', 'RD1_us', 'RD1_us_sd', 'Fit_Flag', 'ID', 'ID_CO2', 'ID_CH4', 'QAQC_Flag'], 'col_types': 'Tdddddddddddddddddddddcddd'}, 'raw': {'col_names': ['Time_UTC', 'CH4_ppm', 'CH4_ppm_sd', 'H2O_ppm', 'H2O_ppm_sd', 'CO2_ppm', 'CO2_ppm_sd', 'CH4d_ppm', 'CH4d_ppm_sd', 'CO2d_ppm', 'CO2d_ppm_sd', 'GasP_torr', 'GasP_torr_sd', 'GasT_C', 'GasT_C_sd', 'AmbT_C', 'AmbT_C_sd', 'RD0_us', 'RD0_us_sd', 'RD1_us', 'RD1_us_sd', 'Fit_Flag', 'ID'], 'col_types': 'cdddddddddddddddddddddc'}}, 'licor_6262': {'calibrated': {'col_names': ['Time_UTC', 'CO2d_ppm_cal', 'CO2d_ppm_raw', 'CO2d_m', 'CO2d_b', 'CO2d_n', 'CO2d_rsq', 'CO2d_rmse', 'ID_CO2', 'QAQC_Flag'], 'col_types': 'Tddddddddd'}, 'final': {'col_names': ['Time_UTC', 'CO2d_ppm_cal', 'CO2d_ppm_raw', 'H2O_ppm'], 'col_types': 'Tddd'}, 'qaqc': {'col_names': ['Time_UTC', 'Battery_Voltage_V', 'Panel_T_C', 'Ambient_T_C', 'Cavity_T_C_IRGA', 'Cavity_P_kPa_IRGA', 'Flow_mLmin', 'Cavity_P_mV', 'Cavity_RH_mV', 'Cavity_T_C', 'CO2_Analog_ppm', 'CO2_ppm', 'H2O_ppth_IRGA', 'ID', 'Program', 'ID_CO2', 'Cavity_RH_pct', 'Cavity_P_Pa', 'H2O_ppm', 'CO2d_ppm', 'QAQC_Flag'], 'col_types': 'Tdddddddddddddcdddddd'}, 'raw': {'col_names': ['TIMESTAMP', 'RECORD', 'Year', 'jDay', 'HH', 'MM', 'SS', 'batt_volt_Min', 'PTemp_Avg', 'Room_T_Avg', 'IRGA_T_Avg', 'IRGA_P_Avg', 'MF_Controller_mLmin_Avg', 'PressureVolt_Avg', 'RH_voltage_Avg', 'Gas_T_Avg', 'rawCO2_Voltage_Avg', 'rawCO2_Avg', 'rawH2O_Avg', 'ID', 'Program'], 'col_types': 'Tdddddddddddddddddddc'}}, 'licor_7000': {'calibrated': {'col_names': ['Time_UTC', 'CO2d_ppm_cal', 'CO2d_ppm_raw', 'CO2d_m', 'CO2d_b', 'CO2d_n', 'CO2d_rsq', 'CO2d_rmse', 'ID_CO2', 'QAQC_Flag'], 'col_types': 'Tddddddddd'}, 'final': {'col_names': ['Time_UTC', 'CO2d_ppm_cal', 'CO2d_ppm_raw', 'H2O_ppm'], 'col_types': 'Tddd'}, 'qaqc': {'col_names': ['Time_UTC', 'Battery_Voltage_V', 'Panel_T_C', 'Cavity_T_C_IRGA', 'Cavity_P_kPa_IRGA', 'Flow_mLmin', 'Cavity_P_mV', 'Cavity_RH_mV', 'Cavity_T_C', 'CO2_ppm', 'H2O_ppth_IRGA', 'ID', 'Program', 'ID_CO2', 'Cavity_RH_pct', 'Cavity_P_Pa', 'H2O_ppm', 'CO2d_ppm', 'QAQC_Flag'], 'col_types': 'Tdddddddddddddcdddddd'}, 'raw': {'col_names': ['TIMESTAMP', 'RECORD', 'Year', 'jDay', 'HH', 'MM', 'SS', 'batt_volt_Min', 'PTemp_Avg', 'IRGA_T_Avg', 'IRGA_P_Avg', 'MF_Controller_mLmin_Avg', 'PressureVolt_Avg', 'RH_voltage_Avg', 'Gas_T_Avg', 'rawCO2_Avg', 'rawH2O_Avg', 'ID', 'Program'], 'col_types': 'Tdddddddddddddddddddc'}}, 'magee_ae33': {'air_trend': {'col_names': ['time', 'bc1_ngm3', 'bc2_ngm3', 'bc3_ngm3', 'bc4_ngm3', 'bc5_ngm3', 'bc6_ngm3', 'bc7_ngm3', 'flow_lpm'], 'col_types': 'Tdddddddd'}, 'final': {'col_names': ['Time_UTC', 'BC1_ngm3', 'BC2_ngm3', 'BC3_ngm3', 'BC4_ngm3', 'BC5_ngm3', 'BC6_ngm3', 'BC7_ngm3'], 'col_types': 'Tddddddd'}, 'qaqc': {'col_names': ['Time_UTC', 'BC1_ngm3', 'BC2_ngm3', 'BC3_ngm3', 'BC4_ngm3', 'BC5_ngm3', 'BC6_ngm3', 'BC7_ngm3', 'Flow_Lmin', 'QAQC_Flag'], 'col_types': 'Tddddddddd'}}, 'met': {'air_trend': {'col_names': ['time', 'case_t_c', 'case_rh_pct', 'case_t2_c', 'case_p_hpa', 'amb_t_c', 'amb_rh_pct', 'box_t_c'], 'col_types': 'Tddddddd'}, 'final': {'col_names': ['Time_UTC', 'Case_T_C', 'Case_RH_pct', 'Case_T2_C', 'Case_P_hPa', 'Ambient_T_C', 'Ambient_RH_pct', 'Box_T_C'], 'col_types': 'Tddddddd'}}, 'metone_es642': {'air_trend': {'col_names': ['time', 'pm25_mgm3', 'flow_lpm', 't_c', 'rh_pct', 'pres_hpa', 'status', 'checksum'], 'col_types': 'Tdddddddc'}, 'final': {'col_names': ['Time_UTC', 'PM2.5_ugm3', 'Ambient_T_C', 'Ambient_P_hPa'], 'col_types': 'Tddd'}, 'qaqc': {'col_names': ['Time_UTC', 'PM2.5_ugm3', 'Flow_Lmin', 'Ambient_T_C', 'Cavity_RH_pct', 'Ambient_P_hPa', 'Status', 'QAQC_Flag'], 'col_types': 'Tddddddd'}, 'raw': {'col_names': ['TIMESTAMP', 'RECORD', 'batt_volt_Min', 'PTemp_Avg', 'PM_25_Avg', 'Flow_Avg', 'Temp_Avg', 'RH_Avg', 'BP_Avg', 'Program'], 'col_types': 'Tddddddddc'}}, 'teledyne_t200': {'air_trend': {'col_names': ['time', 'nox_std_ppb', 'flow_ccm', 'o3_flow_ccm', 'pmt_mv', 'pmt_norm_mv', 'azero_mv', 'hvps_v', 'rcell_t_c', 'box_t_c', 'pmt_t_c', 'moly_t_c', 'rcel_pres_inhga', 'samp_pres_inhga', 'nox_slope', 'nox_offset_mv', 'no_slope', 'no_offset_mv', 'no2_ppb', 'nox_ppb', 'no_ppb', 'test_mv'], 'col_types': 'Tddddddddddddddddddddd'}, 'final': {'col_names': ['Time_UTC', 'NO_ppb', 'NO2_ppb', 'NOx_ppb'], 'col_types': 'Tddd'}, 'qaqc': {'col_names': ['Time_UTC', 'NOx_ppb_std', 'Flow_CCmin', 'O3_Flow_CCmin', 'PMT_mV', 'PMT_Norm_mV', 'Azero_mV', 'HVPS_V', 'RCel_T_C', 'Box_T_C', 'PMT_T_C', 'Moly_T_C', 'RCel_Pres_inHgA', 'Samp_Pres_inHgA', 'NOx_Slope', 'NOx_Offset_mV', 'NO_Slope', 'NO_Offset_mV', 'NO2_ppb', 'NOx_ppb', 'NO_ppb', 'Test_mV', 'QAQC_Flag'], 'col_types': 'Tdddddddddddddddddddddd'}}, 'teledyne_t300': {'air_trend': {'col_names': ['time', 'co_std_ppb', 'co_meas_mv', 'co_ref_mv', 'mr_ratio', 'samp_pres_inhga', 'flow_ccm', 'samp_t_c', 'bench_t_c', 'wheel_t_c', 'box_t_c', 'pht_drive_mv', 'slope', 'slope1', 'slope2', 'offset', 'offset1', 'offset2', 'co_ppb', 'test_mv'], 'col_types': 'Tddddddddddddddddddd'}, 'final': {'col_names': ['Time_UTC', 'CO_ppb'], 'col_types': 'Td'}, 'qaqc': {'col_names': ['Time_UTC', 'CO_std_ppb', 'CO_Meas_mV', 'CO_Ref_mV', 'MR_Ratio', 'Samp_Pres_inHgA', 'Flow_CCmin', 'Samp_T_C', 'Bench_T_C', 'Wheel_T_C', 'Box_T_C', 'PHT_Drive_mV', 'Slope', 'Slope1', 'Slope2', 'Offset', 'Offset1', 'Offset2', 'CO_ppb', 'Test_mV', 'QAQC_Flag'], 'col_types': 'Tdddddddddddddddddddd'}}, 'teledyne_t400': {'air_trend': {'col_names': ['time', 'o3_std_ppb', 'o3_meas_mv', 'o3_ref_mv', 'o3_gen_mv', 'o3_drive_mv', 'photo_power_mv', 'samp_pres_inhga', 'flow_ccm', 'samp_t_c', 'photo_lamp_t_c', 'o3_scrub_t_c', 'o3_gen_t_c', 'box_t_c', 'slope', 'offset', 'o3_ppb', 'test_mv'], 'col_types': 'Tddddddddddddddddd'}, 'final': {'col_names': ['Time_UTC', 'O3_ppb'], 'col_types': 'Td'}, 'qaqc': {'col_names': ['Time_UTC', 'O3_std_ppb', 'O3_Meas_mV', 'O3_Ref_mV', 'O3_Gen_mV', 'O3_Drive_mV', 'Photo_Power_mV', 'Samp_Pres_inHgA', 'Flow_CCmin', 'Samp_T_C', 'Photo_Lamp_T_C', 'O3_Scrub_T_C', 'O3_Gen_T_C', 'Box_T_C', 'Slope', 'Offset', 'O3_ppb', 'Test_mV', 'QAQC_Flag'], 'col_types': 'Tdddddddddddddddddd'}}, 'teledyne_t500u': {'air_trend': {'col_names': ['time', 'phase_t_c', 'bench_phase_s', 'meas_l_mm', 'aref_l_mm', 'samp_pres_inhga', 'samp_temp_c', 'bench_t_c', 'box_t_c', 'no2_slope', 'no2_offset_mv', 'no2_ppb', 'no2_std_ppb', 'mf_t_c', 'test_mv'], 'col_types': 'Tdddddddddddddd'}, 'final': {'col_names': ['Time_UTC', 'NO2_ppb'], 'col_types': 'Td'}, 'qaqc': {'col_names': ['Time_UTC', 'Phase_T_C', 'Bench_Phase_s', 'Meas_L_mm', 'ARef_L_mm', 'Samp_Pres_inHgA', 'Samp_T_C', 'Bench_T_C', 'Box_T_C', 'NO2_Slope', 'NO2_Offset_mV', 'NO2_ppb', 'NO2_std_ppb', 'MF_T_C', 'Test_mV', 'QAQC_Flag'], 'col_types': 'Tddddddddddddddd'}}, 'teom_1400ab': {'air_trend': {'col_names': ['time', 'pm25_ugm3', 'pm25_ugm3_30min', 'pm25_ugm3_1hr'], 'col_types': 'Tddd'}, 'final': {'col_names': ['Time_UTC', 'PM2.5_ugm3', 'PM2.5_ugm3_30min', 'PM2.5_ugm3_1hr'], 'col_types': 'Tddd'}, 'qaqc': {'col_names': ['Time_UTC', 'PM2.5_ugm3', 'PM2.5_ugm3_30min', 'PM2.5_ugm3_1hr', 'QAQC_Flag'], 'col_types': 'Tdddd'}}}#

Data configuration.

uataq.filesystem.groupspaces.lin.SITE_CONFIG = name  ...                                        instruments stid                          ...                                                    asb      Aline Wilmot Skaggs  ...                                                NaN csp              Castle Peak  ...                                           lgr_ugga dbk                 Daybreak  ...                            licor_7000 metone_es642 fru                Fruitland  ...                                           lgr_ugga hdp              Hidden Peak  ...                                                NaN heb                    Heber  ...                                                NaN hpl                Horsepool  ...                                           lgr_ugga imc    Intermountain Medical  ...                                                NaN ldf             SLV Landfill  ...                                                NaN lgn                    Logan  ...                                                NaN lg2                    Logan  ...                                                NaN msa         Murray Satellite  ...                                                NaN mur                   Murray  ...                                                NaN roo                Roosevelt  ...                                                NaN rpk                Rose Park  ...                                         licor_7000 sug               Sugarhouse  ...                                                NaN sun                 Suncrest  ...                                                NaN trx01              TRAX 1136  ...                            gps lgr_ugga_manual_cal trx02              TRAX 1104  ...                                 gps teledyne_t500u wbb         William Browning  ...  lgr_ugga teledyne_t200 teledyne_t300 teledyne_...  [20 rows x 9 columns]#

Site configuration.

uataq.filesystem.groupspaces.lin.column_mapping: dict[str, dict[str, str]] = {'2b_205': {'Cavity_P_hPa': 'Internal_P_hPa', 'Cavity_T_C': 'Internal_T_C', 'Flow_CCmin': 'Flow_mLpm', 'flow_ccpm': 'Flow_mLpm', 'o3_ppb': 'O3_ppb', 'p_hpa': 'Internal_P_hPa', 't_c': 'Internal_T_C'}, 'gps': {'N_Sat': 'N_Satellites', 'altitude_amsl': 'Altitude_msl', 'fix_quality': 'Fix_Quality', 'inst_date': 'Instrument_Date', 'inst_time': 'Instrument_Time', 'n_sat': 'N_Satellites', 'speed_kt': 'Speed_kt', 'status': 'Status', 'true_course': 'Course_deg'}, 'lgr_no2': {'Cavity_P_torr': 'Internal_P_torr', 'Pressure_torr': 'Internal_P_torr', 'inst_time': 'Instrument_Time'}, 'lgr_ugga': {'AmbT_C': 'Ambient_T_C', 'AmbT_C_sd': 'Ambient_T_C_sd', 'Cavity_P_torr': 'Internal_P_torr', 'Cavity_P_torr_sd': 'Internal_P_torr_sd', 'Cavity_T_C': 'Internal_T_C', 'Cavity_T_C_sd': 'Internal_T_C_sd', 'GasP_torr': 'Internal_P_torr', 'GasP_torr_sd': 'Internal_P_torr_sd', 'GasT_C': 'Internal_T_C', 'GasT_C_sd': 'Internal_T_C_sd', 'RD0_us': 'RingDown0_us', 'RD0_us_sd': 'RingDown0_us_sd', 'RD1_us': 'RingDown1_us', 'RD1_us_sd': 'RingDown1_us_sd'}, 'licor_6262': {'CO2_Analog_ppm': 'Analog_CO2_ppm', 'Cavity_P_Pa': 'Analog_Internal_P_Pa', 'Cavity_P_kPa_IRGA': 'Internal_P_kPa', 'Cavity_P_mV': 'Internal_P_mV', 'Cavity_RH_mV': 'Internal_RH_mV', 'Cavity_RH_pct': 'Internal_RH_pct', 'Cavity_T_C': 'Internal_T_C', 'Cavity_T_C_IRGA': 'Instrument_T_C', 'Flow_mLmin': 'Flow_mLpm', 'Gas_T_Avg': 'Internal_T_C', 'H2O_ppth_IRGA': 'Analog_H2O_ppm', 'IRGA_P_Avg': 'Internal_P_kPa', 'IRGA_T_Avg': 'Instrument_T_C', 'MF_Controller_mLmin_Avg': 'Flow_mLpm', 'PTemp_Avg': 'Logger_T_C', 'Panel_T_C': 'Logger_T_C', 'PressureVolt_Avg': 'Internal_P_mV', 'RECORD': 'Record', 'RH_voltage_Avg': 'Internal_RH_mV', 'Room_T_Avg': 'Ambient_T_C', 'batt_volt_Min': 'Battery_Voltage_V', 'rawCO2_Avg': 'CO2_ppm', 'rawCO2_Voltage_Avg': 'Analog_CO2_ppm', 'rawH2O_Avg': 'Analog_H2O_ppm'}, 'licor_7000': {'CO2_Analog_ppm': 'Analog_CO2_ppm', 'Cavity_P_Pa': 'Analog_Internal_P_Pa', 'Cavity_P_kPa_IRGA': 'Internal_P_kPa', 'Cavity_P_mV': 'Internal_P_mV', 'Cavity_RH_mV': 'Internal_RH_mV', 'Cavity_RH_pct': 'Internal_RH_pct', 'Cavity_T_C': 'Internal_T_C', 'Cavity_T_C_IRGA': 'Instrument_T_C', 'Flow_mLmin': 'Flow_mLpm', 'Gas_T_Avg': 'Internal_T_C', 'H2O_ppth_IRGA': 'Analog_H2O_ppm', 'IRGA_P_Avg': 'Internal_P_kPa', 'IRGA_T_Avg': 'Instrument_T_C', 'MF_Controller_mLmin_Avg': 'Flow_mLpm', 'PTemp_Avg': 'Logger_T_C', 'Panel_T_C': 'Logger_T_C', 'PressureVolt_Avg': 'Internal_P_mV', 'RECORD': 'Record', 'RH_voltage_Avg': 'Internal_RH_mV', 'Room_T_Avg': 'Ambient_T_C', 'batt_volt_Min': 'Battery_Voltage_V', 'rawCO2_Avg': 'CO2_ppm', 'rawCO2_Voltage_Avg': 'Analog_CO2_ppm', 'rawH2O_Avg': 'Analog_H2O_ppm'}, 'magee_ae33': {'Flow_Lmin': 'Flow_Lpm', 'bc1_ngm3': 'BC1_ngm3', 'bc2_ngm3': 'BC2_ngm3', 'bc3_ngm3': 'BC3_ngm3', 'bc4_ngm3': 'BC4_ngm3', 'bc5_ngm3': 'BC5_ngm3', 'bc6_ngm3': 'BC6_ngm3', 'bc7_ngm3': 'BC7_ngm3', 'flow_lpm': 'Flow_Lpm'}, 'metone_es642': {'BP_Avg': 'Ambient_P_hPa', 'Cavity_RH_pct': 'Internal_RH_pct', 'Flow_Avg': 'Flow_Lpm', 'Flow_Lmin': 'Flow_Lpm', 'PM_25_Avg': 'PM2.5_ugm3', 'PTemp_Avg': 'Logger_T_C', 'RECORD': 'Record', 'RH_Avg': 'Internal_RH_pct', 'Temp_Avg': 'Ambient_T_C', 'batt_volt_Min': 'Battery_Voltage_V', 'checksum': 'Checksum', 'flow_lpm': 'Flow_Lpm', 'pm25_mgm3': 'PM2.5_mgm3', 'pres_hpa': 'Ambient_P_hPa', 'rh_pct': 'Internal_RH_pct', 'status': 'Status', 't_c': 'Ambient_T_C'}, 'teledyne_t200': {'Box_T_C': 'Instrument_T_C', 'Flow_CCmin': 'Flow_mLpm', 'O3_Flow_CCmin': 'O3_Flow_mLpm', 'RCel_Pres_inHgA': 'RCell_P_inHgA', 'RCel_T_C': 'RCell_T_C', 'Samp_Pres_inHgA': 'Internal_P_inHgA', 'azero_mv': 'Azero_mV', 'box_t_c': 'Instrument_T_C', 'flow_ccm': 'Flow_mLpm', 'hvps_v': 'HVPS_V', 'moly_t_c': 'Moly_T_C', 'no2_ppb': 'NO2_ppb', 'no_offset_mv': 'NO_Offset_mV', 'no_ppb': 'NO_ppb', 'no_slope': 'NO_Slope', 'nox_offset_mv': 'NOx_Offset_mV', 'nox_ppb': 'NOx_ppb', 'nox_slope': 'NOx_Slope', 'nox_std_ppb': 'NOx_ppb_std', 'o3_flow_ccm': 'O3_Flow_mLpm', 'pmt_mv': 'PMT_mV', 'pmt_norm_mv': 'PMT_Norm_mV', 'pmt_t_c': 'PMT_T_C', 'rcel_pres_inhga': 'RCell_P_inHgA', 'rcell_t_c': 'RCell_T_C', 'samp_pres_inhga': 'Internal_P_inHgA', 'test_mv': 'Test_mV'}, 'teledyne_t300': {'CO_std_ppb': 'CO_ppb_std', 'Flow_CCmin': 'Flow_mLpm', 'Samp_Pres_inHgA': 'Internal_P_inHgA', 'Samp_T_C': 'Internal_T_C', 'bench_t_c': 'Bench_T_C', 'co_meas_mv': 'CO_Meas_mV', 'co_ppb': 'CO_ppb', 'co_ref_mv': 'CO_Ref_mV', 'co_std_ppb': 'CO_ppb_std', 'flow_ccm': 'Flow_mLpm', 'mr_ratio': 'MR_Ratio', 'offset': 'Offset', 'offset1': 'Offset1', 'offset2': 'Offset2', 'pht_drive_mv': 'PHT_Drive_mV', 'samp_pres_inhga': 'Internal_P_inHgA', 'samp_t_c': 'Internal_T_C', 'slope': 'Slope', 'slope1': 'Slope1', 'slope2': 'Slope2', 'test_mv': 'Test_mV', 'wheel_t_c': 'Wheel_T_C'}, 'teledyne_t400': {'Box_T_C': 'Instrument_T_C', 'Flow_CCmin': 'Flow_mLpm', 'Samp_Pres_inHgA': 'Internal_P_inHgA', 'Samp_T_C': 'Internal_T_C', 'box_t_c': 'Instrument_T_C', 'flow_ccm': 'Flow_mLpm', 'o3_drive_mv': 'O3_Drive_mV', 'o3_gen_mv': 'O3_Gen_mV', 'o3_gen_t_c': 'O3_Gen_T_C', 'o3_meas_mv': 'O3_Meas_mV', 'o3_ppb': 'O3_ppb', 'o3_ref_mv': 'O3_Ref_mV', 'o3_scrub_t_c': 'O3_Scrub_T_C', 'o3_std_ppb': 'O3_ppb_std', 'offset': 'Offset', 'photo_lamp_t_c': 'Photo_Lamp_T_C', 'photo_power_mv': 'Photo_Power_mV', 'samp_pres_inhga': 'Internal_P_inHgA', 'samp_t_c': 'Internal_T_C', 'slope': 'Slope', 'test_mv': 'Test_mV'}, 'teledyne_t500u': {'ARef_L_mm': 'ARef_Loss_Mm', 'Box_T_C': 'Instrument_T_C', 'Meas_L_mm': 'Measure_Loss_Mm', 'NO2_std_ppb': 'NO2_ppb_std', 'Samp_Pres_inHgA': 'Internal_P_inHgA', 'Samp_Temp_C': 'Internal_T_C', 'aref_l_mm': 'ARef_Loss_Mm', 'bench_phase_s': 'Bench_Phase_s', 'bench_t_c': 'Bench_T_C', 'box_t_c': 'Instrument_T_C', 'meas_l_mm': 'Measure_Loss_Mm', 'no2_offset_mv': 'NO2_Offset_mV', 'no2_ppb': 'NO2_ppb', 'no2_slope': 'NO2_Slope', 'no2_std_ppb': 'NO2_ppb_std', 'phase_t_c': 'Phase_T_C', 'samp_pres_inhga': 'Internal_P_inHgA', 'samp_temp_c': 'Internal_T_C', 'test_mv': 'Test_mV'}, 'teom_1400ab': {'pm25_ugm3': 'PM2.5_ugm3', 'pm25_ugm3_1hr': 'PM2.5_ugm3_1hr', 'pm25_ugm3_30min': 'PM2.5_ugm3_30min'}}#

Lin to UATAQ column mapping

uataq.filesystem.groupspaces.lin.dms2dd(d=0.0, m=0.0, s=0.0)[source]#

Degree-minute-second to decimal degree

Parameters:
  • d (float, optional) – Degrees, by default 0.0

  • m (float, optional) – Minutes, by default 0.0

  • s (float, optional) – Seconds, by default 0.0

Returns:

Decimal degrees

Return type:

float

Raises:

ValueError – If any of the inputs are not floats

class uataq.filesystem.groupspaces.lin.LinDatFile(path)[source]#

A class for parsing Lin data files.

path#

The file path.

Type:

str

period#

The period of the data file.

Type:

pd.Period

logger#

The logger name.

Type:

str

date_slicer#

A slice object for extracting the date from the file name.

Type:

slice

file_freq#

The file frequency.

Type:

str

ext#

The file extension.

Type:

str

parse()[source]#

Parse the data file.

logger: str = 'campbellsci'#
date_slicer: slice = slice(None, 7, None)#
file_freq: str = 'M'#
ext: str = 'dat'#
__init__(path)[source]#

Initialize the DataFile object.

Determines the period of the data file from the file name.

Parameters:

path (str) – The file path.

get_instrument_name()[source]#

Get the instrument name from the file path.

Returns:

The instrument name.

Return type:

str

get_lvl()[source]#

Get the data level from the file path.

Returns:

The data level.

Return type:

str

parse()[source]#

Parse a Lin data file.

Returns:

The parsed data.

Return type:

pd.DataFrame

class uataq.filesystem.groupspaces.lin.LGR_UGGA_File(path)[source]#

A class for parsing LGR UGGA data files.

path#

The file path.

Type:

str

period#

The period of the data file.

Type:

pd.Period

logger#

The logger name.

Type:

str

serial#

The analyzer’s serial number (SN in the header).

Type:

str

version#

The analyzer’s software version (VC in the header).

Type:

str

file_freq#

The file frequency.

Type:

str

ext#

The file extension.

Type:

str

get_meta(path)[source]#

Get meta data from UGGA file.

get_serial(path)[source]#

Get serial number of UGGA from file.

get_files(SID, instrument='lgr_ugga', lvl='raw')[source]#

Get list of UGGA files for a given site.

parse()[source]#

Parse files transferred directly from LGR software.

logger: str = 'lgr_ugga'#
file_freq: str = 'D'#
ext: str = 'txt'#
name_date_formats = ((re.compile('^gga(\\d{2}[A-Za-z]{3}\\d{4})_'), '%d%b%Y'), (re.compile('^gga_(\\d{4}-\\d{2}-\\d{2})_'), '%Y-%m-%d'))#

The two ways the LGR software has named its files, matched on the name itself rather than looked up by software version, so a new version that keeps either style needs no change: gga01Apr2014_f0000.txt (904M, WBB 2014-2016) and gga_2015-11-17_f0000.txt (2f90039, cf32204).

__init__(path)[source]#

Initialize the DataFile object.

Determines the period of the data file from the file name.

Parameters:

path (str) – The file path.

static get_meta(path)[source]#

Get meta data from UGGA file

Parameters:

path (str) – The path to the UGGA file.

Returns:

A dictionary containing the meta data.

Return type:

dict[str, str]

static get_serial(path)[source]#

Get serial number of UGGA from file.

Parameters:

path (str) – The path to the UGGA file.

Returns:

The serial number.

Return type:

str

static get_files(SID, instrument='lgr_ugga', lvl='raw')[source]#

Get list of UGGA files for a given site.

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

  • instrument (str) – The instrument name. Defaults to ‘lgr_ugga’.

  • lvl (str) – The data level. Defaults to ‘raw’.

Returns:

A list of file paths.

Return type:

list[str]

parse()[source]#

Parse files transferred directly from LGR software.

Returns:

The parsed data.

Return type:

pd.DataFrame

class uataq.filesystem.groupspaces.lin.AirTrendFile(path)[source]#

A class for parsing AirTrend data files.

path#

The file path.

Type:

str

period#

The period of the data file.

Type:

pd.Period

logger#

The logger name.

Type:

str

date_slicer#

A slice object for extracting the date from the file name.

Type:

slice

file_freq#

The file frequency.

Type:

str

ext#

The file extension.

Type:

str

config#

The data configuration.

Type:

dict

parse()[source]#

Parse the data file.

logger: str = 'air-trend'#
date_slicer: slice = slice(None, 10, None)#
file_freq: str = 'D'#
ext: str = 'csv'#
__init__(path)[source]#

Initialize the DataFile object.

Determines the period of the data file from the file name.

Parameters:

path (str) – The file path.

parse()[source]#

Parse an AirTrend file.

Returns:

The parsed data.

Return type:

pd.DataFrame

class uataq.filesystem.groupspaces.lin.LinGroup[source]#

A class representing the Lin group space in the CHPC UATAQ filesystem.

name#

The group name.

Type:

str

datafiles#

A dictionary mapping datafile keys to DataFile classes.

Type:

dict[str, Type[DataFile]]

data_dir#

The path to the data directory.

Type:

str

data_config#

The data configuration.

Type:

dict

get_highest_lvl(SID, instrument)[source]#

Get the highest level of data for a given site and instrument.

data_path(SID, instrument, lvl)[source]#

Get the path to the data directory for a given site, instrument, and level.

get_files(SID, instrument, lvl, logger)[source]#

Get list of file paths for a given site, instrument, and level.

get_datafile_key(instrument, lvl, logger)[source]#

Get the datafile key based on the instrument, level, and logger.

get_datafiles(SID, instrument, lvl, logger, time_range, pattern)[source]#

Get list of data files for a given level and time range.

name: str = 'lin'#
datafiles: dict[str, type[DataFile]] = {'air-trend': <class 'uataq.filesystem.groupspaces.lin.AirTrendFile'>, 'campbellsci': <class 'uataq.filesystem.groupspaces.lin.LinDatFile'>, 'data-pipeline': <class 'uataq.filesystem.groupspaces.lin.LinDatFile'>, 'lgr_ugga': <class 'uataq.filesystem.groupspaces.lin.LGR_UGGA_File'>}#
data_dir = '/uufs/chpc.utah.edu/common/home/lin-group20/measurements/data'#
data_config = {'2b_205': {'air_trend': {'col_names': ['time', 'o3_ppb', 't_c', 'p_hpa', 'flow_ccpm'], 'col_types': 'Tdddd'}, 'final': {'col_names': ['Time_UTC', 'O3_ppb'], 'col_types': 'Td'}, 'qaqc': {'col_names': ['Time_UTC', 'O3_ppb', 'Cavity_T_C', 'Cavity_P_hPa', 'Flow_CCmin', 'QAQC_Flag'], 'col_types': 'Tddddd'}}, 'gps': {'air_trend_gpgga': {'col_names': ['time', 'inst_time', 'latitude_dm', 'n_s', 'longitude_dm', 'e_w', 'fix_quality', 'n_sat', 'altitude_amsl'], 'col_types': 'Tcdcdcddd'}, 'air_trend_gprmc': {'col_names': ['time', 'inst_time', 'status', 'latitude_dm', 'n_s', 'longitude_dm', 'e_w', 'speed_kt', 'true_course', 'inst_date'], 'col_types': 'Tccdcdcddc'}, 'final': {'col_names': ['Time_UTC', 'Pi_Time', 'Latitude_deg', 'Longitude_deg', 'Altitude_msl', 'Speed_m_s', 'Course_deg'], 'col_types': 'TTddddd'}, 'qaqc': {'col_names': ['Time_UTC', 'Pi_Time', 'Latitude_deg', 'Longitude_deg', 'Altitude_msl', 'Speed_m_s', 'Course_deg', 'N_Sat', 'Fix_Quality', 'Status', 'QAQC_Flag'], 'col_types': 'TTddddddd'}}, 'lgr_no2': {'air_trend': {'col_names': ['time', 'inst_time', 'Relative_Time_s', 'NO2_ppb', 'NO2_ppb_SE', 'Pressure_torr', 'Temperature_C', 'LED_T_V', 'Instrument_T_C', 'Tau_s', 'BG_Subtracted_Tau_s', 'Tau_SE_s', 'Loss_ppm_cm-1', 'BG_Subtracted_Loss_ppm_cm-1', 'Loss_SE_ppm_cm-1', 'Num_Good_Fits', 'Fit_Amplitude_V', 'Fit_Amplitude_SE_V', 'Fit_Offset_V', 'Fit_Offset_SE_V', 'Valve_Number', 'Valve_Description', 'Collection_State', 'Checksum'], 'col_types': 'TTdddddddddddddddddddccc'}, 'final': {'col_names': ['Time_UTC', 'NO2_ppb'], 'col_types': 'Td'}, 'qaqc': {'col_names': ['Time_UTC', 'NO2_ppb', 'NO2_ppb_se', 'Cavity_P_torr', 'Cavity_T_C', 'LED_T_V', 'Instrument_T_C', 'Tau_s', 'BG_Subtracted_Tau_s', 'Tau_SE_s', 'Loss_ppm_cm-1', 'BG_Subtracted_Loss_ppm_cm-1', 'Loss_SE_ppm_cm-1', 'Num_Good_Fits', 'Fit_Amplitude_V', 'Fit_Amplitude_SE_V', 'Fit_Offset_V', 'Fit_Offset_SE_V', 'ID', 'QAQC_Flag'], 'col_types': 'Tddddddddddddddddddd'}}, 'lgr_ugga': {'air_trend': {'col_names': ['time', 'CH4_ppm', 'CH4_ppm_sd', 'H2O_ppm', 'H2O_ppm_sd', 'CO2_ppm', 'CO2_ppm_sd', 'CH4d_ppm', 'CH4d_ppm_sd', 'CO2d_ppm', 'CO2d_ppm_sd', 'GasP_torr', 'GasP_torr_sd', 'GasT_C', 'GasT_C_sd', 'AmbT_C', 'AmbT_C_sd', 'RD0_us', 'RD0_us_sd', 'RD1_us', 'RD1_us_sd', 'Fit_Flag', 'ID'], 'col_types': 'Tdddddddddddddddddddddc'}, 'calibrated': {'col_names': ['Time_UTC', 'CO2d_ppm_cal', 'CO2d_ppm_raw', 'CO2d_m', 'CO2d_b', 'CO2d_n', 'CO2d_rsq', 'CO2d_rmse', 'ID_CO2', 'CH4d_ppm_cal', 'CH4d_ppm_raw', 'CH4d_m', 'CH4d_b', 'CH4d_n', 'CH4d_rsq', 'CH4d_rmse', 'ID_CH4', 'QAQC_Flag'], 'col_types': 'Tddddddddddddddddd'}, 'final': {'col_names': ['Time_UTC', 'CO2d_ppm_cal', 'CO2d_ppm_raw', 'CH4d_ppm_cal', 'CH4d_ppm_raw', 'H2O_ppm'], 'col_types': 'Tddddd'}, 'qaqc': {'col_names': ['Time_UTC', 'CH4_ppm', 'CH4_ppm_sd', 'H2O_ppm', 'H2O_ppm_sd', 'CO2_ppm', 'CO2_ppm_sd', 'CH4d_ppm', 'CH4d_ppm_sd', 'CO2d_ppm', 'CO2d_ppm_sd', 'Cavity_P_torr', 'Cavity_P_torr_sd', 'Cavity_T_C', 'Cavity_T_C_sd', 'Ambient_T_C', 'Ambient_T_C_sd', 'RD0_us', 'RD0_us_sd', 'RD1_us', 'RD1_us_sd', 'Fit_Flag', 'ID', 'ID_CO2', 'ID_CH4', 'QAQC_Flag'], 'col_types': 'Tdddddddddddddddddddddcddd'}, 'raw': {'col_names': ['Time_UTC', 'CH4_ppm', 'CH4_ppm_sd', 'H2O_ppm', 'H2O_ppm_sd', 'CO2_ppm', 'CO2_ppm_sd', 'CH4d_ppm', 'CH4d_ppm_sd', 'CO2d_ppm', 'CO2d_ppm_sd', 'GasP_torr', 'GasP_torr_sd', 'GasT_C', 'GasT_C_sd', 'AmbT_C', 'AmbT_C_sd', 'RD0_us', 'RD0_us_sd', 'RD1_us', 'RD1_us_sd', 'Fit_Flag', 'ID'], 'col_types': 'cdddddddddddddddddddddc'}}, 'lgr_ugga_manual_cal': {'air_trend': {'col_names': ['time', 'CH4_ppm', 'CH4_ppm_sd', 'H2O_ppm', 'H2O_ppm_sd', 'CO2_ppm', 'CO2_ppm_sd', 'CH4d_ppm', 'CH4d_ppm_sd', 'CO2d_ppm', 'CO2d_ppm_sd', 'GasP_torr', 'GasP_torr_sd', 'GasT_C', 'GasT_C_sd', 'AmbT_C', 'AmbT_C_sd', 'RD0_us', 'RD0_us_sd', 'RD1_us', 'RD1_us_sd', 'Fit_Flag', 'ID'], 'col_types': 'Tdddddddddddddddddddddc'}, 'calibrated': {'col_names': ['Time_UTC', 'CO2d_ppm_cal', 'CO2d_ppm_raw', 'CO2d_m', 'CO2d_b', 'CO2d_n', 'CO2d_rsq', 'CO2d_rmse', 'ID_CO2', 'CH4d_ppm_cal', 'CH4d_ppm_raw', 'CH4d_m', 'CH4d_b', 'CH4d_n', 'CH4d_rsq', 'CH4d_rmse', 'ID_CH4', 'QAQC_Flag'], 'col_types': 'Tddddddddddddddddd'}, 'final': {'col_names': ['Time_UTC', 'CO2d_ppm_cal', 'CO2d_ppm_raw', 'CH4d_ppm_cal', 'CH4d_ppm_raw', 'H2O_ppm'], 'col_types': 'Tddddd'}, 'qaqc': {'col_names': ['Time_UTC', 'CH4_ppm', 'CH4_ppm_sd', 'H2O_ppm', 'H2O_ppm_sd', 'CO2_ppm', 'CO2_ppm_sd', 'CH4d_ppm', 'CH4d_ppm_sd', 'CO2d_ppm', 'CO2d_ppm_sd', 'Cavity_P_torr', 'Cavity_P_torr_sd', 'Cavity_T_C', 'Cavity_T_C_sd', 'Ambient_T_C', 'Ambient_T_C_sd', 'RD0_us', 'RD0_us_sd', 'RD1_us', 'RD1_us_sd', 'Fit_Flag', 'ID', 'ID_CO2', 'ID_CH4', 'QAQC_Flag'], 'col_types': 'Tdddddddddddddddddddddcddd'}, 'raw': {'col_names': ['Time_UTC', 'CH4_ppm', 'CH4_ppm_sd', 'H2O_ppm', 'H2O_ppm_sd', 'CO2_ppm', 'CO2_ppm_sd', 'CH4d_ppm', 'CH4d_ppm_sd', 'CO2d_ppm', 'CO2d_ppm_sd', 'GasP_torr', 'GasP_torr_sd', 'GasT_C', 'GasT_C_sd', 'AmbT_C', 'AmbT_C_sd', 'RD0_us', 'RD0_us_sd', 'RD1_us', 'RD1_us_sd', 'Fit_Flag', 'ID'], 'col_types': 'cdddddddddddddddddddddc'}}, 'licor_6262': {'calibrated': {'col_names': ['Time_UTC', 'CO2d_ppm_cal', 'CO2d_ppm_raw', 'CO2d_m', 'CO2d_b', 'CO2d_n', 'CO2d_rsq', 'CO2d_rmse', 'ID_CO2', 'QAQC_Flag'], 'col_types': 'Tddddddddd'}, 'final': {'col_names': ['Time_UTC', 'CO2d_ppm_cal', 'CO2d_ppm_raw', 'H2O_ppm'], 'col_types': 'Tddd'}, 'qaqc': {'col_names': ['Time_UTC', 'Battery_Voltage_V', 'Panel_T_C', 'Ambient_T_C', 'Cavity_T_C_IRGA', 'Cavity_P_kPa_IRGA', 'Flow_mLmin', 'Cavity_P_mV', 'Cavity_RH_mV', 'Cavity_T_C', 'CO2_Analog_ppm', 'CO2_ppm', 'H2O_ppth_IRGA', 'ID', 'Program', 'ID_CO2', 'Cavity_RH_pct', 'Cavity_P_Pa', 'H2O_ppm', 'CO2d_ppm', 'QAQC_Flag'], 'col_types': 'Tdddddddddddddcdddddd'}, 'raw': {'col_names': ['TIMESTAMP', 'RECORD', 'Year', 'jDay', 'HH', 'MM', 'SS', 'batt_volt_Min', 'PTemp_Avg', 'Room_T_Avg', 'IRGA_T_Avg', 'IRGA_P_Avg', 'MF_Controller_mLmin_Avg', 'PressureVolt_Avg', 'RH_voltage_Avg', 'Gas_T_Avg', 'rawCO2_Voltage_Avg', 'rawCO2_Avg', 'rawH2O_Avg', 'ID', 'Program'], 'col_types': 'Tdddddddddddddddddddc'}}, 'licor_7000': {'calibrated': {'col_names': ['Time_UTC', 'CO2d_ppm_cal', 'CO2d_ppm_raw', 'CO2d_m', 'CO2d_b', 'CO2d_n', 'CO2d_rsq', 'CO2d_rmse', 'ID_CO2', 'QAQC_Flag'], 'col_types': 'Tddddddddd'}, 'final': {'col_names': ['Time_UTC', 'CO2d_ppm_cal', 'CO2d_ppm_raw', 'H2O_ppm'], 'col_types': 'Tddd'}, 'qaqc': {'col_names': ['Time_UTC', 'Battery_Voltage_V', 'Panel_T_C', 'Cavity_T_C_IRGA', 'Cavity_P_kPa_IRGA', 'Flow_mLmin', 'Cavity_P_mV', 'Cavity_RH_mV', 'Cavity_T_C', 'CO2_ppm', 'H2O_ppth_IRGA', 'ID', 'Program', 'ID_CO2', 'Cavity_RH_pct', 'Cavity_P_Pa', 'H2O_ppm', 'CO2d_ppm', 'QAQC_Flag'], 'col_types': 'Tdddddddddddddcdddddd'}, 'raw': {'col_names': ['TIMESTAMP', 'RECORD', 'Year', 'jDay', 'HH', 'MM', 'SS', 'batt_volt_Min', 'PTemp_Avg', 'IRGA_T_Avg', 'IRGA_P_Avg', 'MF_Controller_mLmin_Avg', 'PressureVolt_Avg', 'RH_voltage_Avg', 'Gas_T_Avg', 'rawCO2_Avg', 'rawH2O_Avg', 'ID', 'Program'], 'col_types': 'Tdddddddddddddddddddc'}}, 'magee_ae33': {'air_trend': {'col_names': ['time', 'bc1_ngm3', 'bc2_ngm3', 'bc3_ngm3', 'bc4_ngm3', 'bc5_ngm3', 'bc6_ngm3', 'bc7_ngm3', 'flow_lpm'], 'col_types': 'Tdddddddd'}, 'final': {'col_names': ['Time_UTC', 'BC1_ngm3', 'BC2_ngm3', 'BC3_ngm3', 'BC4_ngm3', 'BC5_ngm3', 'BC6_ngm3', 'BC7_ngm3'], 'col_types': 'Tddddddd'}, 'qaqc': {'col_names': ['Time_UTC', 'BC1_ngm3', 'BC2_ngm3', 'BC3_ngm3', 'BC4_ngm3', 'BC5_ngm3', 'BC6_ngm3', 'BC7_ngm3', 'Flow_Lmin', 'QAQC_Flag'], 'col_types': 'Tddddddddd'}}, 'met': {'air_trend': {'col_names': ['time', 'case_t_c', 'case_rh_pct', 'case_t2_c', 'case_p_hpa', 'amb_t_c', 'amb_rh_pct', 'box_t_c'], 'col_types': 'Tddddddd'}, 'final': {'col_names': ['Time_UTC', 'Case_T_C', 'Case_RH_pct', 'Case_T2_C', 'Case_P_hPa', 'Ambient_T_C', 'Ambient_RH_pct', 'Box_T_C'], 'col_types': 'Tddddddd'}}, 'metone_es642': {'air_trend': {'col_names': ['time', 'pm25_mgm3', 'flow_lpm', 't_c', 'rh_pct', 'pres_hpa', 'status', 'checksum'], 'col_types': 'Tdddddddc'}, 'final': {'col_names': ['Time_UTC', 'PM2.5_ugm3', 'Ambient_T_C', 'Ambient_P_hPa'], 'col_types': 'Tddd'}, 'qaqc': {'col_names': ['Time_UTC', 'PM2.5_ugm3', 'Flow_Lmin', 'Ambient_T_C', 'Cavity_RH_pct', 'Ambient_P_hPa', 'Status', 'QAQC_Flag'], 'col_types': 'Tddddddd'}, 'raw': {'col_names': ['TIMESTAMP', 'RECORD', 'batt_volt_Min', 'PTemp_Avg', 'PM_25_Avg', 'Flow_Avg', 'Temp_Avg', 'RH_Avg', 'BP_Avg', 'Program'], 'col_types': 'Tddddddddc'}}, 'teledyne_t200': {'air_trend': {'col_names': ['time', 'nox_std_ppb', 'flow_ccm', 'o3_flow_ccm', 'pmt_mv', 'pmt_norm_mv', 'azero_mv', 'hvps_v', 'rcell_t_c', 'box_t_c', 'pmt_t_c', 'moly_t_c', 'rcel_pres_inhga', 'samp_pres_inhga', 'nox_slope', 'nox_offset_mv', 'no_slope', 'no_offset_mv', 'no2_ppb', 'nox_ppb', 'no_ppb', 'test_mv'], 'col_types': 'Tddddddddddddddddddddd'}, 'final': {'col_names': ['Time_UTC', 'NO_ppb', 'NO2_ppb', 'NOx_ppb'], 'col_types': 'Tddd'}, 'qaqc': {'col_names': ['Time_UTC', 'NOx_ppb_std', 'Flow_CCmin', 'O3_Flow_CCmin', 'PMT_mV', 'PMT_Norm_mV', 'Azero_mV', 'HVPS_V', 'RCel_T_C', 'Box_T_C', 'PMT_T_C', 'Moly_T_C', 'RCel_Pres_inHgA', 'Samp_Pres_inHgA', 'NOx_Slope', 'NOx_Offset_mV', 'NO_Slope', 'NO_Offset_mV', 'NO2_ppb', 'NOx_ppb', 'NO_ppb', 'Test_mV', 'QAQC_Flag'], 'col_types': 'Tdddddddddddddddddddddd'}}, 'teledyne_t300': {'air_trend': {'col_names': ['time', 'co_std_ppb', 'co_meas_mv', 'co_ref_mv', 'mr_ratio', 'samp_pres_inhga', 'flow_ccm', 'samp_t_c', 'bench_t_c', 'wheel_t_c', 'box_t_c', 'pht_drive_mv', 'slope', 'slope1', 'slope2', 'offset', 'offset1', 'offset2', 'co_ppb', 'test_mv'], 'col_types': 'Tddddddddddddddddddd'}, 'final': {'col_names': ['Time_UTC', 'CO_ppb'], 'col_types': 'Td'}, 'qaqc': {'col_names': ['Time_UTC', 'CO_std_ppb', 'CO_Meas_mV', 'CO_Ref_mV', 'MR_Ratio', 'Samp_Pres_inHgA', 'Flow_CCmin', 'Samp_T_C', 'Bench_T_C', 'Wheel_T_C', 'Box_T_C', 'PHT_Drive_mV', 'Slope', 'Slope1', 'Slope2', 'Offset', 'Offset1', 'Offset2', 'CO_ppb', 'Test_mV', 'QAQC_Flag'], 'col_types': 'Tdddddddddddddddddddd'}}, 'teledyne_t400': {'air_trend': {'col_names': ['time', 'o3_std_ppb', 'o3_meas_mv', 'o3_ref_mv', 'o3_gen_mv', 'o3_drive_mv', 'photo_power_mv', 'samp_pres_inhga', 'flow_ccm', 'samp_t_c', 'photo_lamp_t_c', 'o3_scrub_t_c', 'o3_gen_t_c', 'box_t_c', 'slope', 'offset', 'o3_ppb', 'test_mv'], 'col_types': 'Tddddddddddddddddd'}, 'final': {'col_names': ['Time_UTC', 'O3_ppb'], 'col_types': 'Td'}, 'qaqc': {'col_names': ['Time_UTC', 'O3_std_ppb', 'O3_Meas_mV', 'O3_Ref_mV', 'O3_Gen_mV', 'O3_Drive_mV', 'Photo_Power_mV', 'Samp_Pres_inHgA', 'Flow_CCmin', 'Samp_T_C', 'Photo_Lamp_T_C', 'O3_Scrub_T_C', 'O3_Gen_T_C', 'Box_T_C', 'Slope', 'Offset', 'O3_ppb', 'Test_mV', 'QAQC_Flag'], 'col_types': 'Tdddddddddddddddddd'}}, 'teledyne_t500u': {'air_trend': {'col_names': ['time', 'phase_t_c', 'bench_phase_s', 'meas_l_mm', 'aref_l_mm', 'samp_pres_inhga', 'samp_temp_c', 'bench_t_c', 'box_t_c', 'no2_slope', 'no2_offset_mv', 'no2_ppb', 'no2_std_ppb', 'mf_t_c', 'test_mv'], 'col_types': 'Tdddddddddddddd'}, 'final': {'col_names': ['Time_UTC', 'NO2_ppb'], 'col_types': 'Td'}, 'qaqc': {'col_names': ['Time_UTC', 'Phase_T_C', 'Bench_Phase_s', 'Meas_L_mm', 'ARef_L_mm', 'Samp_Pres_inHgA', 'Samp_T_C', 'Bench_T_C', 'Box_T_C', 'NO2_Slope', 'NO2_Offset_mV', 'NO2_ppb', 'NO2_std_ppb', 'MF_T_C', 'Test_mV', 'QAQC_Flag'], 'col_types': 'Tddddddddddddddd'}}, 'teom_1400ab': {'air_trend': {'col_names': ['time', 'pm25_ugm3', 'pm25_ugm3_30min', 'pm25_ugm3_1hr'], 'col_types': 'Tddd'}, 'final': {'col_names': ['Time_UTC', 'PM2.5_ugm3', 'PM2.5_ugm3_30min', 'PM2.5_ugm3_1hr'], 'col_types': 'Tddd'}, 'qaqc': {'col_names': ['Time_UTC', 'PM2.5_ugm3', 'PM2.5_ugm3_30min', 'PM2.5_ugm3_1hr', 'QAQC_Flag'], 'col_types': 'Tdddd'}}}#
static get_highest_lvl(SID, instrument)[source]#

Return the most processed level present on disk for the instrument.

Return type:

str

static data_path(SID, instrument, lvl)[source]#

Get the path to the data directory for a given site, instrument, and level.

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

  • instrument (str) – The instrument name.

  • lvl (str) – The data level.

Returns:

The path to the data directory.

Return type:

str

get_files(SID, instrument, lvl, logger='campbellsci')[source]#

List lin files for the instrument and level.

See GroupSpace.get_files(). Raw lgr_ugga files need their own handling because they sit in subdirectories alongside other files.

Return type:

list[str]

get_datafile_key(instrument, lvl, logger)[source]#

Return the data file key.

The logger for raw files, otherwise the data pipeline’s own format.

Return type:

str

get_datafiles(SID, instrument, lvl, logger, time_range, pattern=None)[source]#

Return the lin data files overlapping the time range.

See GroupSpace.get_datafiles(). Raw files need extra handling: lgr_ugga file names do not line up with their contents, so the range is widened by a day on each side, and GPS defaults to the gpgga sentence files.

Return type:

list[DataFile]

static standardize_data(instrument, data)[source]#

Rename lin columns to UATAQ names and apply per-instrument fixes.

The fixes: GPS degree-minute coordinates, status flags, unit conversions. See GroupSpace.standardize_data().

Return type:

DataFrame