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
Directory for Lin group measurements. |
|
Directory for Lin group data. |
|
Data configuration. |
|
Lin to UATAQ column mapping |
Classes
|
A class for parsing AirTrend data files. |
|
A class for parsing LGR UGGA data files. |
|
A class for parsing Lin data files. |
|
A class representing the Lin group space in the CHPC UATAQ filesystem. |
- lair.uataq.filesystem.groupspaces.lin.MEASUREMENTS_DIR: str = '/uufs/chpc.utah.edu/common/home/lin-group20/measurements'#
Directory for Lin group measurements.
- lair.uataq.filesystem.groupspaces.lin.DATA_DIR: str = '/uufs/chpc.utah.edu/common/home/lin-group20/measurements/data'#
Directory for Lin group data.
- lair.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'], 'col_types': 'Tdddd'}, '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'], 'col_types': 'Tdd'}, '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'], 'col_types': 'Tdd'}, '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.
- lair.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': 'True_Course'}, '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
- class lair.uataq.filesystem.groupspaces.lin.LinDatFile(path: str)[source]#
A class for parsing Lin data files.
Attributes
path
(str) The file path.
period
(pd.Period) The period of the data file.
logger
(str) The logger name.
date_slicer
(slice) A slice object for extracting the date from the file name.
file_freq
(str) The file frequency.
ext
(str) The file extension.
Methods
parse()
Parse the data file.
- class lair.uataq.filesystem.groupspaces.lin.LGR_UGGA_File(path: str)[source]#
A class for parsing LGR UGGA data files.
Attributes
path
(str) The file path.
period
(pd.Period) The period of the data file.
logger
(str) The logger name.
date_slicer
(slice) A slice object for extracting the date from the file name.
file_freq
(str) The file frequency.
ext
(str) The file extension.
Methods
get_meta(path)
Get meta data from UGGA file.
get_serial(path)
Get serial number of UGGA from file.
get_files(SID, instrument=’lgr_ugga’, lvl=’raw’)
Get list of UGGA files for a given site.
parse()
Parse files transferred directly from LGR software.
- __init__(path: str)[source]#
Initialize the DataFile object. Determines the period of the data file from the file name.
- Parameters:
- pathstr
The file path.
- static get_meta(path) dict[str, str] [source]#
Get meta data from UGGA file
- Parameters:
- pathstr
The path to the UGGA file.
- Returns:
- dict[str, str]
A dictionary containing the meta data.
- static get_serial(path) str [source]#
Get serial number of UGGA from file.
- Parameters:
- pathstr
The path to the UGGA file.
- Returns:
- str
The serial number.
- static get_files(SID: str, instrument: str = 'lgr_ugga', lvl: str = 'raw') List[str] [source]#
Get list of UGGA files for a given site.
- Parameters:
- SIDstr
The site ID.
- instrumentstr
The instrument name. Defaults to ‘lgr_ugga’.
- lvlstr
The data level. Defaults to ‘raw’.
- Returns:
- list[str]
A list of file paths.
- class lair.uataq.filesystem.groupspaces.lin.AirTrendFile(path: str)[source]#
A class for parsing AirTrend data files.
Attributes
path
(str) The file path.
period
(pd.Period) The period of the data file.
logger
(str) The logger name.
date_slicer
(slice) A slice object for extracting the date from the file name.
file_freq
(str) The file frequency.
ext
(str) The file extension.
config
(dict) The data configuration.
Methods
parse()
Parse the data file.
- class lair.uataq.filesystem.groupspaces.lin.LinGroup[source]#
A class representing the Lin group space in the CHPC UATAQ filesystem.
Attributes
name
(str) The group name.
datafiles
(dict[str, Type[DataFile]]) A dictionary mapping datafile keys to DataFile classes.
data_dir
(str) The path to the data directory.
data_config
(dict) The data configuration.
Methods
get_highest_lvl(SID, instrument)
Get the highest level of data for a given site and instrument.
data_path(SID, instrument, lvl)
Get the path to the data directory for a given site, instrument, and level.
get_files(SID, instrument, lvl, logger)
Get list of file paths for a given site, instrument, and level.
get_datafile_key(instrument, lvl, logger)
Get the datafile key based on the instrument, level, and logger.
get_datafiles(SID, instrument, lvl, logger, time_range, pattern)
Get list of data files for a given level and time range.
- static get_highest_lvl(SID: str, instrument: str) str [source]#
Get the highest data level for a given site and instrument.
- Parameters:
- SIDstr
The site ID.
- instrumentstr
The instrument name.
- Returns:
- str
The highest data level.
- static data_path(SID, instrument, lvl) str [source]#
Get the path to the data directory for a given site, instrument, and level.
- Parameters:
- SIDstr
The site ID.
- instrumentstr
The instrument name.
- lvlstr
The data level.
- Returns:
- str
The path to the data directory.
- get_files(SID: str, instrument: str, lvl: str, logger: str = 'campbellsci') List[str] [source]#
Get list of file paths for a given site, instrument, and level.
- Parameters:
- SIDstr
The site ID.
- instrumentstr
The instrument name.
- lvlstr
The data level.
- loggerstr
The logger name.
- Returns
- list[str]
A list of file paths.
- get_datafile_key(instrument: str, lvl: str, logger: str) str [source]#
Get the datafile key based on the instrument, level, and logger.
- Parameters:
- instrumentstr
The instrument name.
- lvlstr
The data level.
- loggerstr
The logger name.
- Returns:
- str
The datafile key.
- get_datafiles(SID: str, instrument: str, lvl: str, logger: str, time_range: TimeRange, pattern: str | None = None) List[DataFile] [source]#
Returns a list of data files for a given level and time range.
- Parameters:
- SIDstr
The site ID.
- instrumentstr
The instrument name.
- lvlstr
The data level.
- loggerstr
The logger name.
- time_rangeTimeRange
The time range to filter by.
- patternstr, optional
A string pattern to filter the file paths. Defaults to None.
- Returns:
- list[DataFile]
A list of DataFile objects.
- static standardize_data(instrument: str, data: DataFrame) DataFrame [source]#
Manipulate the data to a standard format between research groups, renaming columns, converting units, mapping values, etc. as needed.
- Parameters:
- instrumentstr
The instrument model.
- datapd.DataFrame
The data to standardize.
- Returns:
- pd.DataFrame
The standardized data.