astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v0.3 »
- Models And Fitting (`astropy.modeling`) »
- Model

# Model

class `astropy.modeling.core.``Model`(param_dim=1)

  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`

    Number of parameter sets in a model.

  `param_names` = []
  `param_sets`

    Return parameters as a pset.

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

  Methods Documentation

  `add_model`(newtr, mode)

    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`()
  `inverse`()

    Returns a callable object which performs the inverse transform.

  `invert`()

    Invert coordinates iteratively if possible.