lte-codes sterne spectrum ffit sfit grids idlines
commands ffit

FFIT - Command Syntax

models, model2

These commands read in a grid of model spectra. A variety of file formats are supported. The grid must be rectangular or cuboidal, but the stepsizes do not need to be regular. The normal axes are effective temperature, surface gravity and H/He abundance. An intermediate wavelength grid must bedefined in order to allow for inhomogeneity in the input spectra. Values for the parameters are taken from the input models themselves, to avoid mixups. The syntax of the command arguments is precise.

NFMT ! file format specifier
TITLE ! a user-defined title for the model grid
NT NG NA ! numbers of temperatures, gravities and abundaces in the grid
WS WE DW ! wavelength start, end and increments in the rebinned grid (use 0 0 0)

At present, the filenames must contain no trailing characters.


Used to set up the wavelengths used in the fit. For example, the default IUE assumes IUE wavelengths. These can be modied by "user", and supplmented by broadband photometry (phot).

wavelength {

user w1 w2
phot n label

selects wavelengths: 1125 - 3350
selects wavelengths given by user
defines photometric wavebands (eg phot 6 uvbyRI )

Allowed photometric wavebands are: u v b y U B V R I J H K L M N T ,

where T = [1.0], and these are case sensitive.


Define the initial parameters to be used by solve.

This command currently requires a specific format, providing fit parameter for one star. The code will eventually merge with "binfit" and be able to treat either one or two stars.

parameters {



! number of parameters in fit
! Effective temperature for primary (K)
! Interstellar extinction (colour excess) (mag)
! Angular diameter (radians)


If there is only one spectrum to fit, one should set default parameters for the secondary which lie within the model grid, with <L_2/L> being a very small value.


Select the method to be used in the solution, and modify tolerances, etc.

method {

levenburg Levenburg-Marquardt method
amoeba Downhill simplex method
chi-squared Compute chi-squared surface only
range w1 w2 Wavelength region to include in fit (not working)
tolerance Convergence criterion


Defines the observational data to be fitted. This command may take a number of subcommands to define various quantities associated with the observations:

folder <name>

name of folder containing data : MAY NOT WORK AT PRESENT

spectrum <name>

name of file containing spectrum in "spectrum format 2"

w_1, f_1
w_2, f_2
w_nw, f_nw

phot <m1> <m2> <m3> <m4> ...

enter photometry in predefined system (see wavelength { phot } )

errors <s1> <s2> <s3> <s4> ...

errors on photometry in same units/system


Compute the best fit parameters by interpolation in the grid of model spectra.

This command takes no parameters; everything should have been set up prior to running solve. The output is saved in a file <>, where <file> was the name of the spectrum being fitted.


A tidy way to finish up.

This page is maintained by:
Simon Jeffery (
Last modified: July 18, 2003