This page details the format, in Backus -Naur Form (BNF), when the image fit graph files are written to a disk file. This is intended for those who wish to build their own syntactically correct parser to interpret Image Fit graph files. Image Fit graph files are written to disk from the Roaming Fit dialog.
An Image Fit graph file
(<image-fit-spec>
) is a plain text file, consisting of
a fit header
(<image-fit-header-spec>
) followed by
pixel intensity values for the data and the fitted function
(<graph-spec>
).
In the Image Fit graph file, white space
is used to separate the elements within an entry. White space may
consist of space characters, tab characters or new-line
characters. The amount of white space is not significant.
Individual elements that may contain white space are enclosed
in double quotes ("). Literal string elements are shown in
non-italic font
below.
<image-fit-spec> ::= |
<image-fit-header-spec><graph-spec><graph-spec>
|
---|---|
<image-fit-header-spec> ::= |
# Image fit written on <date-time-spec> by
Operator ID=<string-spec> |
<date-time-spec> ::= |
"dd mmm yyyy hh:mm:ss.SSS zzzz" |
<string-spec>
is a string of
ASCII text characters enclosed in double quotation marks (").
<expr-spec>
is a string of
ASCII text characters enclosed in double quotation marks (")
that is the fitted function.
<fit-var spec>
is a string of
ASCII text characters of the form
var
=value
. var
is the
name of the fitted variable; value
is a decimal
number that is the estimate of the fitted variable value.
The intensity values (graph-spec
) are
written in a tab-separated table with two
columns: the first is the independent variable (x) value,
and the second is the pixel intensity value. A
single tab character separates the two columns.
Two sets of graph-spec
data are written:
one for the data values obtained from the images to be fitted,
and the second for the fitted function evaluated in 100 steps
over the data range, or the range specified by the user. The two
sets of data are separated by a newline character.
An example of the format of the image fit graph written to disk is shown below:
# Image fit written on "26 Apr 2005 11:12:42.763 GMT+00:00" by Operator ID="xinapse"
# Fitted expression "y=(M0*exp(-(TE/T2)))"
# Fit variable M0=1422.7765383273363
# Fit variable T2=761.2015875503421
# Data values are followed by fitted function values.
200.0 1087.6874
250.0 1009.487
300.0 967.10144
350.0 908.1201
400.0 868.54364
450.0 815.3083
500.0 697.1692
550.0 676.58405
600.0 639.7516
650.0 602.22516
700.0 580.9967
0.0 1422.7765
8.08080 1407.7524
...