Spec2grace: a short interface between spec files and grace viewer.

Introduction

Spec2nograce is the same program but calls to the grace_np library are avoided, then it can be compiled and used on site without grace to extract data from spec files. Then some commands are not accessible.

Commands

file commands examples
f use another file ffourc.30Feb00
? recall the list of commands
q quit
d set searched dir
scan choice
i set current index i25, i+, i-
s set current scan s33, s+, s-
r reindex the file and move to last scan r
data related commands
x set column x (1..N or -1=last column) x1
y set column y (1..N or -1=last column) y-1
z set the monitor column (1..N or -1=last column) z-2
E toggle error bar mode in data
N toggle automatic NORMALIZATION
grace interface (removed in spec2nograce)
v view indexed scan
if exists, file 'spec2grace.bat' is send before
if exists, file 'spec2grace.par' is send after
v, v+, v-
h hard copy from grace
H hard copy parameters
A toggle automatic AUTOSCALE in xmgr
do not work with grace 5.1
L toggle automatic LOG scale
T toggle automatic Title
P toggle automatic PURGE in xmgr
b send a batch file files bxmgr.bat
B to send a parameter file to xmgr
console interface
p print current scan
t print the index table t
c print scan comments and header
extracting data
w write current scan to a file (-=stdout)
# toggle writing comments in file
W write to file according to the following F and C specifications
F format string as used in c F%8.4f %8.4f %9.0f %.0f\n
C column numbers separated by spaces C1 2 -2 -7
other
(...) loop : (start|istart,end,v|w|W|p|h|c|e)[fileloop] (3,5,w), (s4,7,v)

unrecognized command print the status

 

 

Example

fourc.15May01 (i=37, s=5) >

 spec2grace, type ? to get list of commands

 current file is : fourc.15May01 with 37 entries
 setting is : x=1, y=-1 autoscale=off autopurge=on
 errorbar=on logscale=off normalization=on(z=-2)
 title=on  comments=off
 current W command parameters are "C  1 -1 -2", "F   %8.4lf  %8.4lf  %8.4lf\n"
 current H command parameters "DEVICE "PostScript" PAGE SIZE 300,400" used for grace hardcopy
fourc.15May01 (i=37, s=5) >?

 spec2grace, rel 2.01 Jun 11 2001 see also spec2grace.html
recognized commands are
  v : view indexed scan using xmgrace ( current, index or relative
  h : hard copy from xmgrace
  S, c : scan header, comments  p : print current scan 
  t : print the index table     w : write current scan to a file (-=stdout)
  i : set current index         s : set current scan
  r : reindex the file          q : quit
  f : use another file          d : set searched dir
  ( : (start|istart,end,v|w|W|p|h|c|e)[fileloop]  loop  (3,5,w) (s4,7,v) ....
  x, y , z : set xmgr columns x or y, or the monitor (z) (1..N or -1=last column

  b to send a batch file        B to send a parameter file to xmgr
    files 'spec2grace.bat' or 'spec2grace.par' are send automaticaly with the view command
  A : toggle automatic AUTOSCALE in xmgrace NOT ACTIVATED
  E : toggle error bar mode in data
  L : toggle automatic LOG scale
  N : toggle automatic NORMALIZATION
  P : toggle automatic PURGE in xmgrace
  T : toggle automatic TITLE in xmgrace
  H : hard copy parameters
  # : toggle writing comments in file
  W : write to file according to the following specifications
  F : format string, pe : "  %8.4lf  %8.4lf  %8.4lf\n"
  C : column numbers separate by spacespe, pe : " 1 -1 -2"

 spec2grace, type ? to get list of commands

 current file is : fourc.15May01 with 37 entries
 setting is : x=1, y=-1 autoscale=off autopurge=on
 errorbar=on logscale=off normalization=on(z=-2)
 title=on  comments=off
 current W command parameters are "C  1 -1 -2", "F   %8.4lf  %8.4lf  %8.4lf\n"
 current H command parameters "DEVICE "PostScript" PAGE SIZE 300,400" used for grace hardcopy