ewoksxas.fit.lca_fit.LCAModel#

class ewoksxas.fit.lca_fit.LCAModel(sample, components, xmin=-inf, xmax=inf)[source]#

Bases: object

A class for linear combination analysis of 1D X and Y data.

Parameters:
  • sample (XYData)

  • components (dict[str, XYData])

  • xmin (float)

  • xmax (float)

fit(**kwargs)[source]#

Executes the least-squares minimization.

Return type:

FitResult

Args:

**kwargs: keyword arguments passed to cipy.optimize.least_squares.

classmethod from_dicts(sample, components, parameters=None)[source]#

Constructs an LCAModel entirely from dictionaries.

Args:

sample: x and y data for observations. components: component names mapped to x and y data dicts. parameters: region of interest boundaries (xmin, xmax).

Parameters:
  • sample (dict[str, ndarray[tuple[int, ...], dtype[float64]]])

  • components (dict[str, dict[str, ndarray[tuple[int, ...], dtype[float64]]]])

  • parameters (dict[str, float] | None)

Return type:

LCAModel