Lev1Data#
- class pia.level_data.Lev1Data(level0_data, ref_time, manual_ice_threshold, cirrus_mode)#
Bases:
EvalDataCreates level 1 data.
- Parameters:
level0_data (instance of class Lev0Data)
ref_time (datetime) – beginning of the operation
manual_ice_threshold (bool) – whether the ice threshold diameters should be read in or calculated
cirrus_mode (bool) – whether the measurements were made in cirrus regime or not
- bin_concentrations(ref_time, cirrus_mode)#
Calculates the concentrations of particles/ INPs in time bins
- Parameters:
ref_time (datetime) – beginning of the operation
cirrus_mode (bool) – whether the measurements were made in cirrus regime or not
- cloud_activation(expansion, index)#
Determines the time of cloud activation
- Parameters:
expansion (pd.DataFrame) – data of the expansion of one run
index (int) – run index
- Returns:
time_cloud_activation
- Return type:
datetime
- create_df_ice(*arg)#
Creates Dataframe with INP concentrations and important parameters of each run.
- Parameters:
*arg (tuple) – instances of Lev1Data for different chambers
- Returns:
df_ice
- Return type:
pd.DataFrame
- determine_flow(flow_rec)#
Determines the flow through the OPC
- Parameters:
flow_rec (float) – measured flow
- Returns:
flow – corrected flow through opc
- Return type:
float
- df_for_flush_and_expansion(ref_time, cirrus_mode)#
Creates DataFrames with concentrations of each run for flush and expansion.
- Parameters:
ref_time (datetime) – beginning of the operation
cirrus_mode (bool) – whether the measurements were made in cirrus regime or not
- Returns:
opc_cn_exp (pd.DataFrame) – contains concentrations during expansion
opc_cn_flush (pd.DataFrame) – contains concentrations during flush
- export_concentrations(cirrus_mode)#
Writes bin-wise INP concentration files.
- Parameters:
cirrus_mode (bool) – whether the measurements were made in cirrus regime or not
- export_ice(*arg)#
Exports run-wise ice data.
- Parameters:
*arg (tuple) – instances of Lev1Data for different chambers
- export_ice_threshold()#
Writes ice threshold file.
- find_ice_threshold_diameter(grid, opc_min)#
Calculates the ice threshold for each run.
- Parameters:
grid (pd:DataFrame) – logarithmic grid for binning the data
opc_min (float) – minimum diameter detectable by opc
- Returns:
ice_threshold – DataFrame containing the ice threshold for each run
- Return type:
df