Jiffies

Revision as of 15:39, 15 November 2007 by Kay (talk | contribs)

Here are two one-liners for your .cshrc (FIXME: or should these lines go into .login or .profile?) :

alias sortlattices "egrep '^    ..        [aomhtc]' IDXREF.LP | sort -k3n | head -12"
alias scalefactors "egrep ' ....   0 ......  .......   ..  .....    ....   ...  ......  ......' INTEGRATE.LP"

FIXME: what are these lines in bash syntax?

For the not-so-Unix-proficient-ones: sortlattices runs on IDXREF.LP the following commands:

  1. grep (for finding lines that are non-blank at two positions and have one out of the characters 'aomtc' later in the line)
  2. sorts these lines on the third column, numerically, ascending
  3. and prints the first 12 of these to the terminal

Each command pipes its output to the next command.

scalefactors finds those lines in INTEGRATE.LP which match a certain pattern of blanks and non-blanks. These are just the lines printed for each frame. It is very useful (e.g. to find shutter problems, or to "see" the crystal die from radiation damage) to run

scalefactors > frames.scales

and to plot the scale factors and mosaicity and beam divergence of each frame in gnuplot.

This can be done by

> gnuplot
plot "frames.scales" using 1:2

or

> gnuplot
plot "frames.scales" using 1:9

or

> gnuplot
plot "frames.scales" using 1:2