Baseline.LpmBaseline#

Baseline.LpmBaseline.py

estimate_lpm_percent(moment)#

Estimate the percentage of low-q plateau in the distribution using the moment.

Parameters:

moment (Moment) – The moment object containing the distribution information.

Returns:

ratio – The estimated percentage of low-q plateau in the distribution.

Return type:

float

compute_lpm_baseline(x, y, return_also_params=False, **kwargs)#

Compute the linear plus minimum baseline for a given curve. The baseline is computed by fitting a linear function to the data and then taking the minimum of the linear function and the data.

Parameters:
  • x (array-like) – The x-coordinates of the curve.

  • y (array-like) – The y-coordinates of the curve.

  • return_also_params (bool, optional) – If True, the function returns a tuple containing the baseline and a dictionary of the slope and intercept of the linear function. If False, it returns only the baseline.

  • **kwargs (dict, optional) – Additional keyword arguments to pass to the ScatteringBaseline solver.

Returns:

baseline – The computed baseline.

Return type:

array-like

class LpmBaseline(icurve)#

Bases: Curve

A class to represent the linear plus minimum baseline of a curve.

x#

The x-coordinates of the baseline.

Type:

array-like

y#

The y-coordinates of the baseline.

Type:

array-like