paws.core.operations.PROCESSING.PEAKS package

Submodules

paws.core.operations.PROCESSING.PEAKS.FindPeaksByWindow module

class paws.core.operations.PROCESSING.PEAKS.FindPeaksByWindow.FindPeaksByWindow[source]

Bases: paws.core.operations.Operation.Operation

Walk a 1d array and find its local maxima.

A maximum is found if a point in consideration is the highest point within windowsize of itself. An optional threshold for the peak intensity relative to the window-average can be used to filter out noise.

run()[source]

Operation.run() should use the Operation.inputs and set values for all of the items in Operation.outputs.

paws.core.operations.PROCESSING.PEAKS.VoigtPeakFit module

class paws.core.operations.PROCESSING.PEAKS.VoigtPeakFit.VoigtPeakFit[source]

Bases: paws.core.operations.Operation.Operation

Fit a set of x and y values to a Voigt distribution.

Solves the best-fitting hwhm (half width at half max) of the gaussian and lorentzian distributions and shared distribution center. Takes as input a guess for the distribution center and hwhm. Range of fit is determined by weighting the objective by a Hann window centered at the distribution center, with a window width of the distribution’s estimated full width at half max.

static gaussian(x, hwhm_g)[source]

gaussian distribution at points x, center 0, half width at half max hwhm_g

static hann_voigt_fit(x, y, xc, hwhm_g, hwhm_l, scl)[source]
static lorentzian(x, hwhm_l)[source]

lorentzian distribution at points x, center 0, half width at half max hwhm_l

run()[source]

Operation.run() should use the Operation.inputs and set values for all of the items in Operation.outputs.

static solve_voigt(x, y, xc, hwhm_g, hwhm_l, scl)[source]

iteratively minimize an objective to fit x, y curve to a voigt profile

static voigt(x, hwhm_g, hwhm_l)[source]

voigt distribution resulting from convolution of a gaussian with hwhm hwhm_g and a lorentzian with hwhm hwhm_l

Module contents