Before fitting, you must prepare your set of model spectra in a way
that the program can understand.
Yafit understands a number of model formats, including outputs
from certain spectral simulation codes.
You can either provide your models in one of these formats directly
or convert them to the special .ymod
format prior to use.
The copymodel
task can convert
from the various foreign model formats to .ymod
,
optionally applying custom transformations to the data.
Even if your model data is in one of the formats that Yafit understands,
you may wish to use copymodel
so as to apply these
additional conversions, for instance annotating or modifying the units
on the X (wavelength) or Y (flux) axes to match those presented in the
observation data.
Here is an example invocation of copymodel
:
yafit copymodel ifmt=galaxev in=bc2003_salp.a1 in=bc2003_salp.a2 xname=Wavelength xunit=Angstrom yname=Luminosity yunit=erg/s y=3.826e33*y out=gal.ymodIn detail, this works as follows:
ifmt=galaxev
galaxev
is one of the formats that Yafit understands
(see Section 4).
in=bc2003_salp.a1 in=bc2003_salp.a2
xname=Wavelength xunit=Angstrom
yname=Luminosity unit=erg/s
y=3.826e33*y
out=gal.ymod
copymodel
task is given in
Appendix A.1.
Having prepared your .ymod file, you can view it using the
plotmodel
command if you wish
before using it for actual fitting.