fit, filter_names, apertures, model_dir, output, n_data_min=3, extinction_law=None, av_range=None, distance_range=None, output_format=('F', 6.0), output_convolved=False, remove_resolved=False)

Fit a set of sources with models.

data : str

Filename of the file containing the data, one source per line (see documentation for a description of the required format).

filter_names : tuple 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.

apertures : Quantity 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_dir : str

Name of the directory containing the models to use.

output : str

Name of the file to output the fit information to (in binary format).

extinction_law : Extinction instance

The extinction law to use.

av_range : tuple

Minimum and maximum Av to allow in the fitting.

distance_range : Quantity array instance

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

n_data_min : int, optional

The minimum number of points a source needs to be fit.

output_format : tuple, optional

Tuple specifying which fits should be output. See the documentation for a description of the tuple syntax.

output_convolved : bool, optional

Whether to output the convolved fluxes (necessary if the convolved model fluxes are needed for the SED plot).

remove_resolved : bool, optional

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