Aerosol2D
- class aerosoltools.aerosol2d.Aerosol2D(dataframe)
A class for managing time-resolved, size-distributed aerosol data.
This class extends Aerosol1D to handle datasets that contain particle size distributions (e.g., number, mass, or surface area concentration across particle size bins). It supports transformation between physical representations (dN, dS, dV, dW), visualization, activity segmentation, and summary statistics including PM values and particle size metrics.
Parameters
- dataframepandas.DataFrame
A DataFrame containing the data to load. The first column should contain time stamps or be the DataFrame index. The second column should be the total concentration. All remaining columns must represent concentration values in size bins with bin midpoints as column headers.
Notes
All data handling is done with pandas. Input DataFrames are expected to have particle size bin midpoints as column headers, and the class assumes these are numeric and represent diameters in nanometers.
Properties
List of defined activity labels. |
|
Dictionary of activity names and their associated time periods. |
|
List of bin edges in nm |
|
List of bin mids in nm |
|
Dataframe with all data, times, and activity columns if marked. |
|
Unit of the measurements. |
|
Data type description of the measurements. |
|
List of defined activity labels. |
|
Instrument used for the measurements. |
|
Meta data as extracted upon loading the data |
|
Unmodified original dataset. |
|
Serial number of instrument |
|
Sizebin data |
|
Timestamps of the dataset. |
|
Total concentration measurements. |
|
Unit of the measurements. |
Methods
Convert particle size distribution data to mass concentration (ug/m³) based on current data type. |
|
Convert particle size distribution data to number concentration (cm⁻³) from the current data type. |
|
Convert particle size distribution data to surface area concentration (nm²/cm³) based on the current data type. |
|
Convert particle size distribution data to volume concentration (nm³/cm³) based on the current data type. |
|
Create a deep copy of the current Aerosol1D object. |
|
Correct for diffusion losses in a sampling tube based on tubing geometry, flow conditions, and particle sizes. |
|
Extract data corresponding to a specified activity. |
|
Mark activities in the data by adding one boolean column per activity. |
|
Normalize the size distribution data by dlogDp to obtain, e.g., dN/dlogDp. |
|
Plot the average particle size distribution (PSD) for the entire dataset and optionally selected activities. |
|
Plot total concentration (top) and a size-resolved time series (bottom). |
|
Plot the total concentration over time. |
|
Set density of the aerosol particles in g/cm3 |
|
Summarize aerosol characteristics for each activity period. |
|
Crop the data to a specified time window. |
|
Resample the data to a new time frequency using an aggregation function. |
|
Shift the time index by a given number of seconds and/or minutes. |
|
Apply rolling window smoothing to the data. |
|
Reverse dlogDp normalization (e.g., convert dN/dlogDp to dN). |