Jiffies: Difference between revisions

From XDSwiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 49: Line 49:
If you do have bad outliers (e.g. shutter didn't open), and decide that you for now simply want to remove those frames, then you could rename the frames (just append ".bad" to the name), and re-run XDS from the INTEGRATE step.
If you do have bad outliers (e.g. shutter didn't open), and decide that you for now simply want to remove those frames, then you could rename the frames (just append ".bad" to the name), and re-run XDS from the INTEGRATE step.


If you simply want the plots and glue them into your lab book, just run
----
 
If you simply want the plots and glue them into your lab book, just run (assuming "ms688_2" is the name of your dataset!):
setenv DATASET ms688_2
scalefactors > $DATASET.scales
ln -s $DATASET.scales $DATASET.mosaicity
ln -s $DATASET.scales $DATASET.divergence
  gnuplot<<EOF
  gnuplot<<EOF
  set term png
  set term png
  set grid
  set grid
  set out 'scale.png'
  set out 'scale.png'
  plot "frames.scales" using 1:3
  plot "$DATASET.scales" using 1:3
  set out 'divergence.png'
  set out 'divergence.png'
  plot "frames.scales" using 1:9
  plot "$DATASET.divergence" using 1:9
  set out 'mosaicity.png'
  set out 'mosaicity.png'
  plot "frames.scales" using 1:10
  plot "$DATASET.mosaicity" using 1:10
  EOF
  EOF
rm -f $DATASET.{scales,mosaicity,divergence}
to get
to get
[[Image:scale.gif]]
[[Image:scale.gif]]
[[Image:divergence.gif]]
[[Image:divergence.gif]]
[[Image:mosaicity.gif]]
[[Image:mosaicity.gif]]

Revision as of 16:36, 15 November 2007

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

Example: dikay@turn29:-data/temp% sortlattices

   44        aP          0.0     145.8  164.1  245.4  90.1  90.0  90.1   -1  0  0  0  0  1  0  0  0  0 -1  0
   31        aP          0.3     145.8  164.1  245.4  89.9  90.0  89.9    1  0  0  0  0  1  0  0  0  0  1  0
   35        mP          0.9     164.1  145.8  245.4  90.0  90.1  90.1    0 -1  0  0  1  0  0  0  0  0  1  0
   34        mP          2.2     145.8  245.4  164.1  90.1  90.1  90.0    1  0  0  0  0  0  1  0  0 -1  0  0
   33        mP          2.5     145.8  164.1  245.4  90.1  90.0  90.1   -1  0  0  0  0  1  0  0  0  0 -1  0
   32        oP          2.8     145.8  164.1  245.4  90.1  90.0  90.1   -1  0  0  0  0  1  0  0  0  0 -1  0
   14        mC        135.2     219.4  219.6  245.4  90.1  90.1  83.2   -1  1  0  0  1  1  0  0  0  0 -1  0
   10        mC        135.8     219.4  219.6  245.4  89.9  90.1  96.8    1 -1  0  0  1  1  0  0  0  0  1  0
   13        oC        135.8     219.4  219.6  245.4  90.1  90.1  83.2   -1  1  0  0  1  1  0  0  0  0 -1  0
   11        tP        136.4     145.8  164.1  245.4  90.1  90.0  90.1   -1  0  0  0  0  1  0  0  0  0 -1  0
   39        mC        249.7     359.0  145.8  245.4  90.0  90.1  66.1    1 -2  0  0  1  0  0  0  0  0  1  0
   37        mC        250.3     511.9  145.8  164.1  90.1  90.1  73.5   -1  0 -2  0 -1  0  0  0  0  1  0  0

(read Space group determination to find out what to do with these lines)


scalefactors finds those lines in INTEGRATE.LP which match a certain pattern of blanks and non-blanks. These are just the lines printed during the INTEGRATE step 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:3

or

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

or

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

It is useful to run gnuplot this way, because you can move the mouse over an outlier and see its coordinates (x=frame number) in the lower left corner of the plot window.

If you do have bad outliers (e.g. shutter didn't open), and decide that you for now simply want to remove those frames, then you could rename the frames (just append ".bad" to the name), and re-run XDS from the INTEGRATE step.


If you simply want the plots and glue them into your lab book, just run (assuming "ms688_2" is the name of your dataset!):

setenv DATASET ms688_2
scalefactors > $DATASET.scales
ln -s $DATASET.scales $DATASET.mosaicity
ln -s $DATASET.scales $DATASET.divergence
gnuplot<<EOF
set term png
set grid
set out 'scale.png'
plot "$DATASET.scales" using 1:3
set out 'divergence.png'
plot "$DATASET.divergence" using 1:9
set out 'mosaicity.png'
plot "$DATASET.mosaicity" using 1:10
EOF
rm -f $DATASET.{scales,mosaicity,divergence}

to get Scale.gif Divergence.gif Mosaicity.gif