Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://star.arm.ac.uk/~csj/software_store/guide/sfit2_commands.html
Дата изменения: Mon Oct 18 15:26:27 2004 Дата индексирования: Tue Oct 2 13:50:38 2012 Кодировка: Поисковые слова: dark nebula |
SFIT 2.3 - 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.
model{
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
file1,1,1
file2,1,1
file...
fileNT,NG,NA
}At present, the filenames must contain no trailing characters.
read_grid, save_grid
The entire grid of model spectra may be saved in binary format to allow much more rapid access if a given grid is to be used repetitively. The commands take the form
save_grid <file>
read_grid <file>
sterne
Define the model atmosphere to be used in synth.
sterne <file>
parameters
Define the initial parameters to be used by solve.
slv_teff1 <Teff/1000> <dT>: Effective temperature (K/1000) -- Star 1
slv_logg1 <log g> <dg>: Surface gravity (log cgs) -- Star 1
slv_ahe1 <nhe> <dnHe>: Helium abundance -- Star 1
slv_vsini1 <vsini> <dvsini>: Projected rotation velocity -- Star 1
slv_R1 <R> <dR>: Relative radius -- Star 1
slv_vrad1 <vrad> <dvr>: Projected radial velocity -- Star 1
slv_teff2 <Teff/1000> <dT>: Effective temperature (K/1000) -- Star 2
...: repeat above for Star 2Old format:
parameters {
<Teff_1>
<g_1>
<nA_1>
<vsini_1>
<vrad_1>
<L_1/L>
<Teff_2>
<g_2>
<nA_2>
<vsini_2>
<vrad_2>
<L_2/L><dT_1>
<dg_1>
<dn_1>
<dvsini_1>
<dvrad_1>
<dL_1>
<dT_2>
<dg_2>
<dn_2>
<dvsini_2>
<dvrad_2>
<dL_2>! Effective temperature for primary (K)
! Surface gravity (log cgs)
! Surface composition parameter: depends on model grid
! Projected rotation velocity (km/s)
! Radial velocity (km/s)
! Brightness contribution
! Effective temperature for secondary (K)
! Surface gravity (log cgs)
! Surface composition parameter: depends on model grid
! Projected rotation velocity (km/s)
! Radial velocity (km/s)
! Brightness contributionIf 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.
If method = genetic, then the parameters must be defined as ranges, rather than initial values. The lower and higher limits for each of the stellar parameters should be entered. If the parameter is not to be varied its fixed value should be entered into the first column of the three and zero entered into the second column. Otherwise the lower limit should go into the first column and the upper limit in the second column.
abundances
Define the initial parameters to be used by synth. This command currently requires a specific format. The first integer on each line is the element identifier (<elid> = atomic number). The second number is the logarithmic abundance (<abun> relative to log Sigma mu_i n_i = 12.15). The third is the amount that abundance may vary (<dabu>). Set this value to 0.0 to keep it fixed.
abundances{
<elid1> <abun1> <dabu1> ! first element
<elid2> <abun2> <dabu2> ! second element
...
0 <vturb> <dvt>! microturbulent velocity
-1 0 0 ! to finish
}A solar abundance will be assumed for any elements not specified.
abundances{
If the element identifier is zero, the subsequent parameters refer to microturbulent velocity.
To finish, enter a negative element identifier.
1 7.0 0.0 ! Fix hydrogen at a small value
6 8.6 0.3 ! Allow carbon to vary
8 8.8 0.3 ! Allow oxygen to vary
0 5.0 2.5 ! Allow microturbulence to vary
-1 0 0 ! to finish
}Any abundances obtained by SYNTH will be remembered and, by default, not allowed to change, so that two successive calls to SYNTH may be made to solve for different groups of abundances. To use the new abundance as a start value, but to solve again for that element, for example after solving for C and O varying, you want to fix O, but solve for C with N, then set the new abundance to 0.0, but set the maximum change to a positive value. For example:
abundances{
6 0.0 0.3
7 7.5 0.3
-1 0 0
}To remember these results and solve for the hydrogen abundance:
abundances{
1 8.0 0.3
-1 0 0
}method
meth_levenburg: Select Levenburg-Marquardt method
meth_amoeba: Select downhill simplex method
meth_genetic: Select genetic algorithm method
meth_chisq: Locate minimum chi^2 in grid
meth_tolerance <tol>: Set tolerance (or convergence criterion)
meth_range <w1> <w2>: Set wavelength range for fitOld format:
levenburg Levenburg-Marquardt method solve/synth amoeba Downhill simplex method solve/synth genetic Genetic algorithm solve chi-squared Compute chi-squared surface only solve range w1 w2 Wavelength region to include in fit tolerance Convergence criterion For example, to use amoeba to find the best fit spectrum in the wavelength region 4350 -- 4520, such that the chi-squared minimum is located to within 0.002:
method{ amoeba tolerance 0.002 range 4350 4520 }spc_par
When using synth, SFIT uses a callable version of SPECTRUM to compute a synthetic spectrum on the fly. This program requires a large number of inputs and has many modes of operation. These are controlled by a number of switches. They may be set within the spectrum context by giving any or all of the switch names and their values. The following are defaults assumed if nones of these are set.
spectrum{
nmode 11
nsource 3
ntheta 1
noptyp 1
nhedat 1
nhestark 2
}
Briefly, these refer in turn to the type of spectrum to be computed, the method of calculation of the source function, the number of anges if specific intensities are to be computed, the choice of continuous opacity subroutine library, the broadening data for HeI lines and the approximation ito be used for untabulated diffuse HeI lines. They should be changed only with extreme caution. Refer to the SPECTRUM documentation for more information.
gen_par
When using method genetic, several parameters are used to control the performance of the Genetic Algorithm search procedure. A short explanation of the input parameters is given:
Parameter Meaning Default Value Allowed Rangegenerations The maximum number of generations the program will go through, before stopping, if the solution is not within the given tolerance. 10population The number of parents randomly generated in the first generation, and in each subsequent generation. 50prob_mut The probability of mutation in the offspring. 0.02 0 - 1prob_cross The probability of crossover between two parents. 0.8 0 - 1tolerance The highest suitability which will be tolerated. 1.0selection_method There are three selection methods available: tournament, rank, and fitness proportionate. rank rank
tournament
fitnesscontestants specific to tournament selection. This number of parents will be selected at random and from these the two with the lowest chi-squared values will be chosen as a pair of parents. 10substring_length defines the number of characters coding each parameter. This is multiplied by the number of parameters being varied to give the total string length for each parent. 16alphabet _size the number of different characters encoding the parent. For instance if this variable is given the value 2 the parent will be encoded by a string of ones and twos 3elitism an option which, if set to 'yes', always keeps the best few members of each generation. no yes
nokept Only required if elitism is selected. Defines the number of individuals to be carried over to the next generation (if elitism is selected). 3Example:
gen_par{
generations 10
population 50
prob_cross 0.8
prob_mut 0.02
tolerance 1.0
contestants 3
substring_length 16
alphabet_size 3
selection_method rank
elitism no
kept 2
}
continuum
SFIT allows the observed spectrum to be renormalized using a given model as an appoximate solution. This method is particularly important where the true "continuum" is impossible to identify -- in fact this is generally the case. However it should be applied with caution as it is possible that as assumed solution can be used to "lead" the final solution, by overrectifying broad lines, for example. Therefore three methods are provided. In all, a function is defined by the ratio of approximate solution to observation.
poly n polynomial fit filter w gaussian filter special w w2 gaussian filter with bad point rejection Using "poly <n>", an nth order polynomial is fitted to this ratio in those wavelength regions defined by "cmask". The observed spectrum is then multipled by this polynomial to obtain a new spectrum for use by SFIT.
Using "filter <w>", a gaussian filter with FWHM = w is passed through the ratioed spectrum. The observed spectrum is then multipled by this filter to obtain a new spectrum for use by SFIT.
Using "special<w> <w2>", a gaussian filter with FWHM = w2 is passed through the ratioed spectrum wavelength. Points more than 3-sigma from this local mean value are deleted. A second gaussian filter with FWHM = w is passed through the result. The observed spectrum is then multipled by this filter to obtain a new spectrum for use by SFIT.
data
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 : DOES NOT WORK AT PRESENT
spectrum <name>
name of file containing spectrum in "spectrum format 2"
header1
header2
nw
w_1, f_1
w_2, f_2
...
w_nw, f_nwsigma <sig>
mean standard error on data in 'spectrum'
pamela <name>
name of file containing spectrum in pamela format ( x, y, s )
instrument <fwhm>
FWHM (A) of instrumental broadening function
cosmic <threshold>
Threshold for rejection of fluxes (e.g. due to cosmic ray spikes)
drift <dv>
velocity drift (km/s) during exposure.
mask
The mask command takes the following format:
mask{
<n>
<ms_1> <me_1> <mw_1>
<ms_2> <me_2> <mw_2>
...
<ms_n> <me_n> <mw_n>
}where <n> is the number of mask windows, <ms>, <me> and <mw> are the start and end wavelengths and weight values for the mask. <mw> should be a small number if you require the fit procedure to ignore data in the given window. SFIT uses a weighted chi-square minimisation approach. The weights are by default assumed to be the standared errors on each observation. In this command, weights are converted to a pseudo standard error by inversion. Thus a "weight" of 0.1 corresponds to a standard error of 10.
Example - to eliminate cores of HeI 4026 and 4388, and emphasize HeI 4471 in fit, assuming an average s.e of 0.01 on each pixel.
mask{
3
4020 4032 0.001
4380 4396 0.001
4465 4477 100.0
}cmask
The cmask command takes the following format:
mask{
<nc>
<cs_1> <ce_1>
<cs_2> <ce_2>
...
<cs_n> <ce_n>
}where <n> is the number of mask windows, <cs>, and <ce> are the start and end wavelengths and weight values for the continuum mask. These mask regions define regions of spectrum where the continuum level is to be estimated by comparing the current optimum model and the observed spectrum. It does not assume that data in these windows define the continuum per se but rather that the fit is sufficiently good in these regions that the ratio of observed and model spectrum should be close to unity after rectification.
normalize
Executes one normalization step and applies it to the current spectrum, using the current parameter estimates, the method defined by continuum and the continuum regions defined by cmask. This command takes no parameters
solve
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 <file.fit>, where <file> was the name of the spectrum being fitted.
synth
Compute the best fit parameters by computing spectra with variable abundances and v sin i, using a given model atsmosphere. .
This command takes no parameters; everything should have been set up prior to running synth. The output is saved in a file <file.synth>, where <file> was the name of the spectrum being fitted.
vcorr
NOT YET IMPLEMENTED.
Assuming a model spectrum computed at the current estimated paraemters, this command will compute the cross-correlation function with respect to the current observed spectrum and thereby determine the relative radial velocity. This value will then be stored as system variable <vrad_1> to be used in subsequent applications. Hence, this command could be used as a preliminary to solve. This command currently takes no parameters.
trim
NOT YET IMPLEMENTED.
This command instructs the fitting software to ignore cosmic rays (or emission lines) in the fit. It does this by assigning a very low weight (large standard error) to all data values more than <threshold> above the continuum level (1.0).
set, show
Certain parameters associated with fitting the data may be set and inpsected manually using these commands. For example,
show all
will print out the current values of all parameters which may be altered manually.
set vrad1 -50.0
will set the values for the primary radial velocity to be used by synth and solve.
end
A tidy way to finish up.
This page is maintained by:
Simon Jeffery (csj@star.arm.ac.uk)
Last modified: July 7, 2003