Lev1Data#

class pia.level_data.Lev1Data(level0_data, ref_time, manual_ice_threshold, cirrus_mode)#

Bases: EvalData

Creates 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_concentrations(run, data, t_start, actris=False)#

Creates DataFrame with binned INP concentrations.

Parameters:
  • run (int)

  • data (pd.DataFrame)

  • actris (boolean, optional) – default is False

Returns:

concentrations_export

Return type:

pd.DataFrame

create_df_ice(actris=False, *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)#

Calculates the ice threshold for each run.

Parameters:

grid (pd:DataFrame) – logarithmic grid for binning the data

Returns:

ice_threshold – DataFrame containing the ice threshold for each run

Return type:

df