spectrochempy.asls

asls(dataset, lamb=1e5, asymmetry=0.05, tol=1e-3, max_iter=50)[source]

Asymmetric Least Squares Smoothing baseline correction.

This method is based on the work of Eilers and Boelens ([Eilers and Boelens, 2005]).

Parameters:
  • dataset (NDDataset) – The input data.

  • lamb (float, optional, default:1e5) – The smoothness parameter for the AsLS method. Larger values make the baseline stiffer. Values should be in the range (0, 1e9).

  • asymmetry (float, optional, default:0.05) – The asymmetry parameter for the AsLS method. It is typically between 0.001 and 0.1. 0.001 gives almost the same fit as the unconstrained least squares.

  • tol (float, optional, default:1e-3) – The tolerance parameter for the AsLS method. Smaller values improve the fit but may increase the number of iterations and the runtime. Values should be in the range (0, 1).

  • max_iter (int, optional, default:50) – Maximum number of AsLS iterations.

Returns:

NDDataset – The baseline corrected dataset.

Masked input regions are preserved in the returned dataset.

See also

Baseline

Manual baseline correction processor.

get_baseline

Compute a baseline using the Baseline class.

basc

Make a baseline correction using the Baseline class.

asls

Perform an Asymmetric Least Squares Smoothing baseline correction.

snip

Perform a Simple Non-Iterative Peak (SNIP) detection algorithm.

rubberband

Perform a Rubberband baseline correction.

autosub

Perform an automatic subtraction of reference.

detrend

Remove polynomial trend along a dimension from dataset.