Fitter

class sedfitter.Fitter(filter_names, apertures, model_dir, extinction_law=None, av_range=None, distance_range=None, remove_resolved=False, use_memmap=True)

Bases: object

A fitter class that can be used to fit sources.

This class is initialized using a particular set of models, and with specific fit parameters. It can then be used to fit data given by Source instances, and returns a FitInfo instance. Once initialized, the fit parameters cannot be changed, because changing most of them would require re-reading the models from disk.

Parameters:
filter_namestuple or list

List of filter names (given as individual strings) for which the data is defined. The filter names should be the name of the files in the convolved directory for the models, without the extensions. This is typically 2J, I1, M1, etc. You can also specify the wavelength as a Quantity instance instead of a filter name, and this will indicate that the SED fluxes closest to the requested wavelength should be used in the fitting.

aperturesQuantity array instance

The aperture radii that the data is specified in (as an angle). The fluxes may not be measured from aperture photometry, but this is meant to give an indication of the sizescale of the emission, and can be used to reject models that would have been clearly resolved at the distance specified.

models_dirstr

Name of the directory containing the models to use.

extinction_lawExtinction instance

The extinction law to use.

av_rangetuple

Minimum and maximum Av to allow in the fitting.

distance_rangeQuantity array instance

Minimum and maximum distance to allow in the fitting in units of length.

remove_resolvedbool, optional

If set, then models larger than the aperture are removed. See Robitaille et al. (2007) for a discussion of this criterion.

Methods Summary

fit(source)

Fit the specified source.

Methods Documentation

fit(source)

Fit the specified source.

Parameters:
source~sedfitter.source.Source

The source to fit.

Returns:
fit_infosedfitter.fit_info.FitInfo

The results of the fit.