Helper Functions

The following functions help in various task.

Index

Functions

Σ

DifferentialMobilityAnalyzers.ΣMethod
Σ(f, i)

Defined as shorthand:

Σ(f, i) = mapreduce(f, +, 1:i)

The function evaluates f(X) for X = [1,...,i] and sums the result. If f(X) evaluates to a vector or SizeDistribution, the sum is the sum of the vectors or SizeDistributions.

Example Usage

Tc = getTc(Λ)
Σ(k -> Tc(k,100.0),2)  # evaluate the sum of Tc(1, 100.0), Tc(2, 100.0)
source

clean

DifferentialMobilityAnalyzers.cleanMethod
clean(x)

Defined as shorthand:

clean(x) = map(x -> x < 0.0 ? 0.0 : x, x)

The function removes negative numbers and set them zero. It is used to cleanup inverted size distribution data, which may contain small negative values from inversion noise.

source

interpolateSizeDistributionOntoδ

DifferentialMobilityAnalyzers.interpolateSizeDistributionOntoδFunction
interpolateSizeDistributionOntoδ(kw)

This function takes a size distribution and interpolates it onto a DMA grid. kw is a tuple containing a SizeDistribution and a DMA grid.

Example Usage

    𝕣 = (𝕟, δ) |> interpolateSizeDistributionOntoδ

This extracts the columns Dp and R from df and interpolates it ont grid δ and returns the results as a SizeDistribution. The df has to be sorted in ascending order.

source

interpolateDataFrameOntoδ

DifferentialMobilityAnalyzers.interpolateDataFrameOntoδFunction
interpolateDataFrameOntoδ(kw)

This function takes some measured size distribution in a DataFrame and interpolates it onto a DMA grid. kw is a tuple containing a DataFrame, symbols to columns to extract which contain diameter and response function, and a DMA grid.

Example Usage

    𝕣 = (df, :Dp, :R, δ) |> interpolate_df_onto_thisδ

This extracts the columns Dp and R from df and interpolates it ont grid δ and returns the results as a SizeDistribution. The df has to be sorted in ascending order.

source