helikite.instruments.mcda_instrument ==================================== .. py:module:: helikite.instruments.mcda_instrument .. autoapi-nested-parse:: Mini Cloud Droplet Anlayzer (mCDA) mCDA -> mCDA_output_2025-02-12_A (has pressure) Important variables to keep: !!! Raspery Pie of the mCDA has an autonomous timestamp, make sur it has been corrected when creating the output file. Attributes ---------- .. autoapisummary:: helikite.instruments.mcda_instrument.logger helikite.instruments.mcda_instrument.mcda helikite.instruments.mcda_instrument.Midpoint_diameter_list Classes ------- .. autoapisummary:: helikite.instruments.mcda_instrument.mCDA Functions --------- .. autoapisummary:: helikite.instruments.mcda_instrument.mcda_concentration_calculations helikite.instruments.mcda_instrument.mCDA_STP_normalization helikite.instruments.mcda_instrument.plot_mcda_distribution helikite.instruments.mcda_instrument.plot_mcda_vertical_distribution Module Contents --------------- .. py:data:: logger .. py:class:: mCDA(*args, **kwargs) Bases: :py:obj:`helikite.instruments.base.Instrument` Instrument definition for the mcda sensor system. Handles timestamp creation and optional corrections. .. py:method:: file_identifier(first_lines_of_csv) -> bool Identify if the file matches the expected mCDA CSV header. Only checks the first few columns for matching names, ignoring the rest. .. py:method:: 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 .. py:method:: read_data() -> pandas.DataFrame .. py:method:: data_corrections(df: pandas.DataFrame, **kwargs) -> pandas.DataFrame Apply any custom corrections here. For now, this is a pass-through. .. py:data:: mcda .. py:data:: Midpoint_diameter_list .. py:function:: mcda_concentration_calculations(df: pandas.DataFrame) -> pandas.DataFrame .. py:function:: mCDA_STP_normalization(df) Normalize mCDA concentrations to STP conditions and insert the results right after the existing mCDA columns. Parameters: df (pd.DataFrame): DataFrame containing mCDA measurements and metadata. Returns: df (pd.DataFrame): Updated DataFrame with STP-normalized columns inserted. .. py:function:: plot_mcda_distribution(df, Midpoint_diameter_list, time_start=None, time_end=None) Plot mCDA size distribution and total concentration. Parameters: - df (pd.DataFrame): DataFrame containing mCDA size distribution and total concentration. - Midpoint_diameter_list (list or np.array): List of particle diameters corresponding to the diameter bin midpoints. .. py:function:: plot_mcda_vertical_distribution(df, Midpoint_diameter_list) Plots the vertical distribution of mCDA particle size distribution versus altitude. Parameters: - df: pandas DataFrame containing particle size distribution and altitude data. - midpoint_diameter_list: 1D NumPy array of midpoint diameters corresponding to bins.