scarlet.spectrum

class scarlet.spectrum.Spectrum(frame, *parameters, bbox=None)[source]

Bases: Model

Spectrum base class

The class describes the 1D spectral dependence of`~scarlet.FactorizedComponent`.

Parameters:
frame: `~scarlet.Frame`

Characterization of the model

parameters: list of `~scarlet.Parameter`
bbox: `~scarlet.Box`

2D bounding box of this model

Attributes:
children

List of child models

parameters

List of parameters, including from the children

Methods

check_parameters()

Check that all parameters have finite elements

get_model(*parameters, **kwargs)

Get the model realization

get_models_of_children(*parameters, **kwargs)

Get realization of all child models

get_parameter(i, *parameters)

Access parameters by list index or by name

update()

Update internal state or configuration of the model

class scarlet.spectrum.TabulatedSpectrum(frame, spectrum, bbox=None, min_step=0)[source]

Bases: Spectrum

Spectrum from a array/table

The class uses an arbitrary array as non-parametric model.

Parameters:
frame: `~scarlet.Frame`

Characterization of the model

spectrum: 1D array or `~scarlet.Parameter`

Spectrum parameter

bbox: `~scarlet.Box`

1D bounding box for focation of the spectrum in frame

min_step: float

Minimum absolute step size for spectrum element updates.

Attributes:
children

List of child models

parameters

List of parameters, including from the children

Methods

check_parameters()

Check that all parameters have finite elements

get_model(*parameters)

Get the model realization

get_models_of_children(*parameters, **kwargs)

Get realization of all child models

get_parameter(i, *parameters)

Access parameters by list index or by name

update()

Update internal state or configuration of the model

get_model(*parameters)[source]

Get the model realization

Parameters:
parameters: tuple of optimimzation parameters
Returns:
model: array

Realization of the model