astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v1.1.1 »
- Models and Fitting (`astropy.modeling`) »
- LinearLSQFitter

# LinearLSQFitter

class `astropy.modeling.fitting.``LinearLSQFitter`

  Bases: `object`

  A class performing a linear least square fitting.

  Uses `numpy.linalg.lstsq` to do the fitting. Given a model and data, fits the model to the data and changes the model’s parameters. Keeps a dictionary of auxiliary fitting information.

  Attributes Summary

  `supported_constraints` |

  Methods Summary

  `__call__`(model, x, y[, z, weights, rcond]) | Fit data to this model.

  Attributes Documentation

  `supported_constraints` = [u'fixed']

  Methods Documentation

  `__call__`(model, x, y, z=None, weights=None, rcond=None)

    Fit data to this model.

    Parameters:

    model : `FittableModel`

    > model to fit to x, y, z

    x : array

    > input coordinates

    y : array

    > input coordinates

    z : array (optional)

    > input coordinates

    weights : array (optional)

    > weights

    rcond : float, optional

    > Cut-off ratio for small singular values of `a`. Singular values are set to zero if they are smaller than `rcond` times the largest singular value of `a`.

    Returns:

    model_copy : `FittableModel`

    > a copy of the input model with parameters set by the fitter