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 commandsexamples
fuse another fileffourc.30Feb00
?recall the list of commands
qquit
dset searched dir
scan choice
iset current indexi25, i+, i-
sset current scans33, s+, s-
rreindex the file and move to last scanr
data related commands
xset column x (1..N or -1=last column)x1
yset column y (1..N or -1=last column)y-1
zset the monitor column (1..N or -1=last column)z-2
Etoggle error bar mode in data
Ntoggle 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
Atoggle automatic AUTOSCALE in xmgr
do not work with grace 5.1
Ltoggle automatic LOG scale
Ttoggle automatic Title
Ptoggle automatic PURGE in xmgr
b send a batch file files bxmgr.bat
B to send a parameter file to xmgr
console interface
pprint current scan
tprint the index tablet
cprint scan comments and header
extracting data
wwrite current scan to a file (-=stdout)
#toggle writing comments in file
Wwrite to file according to the following F and C specifications
Fformat string as used in cF%8.4f %8.4f %9.0f %.0f\n
Ccolumn numbers separated by spacesC1 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