Lev0Data#

class pia.level0_data.Lev0Data(campaign, pine_id, operation_id, chamber=None)#

Bases: object

Extracts all the necessary data from the files.

Parameters:
  • campaign (str) – campaign name as used for documentation

  • pine_id (str) – PINE Id, eg: 01-A, 01-B, 04-01, AIDAm

  • operation_id (int) – Operation Id for analysis

  • chamber (int, optional) – Number of chamber if multiple chambers are used

calibration(calib_dict, opc_data)#

Assigns diameters to channels according to calibration file.

Parameters:
  • calib_dict (dict) – dictionary of calibration table

  • opc_data – dataframe with channel number needed column: “channel”, “date”

Returns:

opc_data – Calibrated opc data

Return type:

DataFrame

create_size_distribution(run_id, file, grid, time_grid)#

Bins opc data for time and size grid.

Parameters:
  • run_id (int)

  • file (DataFrame) – opc data

  • grid (DataFrame) – logarithmic size grid

  • time_grid (DataFrame) – time grid

Returns:

size_distribution – Binned opc data

Return type:

DataFrame

get_hist_data(opc_run, grid)#

Applies the histogram grid to data.

Parameters:
  • opc_run (series) – particle diameter

  • grid (dataframe) – logarithmic grid for binning the data

Return type:

histogram data

get_logbook_info()#

Reads operation type

Returns:

  • type_id (int) – const. temp: 1, temp. ramp: 2, background: 3, cirrus: 4, test: 5

  • aerosol (str) – aerosol used for experiment

get_opc_data(calib_file_template, grid)#

Reads opc files for given operation.

Parameters:
  • calib_file_template (str) – name of the calibration file

  • grid (Dataframe) – logarithmic grid for size binning

Returns:

  • opc_list (list) – list containing dfs with binned opc data

  • calib_dict (dict) – dictionary to convert opc bin numbers to diameters