# firefly fitter¶

This class is the engine of the FIREFLY code.

firefly_fitter.fitter(wavelength_in, data_in, error_in, models_in, SPM)[source]

The essential ingredient of FIREFLY!

Taking each base model as an initial guess, the fitter iteratively creates combinations of these base models when they improve the modified chi-squared value: value = chi-squared + BIC term - exploration term

Input: data, base models, wavelength (for plotting) [, options]
(data must be an array of length N) (base models must be a matrix of num_models x N)

Options: plot_eps: True/False (plot to fit.eps if True, X if False)

Output: a set of model weight combinations and their associated chi-squared values,
via an array of ‘fit’ objects. Weights are arrays with length num_models. Fit arrays may be any size up to 10000.