edges_cal.modelling.CompositeModel

class edges_cal.modelling.CompositeModel(*, models: dict[str, edges_cal.modelling.Model], extra_basis: dict[str, numpy.ndarray] = _Nothing.NOTHING)[source]

Methods

__init__(*, models[, extra_basis])

Method generated by attrs for class CompositeModel.

at(**kwargs)

Get an evaluated linear model.

fit(xdata, ydata[, weights])

Create a linear-regression fit object.

get_basis_term(indx, x)

Define the basis terms for the model.

get_basis_term_transformed(indx, x)

Get the basis function term after coordinate tranformation.

get_basis_terms(x)

Get a 2D array of all basis terms at x.

get_extra_basis(model[, x])

Get the extra model-dependent basis function for a given model.

get_model(model[, parameters, x, with_extra])

Calculate a sub-model.

with_nterms(model[, n_terms, parameters])

Return a new Model with given nterms and parameters.

with_params(parameters)

Get a new model with specified parameters.

Attributes

model_idx

Dictionary of parameter indices correponding to each model.

n_terms

The number of terms in the full composite model.

parameters

The read-only list of parameters of all sub-models.

models

extra_basis