fit¶
- sedfitter.fit(data, 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.
- Parameters:
- datastr
Filename of the file containing the data, one source per line (see documentation for a description of the required format).
- 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 typically2J
,I1
,M1
, etc. You can also specify the wavelength as aQuantity
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_dirstr
Name of the directory containing the models to use.
- outputstr
Name of the file to output the fit information to (in binary format).
- extinction_law
Extinction
instance The extinction law to use.
- av_rangetuple
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_minint, optional
The minimum number of points a source needs to be fit.
- output_formattuple, optional
Tuple specifying which fits should be output. See the documentation for a description of the tuple syntax.
- output_convolvedbool, optional
Whether to output the convolved fluxes (necessary if the convolved model fluxes are needed for the SED plot).
- remove_resolvedbool, optional
If set, then models larger than the aperture are removed. See Robitaille et al. (2007) for a discussion of this criterion.