1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
This Readme file explains the structure of the Demeter::Fit
serialization. This structure deals with two similar but not
identical situations. When a Demeter fitting script is run, the
serialization file contains all data associated with the fit and with
the Feff calculation(s) all in one place. When a fitting project from
Artemis (which can contain an arbitrary number of Feff calculations
and individual fits) is saved to a file, there are parallel directory
trees for the Feff calculations and the individual fits.
The serialization file is a normal zip file with the "dpj" extension
when serializing an individual fit and "fpj" when serializing an
Artemis fitting project.
Contained in the zip file are several YAML files describing the various
objects included in the fit, several column data files with the
extension "fit", zero or more binary files from Feff, and a file
called "log".
YAML is a serialization format. See http://www.yaml.org/. This
format was chosen because it easily serializes and deserializes perl
data structures and because it is language agnostic. Demeter's fit
serialization can, in principle, be read into programs written in
other languages.
log file:
This is the log file generated by the Fit objects logfile method.
It is, of course, a restatement of the data contained in the various
yaml files, but in a human-digestible format.
YAML files:
1. structure.yaml:
overall structure of the fit. The principle attributes of the
Fit object are references to three arrays containing the Data,
Path, and GDS objects comprising the fits. This yaml
serializes the group attributes in order of those three
arrays followed by the group attributes of any Feff objects
involved in the fit. Thus, this file contains 4 lists of
strings which are used to disentangle the relationships of the
remaining YAML files.
2. gds.yaml:
yamls of the GDS objects
3. <data>.yaml:
one yaml file for each of the Data objects in the fit. This is
the normal Data object serialization of the attributes, and the
k and chi(k) arrays.
4. paths.yaml:
this file contains yamls for each path used in the fit. Note
that the data attribute in in the yaml is a string containing
the group name of the Data object associated with the path.
When deserializing the Fit, this attribute needs to be
converted into a reference to that Data object. Similarly, the
parent and sp attributes need to be converted into references
to the appropriate Feff and ScatteringPath objects.
5. fit.yaml:
Fit properties, fit statistics, best fit values, all correlations
6. plot.yaml:
the state of Plot object at the time of the fit.
Fit files:
One for each of the Data objects included in the fit. The columns
of this file are k, data, fit, residual, window. This is the
standard Demeter fit file format. The header gives lots of clues
about how the fit was made and where the data came from. The file
names is "<data>.fit" where <data> is the group attribute of the
Data object (usually a random 4 or 5 character string).
Feff calculation:
A set of files <feff>.bin, <feff>.yaml, <feff>.inp for each Feff
calculation, where <feff> is the identifier for the Feff object.
There may also be an atoms.inp file.
To deserialize a ".dpj" file within a Demeter script:
my $fitobject = Demeter::Fit->new(project=>$filename);
To import a ".fpj" file into Artemis, read it in using the appropriate
menu item.
|