Having prepared your input observation and model data, you run the
fit
task to compare the two.
This compares each input observation with each input model and presents
the results in one or more ways.
The most straightforward use of the results is to assess which of the
input models matches the observation best, and then output this
information. However, some output modes allow you to see the goodness
of fit for several of the models in addition to the best fit one.
As with the other tasks, the fit
task has a number of
parameters to configure its operation.
These fall into the following categories:
model
and modelfmt
parameters
give the location of the input model data file
and the obs
parameter gives the location of the
input observation data. These should be prepared as described in
Section 3.1 and Section 3.2.
smoother
, scale
and fitcalc
parameters control the details of how the goodness of fit between
a given observation and a given model is to be calculated.
gui
, summary
, bestfits
and allfits
parameters control what the program does with
the results having calculated them. Some of the possibilities are
display them in a graphical window and output a table which contains
rows associating the best fit with each input observation.
fit
task is given in Appendix A.2.
NOTE: The most important thing to remember when performing a fit is that the axes of the presented observation and model files must be compatible. If the wavelength axis for the observations is in Angstrom and for the models is in microns your results won't make much sense. Having the same units for the two flux axes may not be necessary - since the models will normally be scaled by a constant to provide the best fit, an arbitrary multiplicative constant between the two units may be unimportant unless you need to make use of the fitted scaling constant. However even in this case you must ensure that the axes are compatible (e.g. both are fluxes, rather than one being in magnitudes).
An example invocation is as follows:
yafit fit obs=demo.yobs model=demo.ymod gui=true bestfits=out.votThis fits the observations in file
demo.yobs
against the
model data in demo.ymod
. Default settings are used for
the fitting. By way of output, the results will be presented graphically
(gui=true
) and the output written as a VOTable
out.vot
in which each row gives the details of an observation
and the model which fitted it best, as well as the goodness of fit
statistic and scaling constant used.