Reciprocal lattice plane plot for CeB6
--------------------------------------

cubic a = 4.144, wavelength = 2.01273

Reflections defining the orientation:

1 1 1 at 49.7484 24.3999 -88.8867 0
2 2 1 at 93.5294 30.4021 -88.9536 0


           rafd9
mannix.raf -----> rafd9mannix.lpt
rafd9mannix.dat

 Mean abs(DEV.) (no *false* ref.):     0.0001   0.04763    0.0003

 FINAL ORIENTATION [UB] MATRIX  Busing&Levy
 
                    0.1728868    -0.1683135     0.0035436
                   -0.1004751    -0.0990839     0.1957523
                   -0.1350805    -0.1417208    -0.1410685


The detector has 2048 x 2048 pixels, each 79.092 micrometers in edge.

Omega scan through the 1 1 1: -0.05 0.05 10 1 => step = 0.01

dmtest0030.mccd - dmtest0041.mccd  (but this gives 12 points? Probably 30-40!)

	Assume that dmtest0035.mccd corresponds to the midpoint of 1 1 1.

dmtest0043.mccd is an acquisition on the 1 1 1 with chi -> chi + 2

This shifted the spot to the right in our screen view, and the centre of the
detector now corresponds to 1.05 0.95 1.


dmtest0044.mccd is an acquisition on the 1 1 1 with chi -> chi + 2
                                                and 2th -> 2th + 2

This put the spot to the lower right in our screen view.


dmtest00**.asc are ascii files of the same acquisitions containing just the
~centre 257 x 257 pixels, starting at X = 852 and Y = 795.

If the region is centred on the detector, X and Y should both start at ~896.
We are offset by 44 and 101 pixels, which correspond to 3.48 and 8.0 mm, resp.
Of course, the detector itself might not be centred.


The first live lines in dmtest00**.asc are for information, and each line 
finishes with a <cr> character:

(DAS)^2 2-D text output of image region:
Number of pixels in X direction =        257
Number of pixels in Y direction =        257
X starting pixel of ROI =        852
Y starting pixel of ROI =        795
ROI pixel values follow (X-direction changing fastest, bottom left first):
      10       6      10      11       8      11       7       6      10      13
      10       8       8       9       8       7       9       8       8       8

To convert to 256 x 256 in simple (10I8) format without the <cr>'s:


               ./reformat
dmtest00**.asc ---------> 0000**   (10I8)              
                          plot2d.dat (in plot2d format)


Use plot2d.dat for 00036, which is at the centre of the scan through the 1 1 1,
at least to within one step.

           mv            plot2d
plot2d.dat -> 000035.plt ----->  

Puts the maximum (4068) at 141 171
We want this to be at      128 128
=> offset of                13  43 pixels
                          1.027 3.297 mm (for a spacing of 0.079 mm).

Shift in chi:

           mv            plot2d
plot2d.dat -> 000043.plt ----->  

Puts the maximum (963) at 245 171

Shift in chi and gamma (2theta):

           mv            plot2d
plot2d.dat -> 000044.plt ----->  

Puts the maximum (963) at 245 45

This implies that we are reading in the data starting at high nu, low gamma,
nu varying quickest.  We added the case IORD=4 to the input routine in frameio.


Plots of sections in reciprocal space:
-------------------------------------

setenv DI1 .

Modify and run the command file test_rlpplot.com.n 

0.85 0.85 0.85 Defines three corners of a small square about the 1 1 1
1.15 1.15 0.85 in the equatorial plane, i.e. in the plane of 1 1 0 and 0 0 1.
0.85 0.85 1.15

1.00 1.10 1.05 Defines three corners of a small square about the 1 1 1
0.90 1.00 0.95 perpendicular to the equatorial plane, along the 1 1 1 direction.
1.00 0.90 0.95


Run on the 000036 the latter puts the reflection at x = 49/76 and y = 34/61.
Adjust Xoff and Zoff to put it in the centre, i.e. at 38,31
This gave Xoff = 3.75 and Zoff = -1.50

The same run on the 000043 put the spot in the centre if chi was set to -90.8867
not -86.8867 (as suggested in my hand-written notes).  Can we check the angles
again?

Similarly the same run on the 000044 put the spot in the centre if chi was set 
to -90.8867 and 2theta to 47.75, not 51.75 (as again suggested in my 
hand-written notes).  Since 2theta is always positive I cannot imagine that I
would note the sign wrongly.

000036 vs 000043 and 000044 suggest that we are reading in the data starting
at low nu, high gamma, (still) nu varying quickest.  I corrected the case 
IORD=4 accordingly.  Now Xoff = -3.10 and Zoff = 0.75 to put the reflection
in the centre.  (Why was not a change of sign sufficient?)

Reduced the assumed step size in the resolution calculation to 0.025 deg (from
0.1 deg).


Compare 000036, 000043 and 000044 to adjust the sample to detector distance.

With radius = 300 the reflection in 000036 is at X = 152 Y= 125, that in 000043
is at X = 152, Y = 132, and that in 000044 is at X = 145, Y = 132.  
The position in 000036 is pretty much independent of the radius, since we use
Xoff and Zoff to out the reflection in the centre.

With radius = 350 the reflection in 000043 is at X = 152, Y = 143, with radius
= 275 it is at X = 152, Y = 120. Radius = 285 gives Y = 125.  For radius = 285
the reflection in 000044 is at X = 152, Y = 125 (or close enough).

We do not know where the TRUE centre of the detector lies.  This could only be 
found by scanning a few reflections, as is done on D10 etc.


Finally, some sample plots for Danny
------------------------------------

              rlpplot
000030-000040 ------> rlpplot.001 - 005 -> test_0.001
000043                
000044
           test_rlpplot.com.0 (0.95 0.95 0.95; 1.05 1.05 0.95; 0.95 0.95 1.05)


              rlpplot
000030-000040 ------> rlpplot.001 - 005 -> test_0.001
000043                
000044
           test_rlpplot.com.2 (0.99 0.99 0.99; 1.01 1.01 0.99; 0.99 0.99 1.01)
