[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FEFF Output File Headers



 
Dear Feff-developers,

 Matt Newville has expressed the desirability of documented
standards in the various output files, to facilitate interfacing FEFF
with other codes. The key question is: what's the most appropriate
standard or standards to adopt to avoid most conflicts.

 In the "good old days" of VAXen and line printers, the first
character in a line had to be treated very carefully to avoid conflicts.
Thus most of the important output files in FEFF versions 5-8.1
kept a blank in the first column, and followed Zabinsky's convention
of terminating headers with a column label line followed by @#
No attempt was made to do anything about plotting since graphics
was (and is) generally system specific.

 However, these conventions are not very friendly to plotting programs
like gnuplot, which likes comment lines to start with #.
Thus to plot e.g., on UNIX machines, one had to edit files or use
Zabinsky's gnufix utility which introduced # marks in the header,
i.e., up to the line ending with @# which just precedes the data.

What should we do or not do in the "good new" 2002 era i) about headers,
ii) about column label lines, iii) about comment characters? One proposal
is summarized in the following 4 points. Please let us know if you see
any objection to this proposed standard or suggestions for alternatives.
We're getting close to releasing FEFF8.2, in which we intend to introduce
modified output files intended for plotting which are compatible at least
with Newville's ifeffit, Ravel's athena, etc. 

 Thanks.
  J. Rehr
  A. Ankudinov


1) Leave feffnnnn.dat files unchanged. Whatever their disadvantages
may be, changing will undoubtedly break a lot of fitting software.

Thus the feffnnnn.dat files would look the same as before (8.20x8
is the current experimental version of the soon to be released code).

e.g.,feff0001.dat:
 copper                                                           Feff 8.20x8
 POT  Non-SCF, core-hole, AFOLP (folp(0)= 1.150)
 Abs   Z=29 Rmt= 1.411 Rnm= 1.456 K  shell
 Pot 1 Z=29 Rmt= 1.358 Rnm= 1.395
 Gam_ch=1.729E+00 H-L exch
 Mu=-3.348E+00 kf=1.832E+00 Vint=-1.614E+01 Rs_int= 1.979
 PATH  Rmax= 5.120,  Keep_limit= 0.00, Heap_limit 0.00  Pwcrit= 2.50%
 Path    1      icalc       2
 -----------------------------------------------------------------------
   2  12.000   2.5527    2.6376   -3.34817 nleg, deg, reff, rnrmav(bohr), edge
        x         y         z   pot at#
     0.0000    0.0000    0.0000  0  29 Cu       absorbing atom
     0.0000   -1.8050    1.8050  1  29 Cu    
    k   real[2*phc]   mag[feff]  phase[feff] red factor   lambda real[p]@#
  0.000  3.6822E+00  5.6910E-05 -5.1069E+00  9.890E-01  1.6159E+01 1.8335E+00
  0.100  3.6827E+00  5.0282E-02 -5.6056E+00  9.891E-01  1.6182E+01 1.8361E+00

2) Add a # character in column 1 of all files to be plotted, e.g.
chi.dat, xmu.dat, rholnn.dat,  e.g. chi.dat:

# Cu crystal, 4 shells                                           Feff 8.20x8 
# POT  Non-SCF, core-hole, AFOLP (folp(0)= 1.150)
# Abs   Z=29 Rmt= 1.410 Rnm= 1.457 K  shell
# Pot 1 Z=29 Rmt= 1.361 Rnm= 1.399
#  several comment lines deleted  
#    13/  13 paths used
#  -----------------------------------------------------------------------
#       k          chi          mag           phase @#
     0.0500   -2.338951E-01  2.362202E-01 -1.711218E+00
     0.1000   -2.361743E-01  2.385645E-01 -1.712470E+00

and xmu.dat:
# Cu crystal                                                     Feff 8.20x8
# POT  Non-SCF, core-hole, AFOLP (folp(0)= 1.150)
# Abs   Z=29 Rmt= 1.411 Rnm= 1.456 K  shell
# Pot 1 Z=29 Rmt= 1.357 Rnm= 1.393
# Gam_ch=1.729E+00 H-L exch
# Mu=-3.391E+00 kf=1.833E+00 Vint=-1.619E+01 Rs_int= 1.978
# PATH  Rmax= 8.000,  Keep_limit= 0.00, Heap_limit 0.00  Pwcrit= 2.50%
#  S02=1.000  Temp=  10.00  Debye_temp= 315.00  Global_sig2= 0.00000
#  Curved wave amplitude ratio filter   4.000%
#     file         sig2 tot  cw amp ratio   deg  nlegs   reff  inp sig2
#           1       0.00316    100.00     12.00     2   2.5527
#  several comment lines deleted  
#          74       0.00371      5.15     96.00     3   7.9593
#          75       0.00371      5.36     96.00     3   7.9593
#    59/  68 paths used
#  xsedge+50, used to normalize mu           2.4903E-04
#  -----------------------------------------------------------------------
# e, e(wrt edge), k, mu=(1+chi)*mu0, mu0, chi @#
    8976.549    -11.963  -1.500 -5.98521E-02  2.99147E-02  3.04873E-01
    8977.111    -11.401  -1.450 -7.28310E-02  3.20132E-02  3.28239E-01

3) Keep Zabinsky's convention of having the label line the first
line above the data columns, terminated by a @#, as in all of the above
examples.

4) These conventions would all be documented in the FEFF doc
and in the FEFF WWW pages. Also utilities like gnufix, rdhead, etc.
would be provided e.g., in a Utilities section of the FEFF WWW pages.

5) B. Ravel has suggested adding restrictions to the label line,
e.g., the undesirability of some special characters, to simplify
the parser's job.  For example, we could spiff up the header in xmu.dat
as follows:
#   omega,        e,       k,      mu,           mu0,         chi @#

Does anyone have strong feelings about this?