Take a peek at the Appendix. Included there are a few examples of input
files for
Phit.inp
uses keywords to describe the input parameters. With
only a few exceptions, the keywords are allowed to occur in any order
in the file, and usually have transparent meanings. This structure
allows the input file to be easily read and modified. All keywords
use the syntax:
keyword delimiter value(s) delimiter ...
The delimiter can be:
Most keywords take only one value. Many keywords can be put on one
line (though some keywords require their own line). Internal comments
can be written anywhere in phit.inp
, which help remind
you what the keywords mean, or how you chose the input
values. Keywords can be in upper, lower, or mixed case.
These characters denote comments in the input file. Anything on a
line following any one of these characters will be ignored unless they
follow the keywords title
, comment
, or id
in which case they will be part of the title or id line.
This is a title line that will be written to the log file and to each output data file. It can be used to describe and document a run of the program. Up to 9 title lines of 72 characters each are allowed.
This is the name of a file that contains additional keywords to
be parsed when the input file is read. The include file name can be
up to 72 characters long and may contain a directory path. The
include file is read according to the same syntax as
phit.inp
. All keywords read in the include file are
handled equivalently to those in phit.inp
. The line
containing the keyword include
is entirely parsed before
the include file is opened and read. When the include file is
finished, parsing of the input file will continue. Nested include
files are allowed although there is a limit to how deeply they may be
nested. Include files are never necessary but are allowed as an
organizational convenience for complicated input files.
This is the name of the input data file. It may be up to 72
characters long and may contain a directory path. The filename should
not contain spaces, tabs, commas (,), or equal signs (=). These
characters will confuse the parsing algorithm. The abscissa grid
provided in the input file is used for writing out the output data.
See the full description of the x1 - x10
keywords for a
discussion of how a limited fitting range can be chosen. Not providing
an input file name is equivalent to setting the nofit
flag
or to providing no guess values. In this case, npoints
keyword for a discussion of how the output abscissa
grid is chosen if no input data file is provided.
These are the numeric and symbolic keys that identify a record in a UWXAFS data file. See the data format document in the UWXAFS package for more details on this file format. At least one of these two must be specified if the UWXAFS file format is used.
This is the name for the file containing the sum of functions.
The file names for the individual functions will be the same with the
extension replaced with the function number from the input file. If
no output file name is specified, the input file name will be used
with the extension changed to fit
, out
, or the
function number, as appropriate. The file extension is defined as all
characters after the final dot (.) in the file name. This definition
meets the definition of an extension in DOS and VMS, and is well defined
in a Unix environment.
This is the name of the log file. The input parameters, set math
expressions, functions and ids, results of the fit, and results of the
error analysis will be written to this file. Much of this information
will not be written anywhere else, so this is an important file! The
default name for this file is phit.log
.
These specify the formats for the input and output data files.
By default, files are read in the ASCII format. The other option is
the UWXAFS format. The format
keyword specifies both input
and output format. Note that the input and output formats do not need
to be the same.
This determines how the output data will be written to the output
data files. If this keyword is set to full
, the sum of
functions and individual functions will be evaluated at each input
abscissa value in the input file. If it is set to fit
, the
functions will only be evaluated at abscissa values within the fitting
ranges. This is set to full
by default.
This is a character string that will be used to denote the
abscissa in all math expressions. By default this is x
, but
something else might be more appropriate for a specific problem. For
instance if the input data is an XAFS spectrum in energy, this might
be set to e
. If the input data is in temperature, it might
be T
.
If a third column containing measurement uncertainties at each
abscissa value is provided in the input file,
To evaluate chi-square using a single, user-chosen number, specify it with this keyword. It will be used to evaluate chi-square and to perform the error analysis. If no information about measurement uncertainties is provided in the input file, a single number which is the standard deviation of the residuals of the fit will be used. This value of sigma will be used to normalize chi-square and the error bars.
Part of the error analysis is the computation of correlations between variables. By default, only those variables with more than 15% correlation will be written to the log file. This limit can be changed with this keyword. It takes a value between 0 and 1.
These values can be used to limit the range of the fit to some
subset of the input data range. They take values within the range of
the abscissas of the input data and are specified in pairs. Only the
input data between x1
and x2
and between x3
and x4
and so on will be included in the fit. The data
between x2
and x3
and so on will be excluded from
the fit. Chi-square and the error analysis will be computed using
only the data contained within these abscissa ranges. By default
x1
is the first data point, x2
is the last data
point, and the other eight are unused. The values of these keywords
will be sorted on input and if an odd number of values are found, the
last data point will be inserted into the list. When functions are
evaluated with the fitting results and written to the output data
files, they can either be evaluated in the fitting range as specified
by these keywords or in the range of the input data. This is
determined by the keyword write
.
These are synonymous with X1
and X10
. When
only the ends of the input data range are being excluded, these
keywords are perhaps more mnemonic.
This keyword is only used in the situation where functions are
evaluated without performing any fit. If no input data is specified,
then npoints
points between xmin
and xmax
and
evaluate the function on that grid. If an input data file is
specified and no fit is called for, the xmin
and xmax
from that
data file and ignore the value of npoints
. By default,
npoints
is 100.
When this keyword is encountered in the input file,
This is a logical flag telling
This is a logical flag telling write
is fit
and the output files only contain the function evaluations at the data
points used in the fit, then the residual file will contain the
residual used in evaluating chi-square. If write
is set to
full
, then the residual file will contain the difference
between the function evaluations and the data at every data point in
the input data file and is not the residual array used to evaluate
chi-square. This keyword takes no value, simply writing it to the
input file will toggle this logical flag.
This is a logical flag telling
This is a logical flag telling
This is a logical flag telling
This is a logical flag telling
This is a logical flag telling
This keyword takes two values and must be placed on its own line.
The first value is the label that will be used in your math
expressions and the second value is the initial guess of this
parameter. The label is a character string of up to 20 characters and
the initial guess is a number. Up to 50 guess values can be specified.
It is prudent to choose an initial
guess that is somewhat close to what you expect for the best fit
value. For some line shapes, a poor initial guess can confound the
minimization algorithm resulting either in an inability to minimize
chi square or in the location of a false minimum of the parameter set.
See chapter 5 for more discussion of appropriate initial guesses.
Setting no guess values is equivalent to setting the nofit
flag.
This keyword takes two values and must be placed on its own line.
The first value is a label that will be used to identify this value in
other math expressions. The second value is a math expression which
will be evaluated and whose value will be assigned to its label for
use in evaluating other math expressions. The label is a character
string of up to 20 characters. The math expression is a character
string of up to 74 characters. Up to 300 set values can be specified.
The set value must be contained on one
line.
This keyword takes two values and must be placed on its own line.
The first value is an integer which is the index identifying the
function. The second is a math expression which will be evaluated as
part of the sum of functions to fit to the data. This is a character
string of up to 74 characters. Up to 20 functions can be specified.
The function must be contained on one line --
This keyword takes two values and must be placed on its own line. The first values is an integer which is the index of the function associated with this id line. The second value is a character string of up to 74 characters. This is a comment line specifically associated with a particular function. It will be written to individual function data file, if that output is requested, and it will be written along with its function in the log file. Id lines with an integer index shared by no functions will be ignored.