erlab.accessors.fit¶
Defines accessors for curve fitting.
Classes
|
|
- class erlab.accessors.fit.ParallelFitDataArrayAccessor(xarray_obj)[source]¶
Bases:
ERLabDataArrayAccessorxarray.DataArray.parallel_fitaccessor for fitting lmfit models in parallel.- __call__(dim, model, **kwargs)[source]¶
Fit the specified model to the data along the given dimension.
- Parameters:
dim (
str) – The name of the dimension along which to fit the model. Note that this is the dimension along which the model will be parallelized over, not the independent dimension(s) of the model.model (
lmfit.Model) – The model to fit.**kwargs (
dict) – Additional keyword arguments to be passed toxarray.Dataset.xlm.modelfit().
- Returns:
curvefit_results (
xarray.Dataset) – The dataset containing the results of the fit. Seexarray.DataArray.xlm.modelfit()for details.- Return type: