SFIT2
Simon Jeffery, Armagh Observatory: September 2002LATEST NEWS
Description
SFIT is a general-purpose code designed to optimize theoretical stellar spectra to an observed spectrum. It is based on models calculated with the ARMGH LTE codes STERNE and SPECTRUM, but is flexible and can be adapted to other models. It has been proven to work well with both high and intermediate-dispersion normalized spectra. An important feature of the code is that several different parameter optimisation methods are available, including Levenburg-Marquardt, Amoeba, and Genetic Algorithms.
This version combines two previous programmes, SFIT and SFIT_SYNTH, and provides the following capabilities:
- Solves for T, log g, abundance, v sin i, R2/R1 for one or two stars by fitting model spectra to normalized spectra.
- Solves for elemental abundances and microturbulent velocity for a single spectrum, given an assumed model atmosphere.
Platforms
This code is designed to run on both Linux and Alpha platforms. It has run successfully on both, but because the code is still developing rapidly, the most recent version may not!.
It may be necessary, particularly when running this code on the Armagh alphas, to increase the data limit on your current process. This can be achieved with:
> limit datasize 1048576 kbytes
> ulimits -aD (alpha) to see maximum values.
Use
While the programme expects input from "stdio", it is more natural to save commands in a file (eg "sfit_input") and run the code simply by
> sfit2 < sfit_inputIf the spectra to be fitted have a filename "star_spectrum", then the best fit spectrum will be written out, together with the renormalized input spectrum, to a file called "star_spectrum.fit".
Syntax
For historical reasons, the command syntax is not yet fully stable. In general, commands may be entered at a range of levels. This is so that, for example, definitions of parameters are associated with the correct context. For example, instrumental broadening should be associated with the spectrum to be fitted (data), whilst the convergence tolerance is associated with the solution method.
command
or
command [ parameter [...] ]
or
command{ subcommand [ subcommand [ parameter [...]]] }
or
command subcommand [ subcommand [ parameter [...]]]
- In general lines may be broken anywhere, but there are exceptions.
- Strings beginning ! are treated as comments and ignored.
- The syntax for each command is described in detail below.
Command Summary
models, model2 sets up model spectrum grid (and for 2nd star) solve save_grid, save_grd2 saves rebinned model spectrum grid as binary file solve read_grid, read_grd2 reads model spectrum grid from binary file solve sterne defines single model atmosphere (from STERNE) synth abundances initialize abundances synth parameters initialize spectrum fit parameters solve method select solution method gen_par set flags for the genetic algorithm spc_par set flags for spectrum continuum select continuum renormalization method cmask define regions to _include_ in continuum fit mask define regions to _exclude_ from fit using given weights data input observational data normalize single step renormalization with no change of fit parameters vcorr use current model to determine radial velocity (used in subsequent fits) solve pursue solution by interpolation in grid synth pursue solution by computing new spectra set set specific parameters show show current values of specific or all parameters end finish gracefully
Examples
Example 1. Setup model grid in binary form for subsequent use.
Example 2. Fit Teff, log g and n_H to WHT/UES spectrum using a grid of helium-rich model spectra.
Example 3. Fit Teff_1, Teff_2 and radius ratio in binary, using saved model grids * WARNING - not recently tested *
This page is maintained by:
Simon Jeffery (csj@star.arm.ac.uk)
Last modified: July 23, 2003