astropy:docs

Model

class astropy.modeling.core.Model(param_dim=1)[source] [edit on github]

Bases: object

Base class for all models.

This is an abstract class and should not be instantiated directly.

Notes

Models which are not meant to be fit to data should subclass this class.

This class sets the properties for all individual parameters and performs parameter validation.

Attributes Summary

fittable bool(x) -> bool
linear bool(x) -> bool
n_inputs int(x=0) -> int or long
n_outputs int(x=0) -> int or long
param_dim Number of parameter sets in a model.
param_names list() -> new empty list
param_sets Return parameters as a pset.

Methods Summary

add_model(newtr, mode) Create a CompositeModel by chaining the current model with the new one using the specified mode.
copy()
inverse() Returns a callable object which performs the inverse transform.
invert() Invert coordinates iteratively if possible.

Attributes Documentation

fittable = False
linear = True
n_inputs = 1
n_outputs = 1
param_dim[source]

Number of parameter sets in a model.

param_names = []
param_sets[source]

Return parameters as a pset.

This is an array where each column represents one parameter set.

Methods Documentation

add_model(newtr, mode)[source] [edit on github]

Create a CompositeModel by chaining the current model with the new one using the specified mode.

Parameters:

newtr : an instance of a subclass of Model

mode : string

‘parallel’, ‘serial’, ‘p’ or ‘s’ a flag indicating whether to combine the models in series or in parallel

Returns:

model : CompositeModel

an instance of CompositeModel

copy()[source] [edit on github]
inverse()[source] [edit on github]

Returns a callable object which performs the inverse transform.

invert()[source] [edit on github]

Invert coordinates iteratively if possible.

Page Contents