helikite.instruments.pops

  1. POPS -> HK_20220929x001.csv (has pressure)

The POPS is an optical particle counter. It provides information on the particle number concentration (how many particles per cubic centimeter) and the size distribution for particles larger than 180 nm roughly. Resolution: 1 sec

Important variables to keep: DateTime, P, POPS_Flow, b0 -> b15

PartCon needs to be re-calculated by adding b3 to b15 and deviding by averaged POPS_Flow (b0 -> b15 can be converted to dN/dlogDp values with conversion factors I have)

Housekeeping variables to look at: POPS_flow -> flow should be just below 3, and check for variability increase

Attributes

pops

Classes

POPS

Functions

dNdlogDp_calculation(df_pops, dp_notes)

plot_pops_distribution(df[, time_start, time_end])

This function generates a contour plot for POPS size distribution and total concentration.

POPS_total_conc_dNdlogDp(df)

This function calculates the total concentration of POPS particles and adds it to the dataframe.

POPS_STP_normalization(df)

Normalize POPS concentrations to STP conditions and plot the results.

apply_pops_zero_mask(→ pandas.DataFrame)

Masks all periods where POPS_total_conc == 0, including short interruptions (< interruption_sec).

Module Contents

class helikite.instruments.pops.POPS(*args, **kwargs)

Bases: helikite.instruments.base.Instrument

set_time_as_index(df: pandas.DataFrame) pandas.DataFrame

Set the DateTime as index of the dataframe and correct if needed

Using values in the time_offset variable, correct DateTime index

data_corrections(df: pandas.DataFrame, *args, **kwargs) pandas.DataFrame
read_data() pandas.DataFrame
helikite.instruments.pops.pops
helikite.instruments.pops.dNdlogDp_calculation(df_pops, dp_notes)
helikite.instruments.pops.plot_pops_distribution(df, time_start=None, time_end=None)

This function generates a contour plot for POPS size distribution and total concentration.

Parameters: - df: DataFrame with the POPS data. - time_start: Optional, start time for the x-axis (datetime formatted). - time_end: Optional, end time for the x-axis (datetime formatted).

helikite.instruments.pops.POPS_total_conc_dNdlogDp(df)

This function calculates the total concentration of POPS particles and adds it to the dataframe. It also plots the POPS total concentration against altitude.

Parameters: - df: DataFrame with POPS data and altitude.

Returns: - df: Updated DataFrame with POPS total concentration and dNdlogDp for each bin.

helikite.instruments.pops.POPS_STP_normalization(df)

Normalize POPS concentrations to STP conditions and plot the results.

Parameters: df (pd.DataFrame): DataFrame containing POPS measurements and necessary metadata

like ‘flight_computer_pressure’ and ‘Average_Temperature’.

Returns: df (pd.DataFrame): Updated DataFrame with new STP-normalized columns added.

helikite.instruments.pops.apply_pops_zero_mask(df: pandas.DataFrame, metadata, column_prefix='pops_b', total_col='pops_total_conc', interruption_sec=30) pandas.DataFrame

Masks all periods where POPS_total_conc == 0, including short interruptions (< interruption_sec). Sets affected columns to NaN and returns the modified DataFrame. Also saves the mask as a CSV.

Parameters:
  • df (pd.DataFrame) – The input DataFrame with datetime index.

  • metadata – An object with flight_date and flight attributes.

  • column_prefix (str) – Prefix of bin columns (default ‘pops_b’).

  • total_col (str) – Total concentration column name.

  • interruption_sec (int) – Maximum allowed gap in seconds.

Returns:

Modified DataFrame with masked values.

Return type:

pd.DataFrame