Jiffies: Difference between revisions

From XDSwiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 5: Line 5:


FIXME: what are these lines in bash syntax?
FIXME: what are these lines in bash syntax?
----


For the not-so-Unix-proficient-ones: ''sortlattices'' runs on IDXREF.LP the following commands:  
For the not-so-Unix-proficient-ones: ''sortlattices'' runs on IDXREF.LP the following commands:  
Line 10: Line 12:
# sorts these lines on the third column, numerically, ascending
# sorts these lines on the third column, numerically, ascending
# and prints the first 12 of these to the terminal
# 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|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'' 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  
Line 30: Line 50:


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
  gnuplot<<EOF
  gnuplot<<EOF
  set term png
  set term png
Line 41: Line 60:
  plot "frames.scales" using 1:10
  plot "frames.scales" using 1:10
  EOF
  EOF
to get
[[Image:scale.png]]
[[Image:divergence.png]]
[[Image:mosaicity.png]]

Revision as of 15:58, 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

gnuplot<<EOF
set term png
set grid
set out 'scale.png'
plot "frames.scales" using 1:3
set out 'divergence.png'
plot "frames.scales" using 1:9
set out 'mosaicity.png'
plot "frames.scales" using 1:10
EOF

to get File:Scale.png File:Divergence.png File:Mosaicity.png