JointFitter

class astropy.modeling.fitting.JointFitter(models, jointparameters, initvals)[source]

Bases: object

Fit models which share a parameter.

For example, fit two gaussians to two data sets but keep the FWHM the same.

Parameters
modelslist

a list of model instances

jointparameterslist

a list of joint parameters

initvalslist

a list of initial values

Methods Summary

__call__(self, \*args)

Fit data to these models keeping some of the parameters common to the two models.

objective_function(self, fps, \*args)

Function to minimize.

Methods Documentation

__call__(self, *args)[source]

Fit data to these models keeping some of the parameters common to the two models.

objective_function(self, fps, *args)[source]

Function to minimize.

Parameters
fpslist

the fitted parameters - result of an one iteration of the fitting algorithm

argsdict

tuple of measured and input coordinates args is always passed as a tuple from optimize.leastsq