DIFRAC Manual for TRICS


           A   Fortran   77   Control  Routine   for   4   Circle
                            Diffractometers

                                  by

                E. J. Gabe,  P. S. White and G. D. Enright

                Steacie Institute for Molecular Structure
                   National Research Council of Canada
                        Ottawa,  Ontario,  Canada

                                  and

                        Department of Chemistry
                     University of North Carolina
                 Chapel Hill,  North Carolina,  U.S.A


                   Adapted for TRICS at SINQ, PSI by

                           Mark Koennecke
                   Laboratory for Neutron Scattering
                         Paul Scherrer Institute
                         CH-5232 Villigen-PSI
                            Switzerland

Index

Introduction

     DIFRAC  performs  all the fundamental operations  associated
with  an  X  ray  diffractometer  for  crystal  orientation   and
intensity measurement.

     The basic aims behind DIFRAC are :

  1. to provide a comprehensive set of crystallographic functions
which can   be used with any diffractometer controlled by a PC;
  2. to provide a user interface which is easy to learn;
  3. to   make   the   program  easily  portable  for   different
     instruments.

     These  aims,  particularly the last, have to a large  extent
dictated the structure of the program which is highly modular and
uses  many  of the portability concepts developed for the  NRCVAX
structure system.

     The  first  aim  has  been  realized  via  a  large  set  of
subroutines   providing  functions  which  are  common   to   all
diffractometers.  These are written in F77 and constitute by  far
the  largest part of the code.  The program runs on  a  PC  under
MS  DOS  using Microsoft compilers. All calculations are  carried
out  in a standard right handed Euler axial system following  the
definitions  used  in  Busing W.R. and Levy  H.A.,  Acta  Cryst.,
(1967), 22, 457.  The facilities available provide the user  with
a comprehensive set of basic functions for examining crystals, as
well  as  more  powerful functions which make  extensive  use  of
symmetry for orientation and intensity measurement.

     The  second  aim  was originally achieved with  a  2  letter
mnemonic  command structure and a simple windows type  of  screen
presentation.   A  later  version  will  use  a  fully   windowed
interface.

     The  third  aim  is achieved by isolating any  modifications
required  to  drive  different instruments  to  a  small  set  of
subroutines  in F77, C or assembler, which actually  address  the
interface.   In this way changes to drive different  instruments,
e.g.  to  drive a Kappa geometry machine, need only  be  made  in
these routines, while the bulk of the code remains constant.

     The  program uses a single binary file to hold all  relevant
crystal information and intensity data.  This is a direct  access
file  usually called IDATA.DA.  If this file does not exist  when
the  program  is  started it is created and  default  values  are
assigned  to  all  parameters. If the file does  exist  when  the
program  is  started, existing values from  the  file  are  used.
During data collection each reflection is written to the file  as
soon as it is measured so that in the case of a crash no data  is
lost. If the need arises, the file is automatically lengthened to
accomodate  more  data.  A routine is available for  reading  and
translating  the binary IDATA.DA file into ASCII, or  it  can  be
read directly by the NRCVAX package.

     The emphasis has always been on giving the user a reasonably
comprehensive,  but simple method to make the instrument  perform
the  sorts  of  operations which facilitate initial  examination,
alignment   and  intensity  measurement  for  randomly   oriented
crystals.   Commands like CR, IM, LP allow the easy  manipulation
of  a  reflection which is already in the detector.  Others  like
AL,  IR,  IE, IP align or measure reflections from  a  list.   An
important difference between this routine and some other  control
routines  is  that  the  list is transparent  to  the  user.  The
commands  set  up the list as well as performing  the  operation.
There are no list manipulation commands as such, though the  list
can  be  editted from within a command.  This makes  for  a  more
comfortable and direct feel to running the program.
     
     A second distinction between DIFRAC and other such routines,
is  the  extensive use of symmetry information.  The routine  can
interpret  space  group  symbols, and use the  symmetry  matrices
generated  to  measure  or  align  equivalent  reflections.   The
routine  also  uses  symmetry to decide on  the  unique  part  of
reciprocal  space  to  measure, which  means  that  no  redundant
reflections  need be measured.  If further data  is  needed,  the
routine   will   automatically  continue  to   measure   symmetry
equivalent data sets until the whole sphere, within the q limits,
is collected or until stopped by the user.

     A further difference is the continuous display of reflection
profiles.   This  is an invaluable help in deciding  whether  the
crystal  is  suitable  for  analysis,  and  for  monitoring   the
measurement process.  It is not usually realized how useful  this
can  be  during intensity measurement, both as a security blanket
and  as  a diagnostic.  It always allows a user 'to get a  better
feel'  for the crystal under investigation and quite often  shows
crystal or misalignment problems that the user would otherwise be
unaware  of,  but  which with corrective action, will  ultimately
improve the quality of the data.
     
     Adaptions for TRICS
     
     The DIFRAC system has been included into the SICS instrument
control  software. This manual has been derived from the original
DIFRAC  manual  by removing all redundant commands.   The  DIFRAC
subsystem  in SICS is accessed by prepending each DIFRAC  command
with the string dif. Please note, that SICS cannot be interrupted
when  it  is waiting for command input for DIFRAC. Also at  least
two  characters  of input are required in the SICS  command  line
client in order to handle a platform dependency bug in Java.

Commands

     The  following  is a concise list of the 2  letter  commands
available  with a one line description of each.   This  is  meant
only as a quick reference to the commands and a reference to  the
manual page with the full description is given.  The program  has
been  developed  over  many  years  and  the  whole  routine  has
gradually  been  made more automatic.  As a result  some  of  the
earlier commands are probably redundant.

     The  commands  are  in  alphabetical order  in  groups  with
roughly  related function.  A list in the rough order of  use  to
setup  and measure a crystal is given after the alphabetic  list.
If  no  command  or an invalid command is given  at  the  command
prompt, various help menus are suggested.

               Group A: Terminal Data Input Commands


BD  all Basic Data (includes CZ DH FR LA OM OR PS RR SD SE TM TP)
CZ   Correct angle Zero values    ...    ...    ...    ...    ...
FR   First Reflection to be measured     ...    ...    ...    ...
LA   LAmbda for the wavelength in use, usually a1      ...    ...
OM   Orientation Matrix    ...    ...    ...    ...    ...    ...
PS   PSi rotation data     ...    ...    ...    ...    ...    ...
RO   Re Orientation reflections: frequency and h, k, ls       ...
RR   Reference Reflections: frequency and h, k, ls     ...    ...
SD   Scan  Data: measurement type, width, speed, profile  control
SE   Systematic Extinctions       ...    ...    ...    ...    ...
SG   Space Group symbol           ...    ...    ...    ...    ...
TM   2q Min and max values        ...    ...    ...    ...    ...
TP   Time and Precision parameters for intensity measurement  ...


               Group B:  Crystal Alignment Commands

AL  ALign reflections and their symmetry equivalents for MM   ...
AR  Align Resumption after interruption  ...    ...    ...    ...
A8  Align the 8 alternate settings of reflection for angle zeroes
CH  CHoose reflections from the PK list for use with M2 or M3 ...
CR  Centre the Reflection which is already in the detector    ...
LC  2q Least squares Cell with symmetry constrained cell      ...
MM  Matrix from Many reflections by least squares on AL data  ...
M2  Matrix from 2 indexed reflections and a unit cell  ...    ...
M3  Matrix from 3 indexed reflections    ...    ...    ...    ...
OC  Orient a Crystal, i.e. index the peaks from PK     ...    ...
PK  PeaK search in 2q, c, f for use with OC     ...    ...    ...
RC  Reduce a unit Cell     ...    ...    ...    ...    ...    ...
RP  Rotate f 360, centre and save any peaks found      ...    ...
RS  ReSet the cell and matrix with the results from RC ...    ...


               Group C:  Intensity Data Collection

GO  Start of intensity data collection   ...    ...    ...    ...
K   Kill operation at the end of the current reflection       ...
Q   Quit after the next set of reference reflections   ...    ...
LR  Last Reflection written to IDATA.DA  ...    ...    ...    ...


               Group D:  Angle Setting and Intensity Measurement

GS  Grid Search measurement in 2q, w or c              ...    ...
IE  Intensity measurement for Equivalent reflections   ...    ...
IM  Intensity Measurement of the reflection in the detector   ...
IP  Intensity  measurement  in y steps for  empirical  absorption
IR  Intensity measurement for specified Reflections    ...    ...
LP  Line Profile plot on the printer     ...    ...    ...    ...
SA  Set All angles to specified values   ...    ...    ...    ...
SC  Set c to the specified value         ...    ...    ...    ...
SO  Set w to the specified value         ...    ...    ...    ...
SP  Set f to the specified value         ...    ...    ...    ...
SR  Set Reflection: h,k,l,psi.    ...    ...    ...    ...    ...
ST  Set 2q to the specified value        ...    ...    ...    ...
TC  Timed Counts          ...     ...    ...    ...    ...    ...
ZE  ZEro the instrument Angles    ...    ...    ...    ...    ...


               Group E:  Photograph Setup Commands

PL  Photograph in the Laue mode   ...    ...    ...    ...    ...
PO  Photograph in the Oscillation mode (same as OS)    ...    ...
PR  Photograph in the Rotation mode      ...    ...    ...    ...


               Group F:  General System Commands

AH  Angles to H,k,l (same as IX)  ...    ...    ...    ...    ...
AI  Ascii Intensity data file conversion        ...    ...    ...
AP  Ascii Profile data file conversion   ...    ...    ...    ...
BC  Big c search for y rotation          ...    ...    ...    ...
BI  Big Intensity search in the IDATA.DA file   ...    ...    ...
HA  H,k,l to Angles (same as RA)  ...    ...    ...    ...    ...
IN  INitialize integer parts of angles   ...    ...    ...    ...
NR  set the NRc progam flag       ...    ...    ...    ...    ...
P9 rotate f by 90ø          ...    ...    ...    ...    ...    F3
PA  Print Angle settings          ...    ...    ...    ...    ...
PD  Print Data of all forms       ...    ...    ...    ...    ...
RB  Read the Basic data from the IDATA.DA file  ...    ...    ...
SW  SWitch register flags setting        ...    ...    ...    ...
UM  (UMpty) Count unique reflections within 2q limits  ...    ...
VM  set the circles to the View Microscope position    ...    ...
WB  Write the Basic data to the IDATA.DA file   ...    ...    ...

Suggested Sequence of Command Use

     This  section  contains  a  list  of  operations  with   the
applicable  commands  to setup, measure intensities  and  get  an
accurate  cell  for an unknown crystal.  It is meant  only  as  a
guide  to  first time users and should not be taken as  hard  and
fast.

                    Crystal Setup

  1.  Mount the crystal and optically centre it on the instrument
      with VM.
  2.   Use PD to see what values have been assigned to the  basic 
       parameters.
       Change  the wavelength if necessary with LA and  2q  limits
       with TM.
 3.  Find and centre 10 to 15 peaks with PK.
 4.  Index  the peaks with OC,  which will automatically progress
     to RC and RS     if necessary.
 5.  Find  reflections with somewhat higher angles with  IR,  and
     centre them with AL using Friedel equivalents.
 6.  Calculate a better matrix with MM.
 7.  Save the orientation matrix with WB.


                    Data collection setup

 8.  Ensure that the scan data and time parameters are reasonable
     and reset them if necessary with SD and TP.
 9.  Find medium strong reflections which are well distributed in
     reciprocal   space  with  IR, to be  used  as  reference  or
     standard reflections.  Enter them  with RR.
10.  Adjust the scan data with SD after seeing the profiles  from
     step 9 and set the detector slits.
11.  Find  re  orientation reflections with IR.  Enter  them,  or
     ensure that  re orientation is not done, with RO.
12.  Enter the Laue group symbol with SG.  Use the lower symmetry
     group if there is an ambiguity, e.g. 4/m and not 4/m m m.
13.  Try  to pin down the Laue group and possibly the space group
     as well with IE.  Enter the corrected group with SG.
14.  Make adjustments to any of the basic parameters (PS, SD, TM,
     TP etc) if necessary.
15.  Issue  the  GO  command and answer the  questions  to  start
     data collection.
16.  Stop  the measurement with K or Q when sufficient data  have
     been collected.


                            Accurate cell setup

17.  Search the unique data on the IDATA file with BI for the  25
     strongest  reflections with 2q greater than a minimum.
18.  Narrow  the  detector slits and enter about  50  reflections
     (including symmetry  and Friedel equivalents) for AL,  which
     will then centre them.
19.  Maybe  use  A8 to get instrument zeroes and enter them  with
     CZ. This procedure could also be used before step 6.
20.  Get an accurate cell and esds with MM on AL results.
21.  Possibly use LC on the 2q data alone.

Program File Usage

     Normally the program uses 4 files which are called IDATA.DA,
ORIENT.DA,  goniom.ini and LPT1.  IDATA.DA is the most  important
and  ORIENT.DA  is  used only as a scratch  file  during  crystal
orientation.   goniom.ini is the instrument initialization  file.
LPT1  will  contain all output which is directed to  an  attached
printer, if there is no printer present.

     The  IDATA.DA  file  is  a binary direct  access  file  with
records of 85 4 byte variables.  The contents of these records is
as follows :

 Records                        Contents
  1  to  3   All the basic data for the machine and crystal. This
is the data
           which is written by WB and read by RB.
 4 to  8   Symmetry information generated by the SG command.
   9           Information   for  an  automatic   restart   after
data collection has been
           interrupted.
10         Space group symbol.
11 to 15   Not used at present.
16 to 19   List of h,k,ls for use with AL.
20 to  N   Intensity data stored 10 reflections per record.

     If the IDATA file does not exist when the program is started
it  is created with a length of 700 records which will hold  6800
reflections.   This should be adequate for most data collections,
but the file will be extended by 100 records at a time as needed.
As the file always exists before it is used there is no data loss
in  the  event of a crash.  However, as the same file  is  always
used  for  data collection it is necessary to copy or  rename  it
before  another  collection  is started,  or  the  data  will  be
overwritten.

     When  the file is created the program assigns default values
to all essential parameters in records 1, 2 and 3.  Defaults are

Cell dimensions      10.0, 10.0, 10.0, 90.0, 90.0, 90.0
Wavelength           0.70932 (MoKa1)
2q min max           2.0, 100.0
h,k,l max            22, 22, 22
Angle zeroes         0.0, 0.0, 0.0      (2q, w, c)
Orientation matrix   0.1    0.0    0.0
                     0.0    0.1    0.0
                     0.0    0.0    0.1
                     This corresponds to the cell above with axes
along the
                     X, Y, Z instrument axes.
Scan data            As 1.0,  Bs 0.7,  Cs 1.0
                     for a scan width of  As + Bs*tan(q) + Cs,
                      w/2q  scan  with  profile  analysis;  speed
4.0/minute.
Background time      0.1 of scan time
Systematic absences  None
Reference reflection 4, 0, 0 taken every 100 normal reflections
Psi rotation         None
Reorientation data   None
Reflection sequence  As for +h, +k, +l orthorhombic data  with  l
varying fastest
                 and h slowest.

     If  the IDATA file exists when the program is started,  then
the  values on the file are used until changed.  The form of  the
intensity  data  in  records 20 upwards is  shown  under  the  GO
command.
     
     The  file ORIENT.DA is also a binary direct access file with
records  of  85 4 byte variables.  This file holds the  data  and
results  of all orientation operations, and need never  be  kept,
though it is retained on exit from the program.

     The  file goniom.ini contains data to initialize the program
when  it is started.  The file is in plain ASCII form and heavily
commented, so that it maybe modified for local use.  Most of  the
values  in  the  file are for use with CAD-4  machines,  but  the
DFMODL  flag and the VM microscope veiwing values are for general
use.
     The  program  creates 4 other files at the  request  of  the
user.

  1. Another binary direct access file with records of 32 4  byte
     variables which is used to store the reflection profiles  if
     wanted.   This file can become very lengthy, if all profiles
     are  saved, even though the data is compressed,  and  it  is
     normally not necessary to save this data as profile analysis
     is  done on line as the data is being recorded.  The file is
     produced  by setting switch 9 with the SW command.   It  has
     the default name PROFL7.DAT.

  2. The  profile data on PROFL7.DAT can be transformed to  ASCII
     and  written  to  a  file with the default name  PROFL7.ASC,
     using the AP command.

  3. The  intensity data on IDATA.DA can be tranformed into ASCII
     and written to a file with the default name IDATA.ASC, using
     the AI command.

  4. The  IP  command collects intensity data from psi  scans  of
     360ø in 10ø steps, and writes it to the file CURVES.DAT, for
     use with empirical absorption calculations.

Terminal Data Input Commands

BD  all Basic Data (includes CZ FR LA OM PS RO RR SD SE TM TP)

     This  command takes the user through all the terminal  input
commands  necessary  to establish a minimum valid  set  of  basic
data.  However,  all  parameters are  assigned  sensible  default
values  if  a  new IDATA.DA file is created when the  program  is
started,  or  current values are read from the existing  IDATA.DA
file,  therefore it is not usually necessary to use this command,
but rather alter specific parameters with individual commands.


CZ  Correct angle Zero values

     Zero corrections, from AL or A8, may be typed.  For the most
accurate  work  it  is  advisable to derive corrections  for  the
particular crystal, as they will vary with the optical  centering
of the crystal.


FR  First Reflection to be measured

     The  h,k,l values of the first reflection to be measured can
be typed in, followed by the set and segment numbers (see GO) for
the  reflection and the number of the first record of  the  IDATA
file  which  will  be  used. The GO command generates  the  first
reflection  automatically at the start  of  data  collection  and
after  an  interruption if an automatic restart is possible.   If
measurement  conditions  have been  changed,  then  an  automatic
restart  is  not  possible and the user  must  supply  the  first
reflection  information  in  the  GO  command,  thus  it  is  not
necessary to use the FR command.

Example:
 Command fr
 First Reflection Data
 Type h,k,l for the reflection 2,0,0
 Type the Reflection and Segment numbers 1,1
 Type the Data record number 20


LA  LAmbda for the wavelength in use, usually Ka1

     It  is  preferable  to  use the Ka1  wavelength  if  profile
analysis  is being used.  If the mean Ka wavelength is  preferred
it   is   advisable   to  set  the  dispersion   parameter   |la1
la2|/mean(la)  (in  SD)  to  0 to prevent  the  profile  analysis
routine  from  starting its background search too far  above  the
peak on the high angle side and hence reaching wrong conclusions.

Example:
 Command la
 Type the wavelength (0.70932)



OM  Orientation Matrix

    Prerequisites:   LA, TM

     The  orientation matrix may be typed in, but  it  is  almost
always derived by OC, M2, M3 or MM.


PS  PSi rotation data

     A  y  step,  minimum  y and maximum y are  typed  in.   This
command  is given either to collect data for empirical absorption
corrections,  or  in  order  to  investigate  possible   multiple
reflections.   All  subsequent  intensity  measurements  will  be
affected by this command, including those in GO, therefore it  is
advisable  to  set the y step back to 0ø once the requirement  is
complete  and  before  the GO command is  given.   For  empirical
absorption  purposes this command has largely been superseded  by
the  IP  command.   It is very useful for investigating  multiple
reflection effects.

Example:
 Command ps
 Psi Data: Dpsi,Psimin,Psimax 2,0,10


RO  Re Orientation reflections: frequency, tolerance and h,k,ls

     It is possible to set up a list of reflections which will be
used  as  for AL, to derive a new orientation matrix periodically
during  data  collection.  This new matrix  is  accepted  if  the
average angular deviation between reflection vectors for the  old
and new matrices is greater than a specified tolerance.

     Input  consists of the frequency of re orientation, in terms
of  the number of intervening reflections, as for RR, the angular
tolerance, and a list of h,k,l values.  Each reflection typed  in
and  its  Freidel  equivalent will be aligned and  the  user  can
select  also  to use symmetry equivalents, as for AL.   This  can
quickly generate a lengthy list and re orientation would then  be
quite  a  lengthy procedure.  Because of this it is best  not  to
enter more than about 12 well chosen reflections in total.

     Reorientation can be disabled by giving the frequency as 0.
Example:
 Command  ro
 Perform re orientation during data collection (N) ? y
 Type the re orientation frequency (500)
 Type the re orientation angular tolerance (0.1) 0.2
 The following  13 reflections are in the AL/RO list
  1.   0   1   2     2.   0   1   2     3.   1   2   3     4.   1
2   3
  5.   3   2   1     6.   1   2   3     7.   1   2   3     8.   1
 2   3
  9.   1   2   3    10.   2   3   4    11.   2   3   4    12.   2
 3   4
 13.   2   3   4
 The following options are available :
  U. Use the existing AL/RO list;
  A. Add reflections to the existing AL/RO list;
  D. Delete reflections from the existing AL/RO list;
  N. New AL/RO list.
  L. List the reflections in the existing AL/RO list;
  E. Exit
 Which option do you want (U) ? n
 Friedel equivalents are always used.
 Do you want symmetry equivalents as well (Y) ? n
 Type h,k,l for up to 100 reflections
 h,k,l (End) 1,2,3
 h,k,l (End) 4,3,2
 h,k,l (End) 3,4,2
 h,k,l (End) 4,5,1
 h,k,l (End)
 The following   4 reflections are in the AL/RO list
  1.   1   2   3     2.   4   3   2     3.   3   4   2     4.   4
5   1
 The following options are available :
  U. Use the existing AL/RO list;
  A. Add reflections to the existing AL/RO list;
  D. Delete reflections from the existing AL/RO list;
  N. New AL/RO list.
  L. List the reflections in the existing AL/RO list;
  E. Exit
 Which option do you want (U) ?


RR  Reference Reflections:  frequency and h,k,ls

     The  specified reference reflections (up to 6) are  measured
after  every N reflections for intensity control purposes.  These
reflections  should  not be too intense,  to  avoid  the  use  of
attenuators, and should be well distributed in reciprical  space.
No  attempt  is made to monitor these reflections  for  fall  off
because it is felt that significant change probably requires user
intervention.  Changes are just as likely to be caused by crystal
translation,  which  cannot  be corrected  automatically,  as  by
rotation.

Example:
 Command rr
 Measure reference reflections during data collection (Y) ?
 Type the measurement frequency (100)
 Type up to 6 sets of h,k,l values.
 h,k,l > 2
 h,k,l > ,2
 h,k,l > ,,2
 h,k,l >

SD  Scan Data: type, width, scan speed, profile control

     Eight measurement types are available:
  0. Constant speed w/2q b/P/b scan;
  1. Constant speed w b/P/b scan;
  2. w/2q b/P/b scan with precision control;
  3. w b/P/b scan with precision control;
  4. Peak top with 2q backgrounds;
  5. Peak top with w backgrounds;
  6. Peak top with 2q backgrounds and precision control;
  7. Peak top with w backgrounds and precision control.

     Constant  speed scans (types 0 and 1) are normal scans  plus
extra  background  points, where the duration of  the  background
measurements  is  always specified (in TP) as a fraction  of  the
scan or peak time.  If profile analysis is to be done (types 0 to
3)  this  fraction should be small, 0.1, meaning 0.1 of the  scan
time is spent on background at each end of the scan. If it is not
to be done, the fraction should be larger, say 0.25.

     Precision control for types 2 and 3 is carried out using the
algorithm  described  in Grant,D.F., Acta  Cryst.,  (1973),  A29,
217).  Precision measurements require the input of  3  parameters
(in TP) which are
    (a)  a maximum time to be spent on a single reflection,
    (b)  a "desired" precision, and
    (c)  a "minimum acceptable" precision.
The routine performs an initial scan and then decides whether the
"desired" precision has already been reached.  If it has, it goes
on  to  the next reflection.  If not, a decision is made  whether
that precision can be reached within the maximum time and if  so,
further  scans  are  done  to achieve  this.  If  this  "desired"
precision  cannot  be achieved, the routine  decides  whether  at
least  the  "minimum  acceptable" precision  can  be  reached  by
measuring   for  the  full  maximum  time.  If  it  can   further
measurements are taken, if not, no more measurements are taken.

     While this controlled precision mode sounds attractive,  for
many  organic crystals it can lead either to spending long  times
measuring  weaker  reflections or having  many  weak  reflections
poorly measured because the routine decides it cannot attain  the
minimum  precision in the maximum time.  A better way to  improve
precision  is  to  use  the  simpler scheme  of  measuring  every
reflection  at  the same speed (types 0 or 1) and use  additional
time to measure symmetry equivalents.  This minimizes both random
(obscuration   and   collision)   and   systematic   (absorption,
extinction, multiple reflection) errors.

     Peak  top  measurement (types 4 and 5) is done by  measuring
for  a  fixed  time  at the calculated peak top  position  and  a
fraction of this time at each background position.

     Peak top measurements with precision control (types 6 and 7)
work  in  a  similar  manner to the scan methods  with  precision
control.  Again 3 values are needed from TP,
    (a)  maximum number of counts wanted,
    (b)  sample count time in seconds,
    (c)  maximum allowed time per reflection.
The peak top is measured for the sample time and from that a time
is  derived  which is either that required to reach  the  maximum
count,  or  the maximum time allowed.  Counting is  repeated,  if
necessary, to reach either objective.


     Peak   top   measurements  are  rarely  used   because   the
instability  of  the crystal mount makes it difficult  to  ensure
that  reflections are exactly in the centre of the detector  over
long  periods of time. Peak top measurements are bad practice  at
TRICS  because  of the insecurity in determining  the  UB  matrix
caused by the huge size of the peaks.

    Scan widths are specified as 3 parameters in the equation
            Width = As + Bs*tanq + Cs,         where
      As  is the angular width from the beginning of the scan  to
the a1 position,
                                             360   |la1   la2|
      Bs  is the dispersion from a1 to a2 as       .           --
, and
                                             2P      mean(la)
      Cs is the angular width from the a2 position to the end  of
the scan.

Typical  values are 0.7, 0.7, 0.7 for MoKa and 1.0, 0.3, 1.0  for
CuKa.

     The  scan speed for types 0 to 3 is given in ø/min. and this
speed is used for all measurements.

     Profile control consists of
  1. a flag indicating whether profile analysis is to be done for
     types 0 to 3, where 0 means do it and 1 means don't, and
  2. if  it  is  to  be  done, the fraction of As  below  the  a1
     position, and of Cs above the a2, at which to start  profile
     analysis.   This merely saves time by not trying to  analyse
     areas of the peak which will obviously not be flat.

     The  type  of  profile analysis used is  a  slope  detection
algorithm  (Grant, D.F. and Gabe, E.J., J. Appl.  Cryst.  (1978),
11, 114), which looks for sensibly flat parts of the profile as a
statistical window is moved from the peak towards the ends of the
profile.   Profile analysis can be performed as part of the  data
collection process and it is suggested that this be used  as  the
routine  mode of operation. Profile analysis improves the quality
of intensity data in two ways.

  1. The  precision  of background measurements  is  improved  by
     including a greater fraction of the peak in the background.
  2. The  precision of the net intensity is improved by  reducing
     the amount of background under the narrowed peak.

     Reflection  profiles are routinely displayed on the  screen,
whether  or not profile analysis is requested, together with  the
theoretical  a1  position.   When  analysis  is  requested,   the
intensity weighted maximum position is shown and also the  points
at which the routine decides to separate peak from background.

     When  profile  analysis  is  requested,  the  routine  takes
background  measurements at each end of  the  scan  for  a  small
fraction of the scan time, usually 0.1, in order to decide if the
peak is significant and therefore analysable.  If it is, analysis
is  done and profile points outside the high and low scan  limits
obtained  are  added  to  the  backgrounds  and  a  new   overall
fractional background time established.  This means both improved
background measurements and a reduced amount of background  under
the  peak  because of reduced peak width.  Thus  either  a  given
overall  precision can be achieved in a shorter time or  improved
precision in a fixed time.

     For  CAD  4 machines a flag can be set which will cause  the
  ,  ,  reflection to be used if there is obscuration at high  2q
and c values for the normal +,+,+ reflection.

Example:
 Command sd
 Scan data : Scan type, As,Bs,Cs, Profile flag.

 Scan type: 0 2Theta,             1 Omega,
            2 2Theta precision,   3 Omega precision,
            4 2Theta peak top,    5 Omega peak top,
            6 2Theta econ. pktop, 7 Omega econ. pk top;
 Type the scan type (0)
 Reflection width in degs is  As + Bs*tan(theta) + Cs
 Type the new As, Bs, Cs ( 0.500 0.000 0.500) .7,.3,.7
 Profile flag   0/1  for DO/DONT DO profile analysis.
 Type the flag (0)
 Scan Step and Preset (4)
 Try  , ,  refln if high angle scan problems (Y) ?
 Fraction of A & C to step off for profile analysis (0.5)


SE  Systematic Extinctions

     This   command  originally  allowed  the  user  to   specify
extinction conditions, but it has largely been superseded because
the  SG command now detects absences automatically.  However,  it
can  still be useful to setup non space group conditions  if  the
need arises.  This is done by telling the routine which class  of
reflections  the  condition applies to and  then  specifying  the
coefficients A to E of the conditional equation
                      Ah + Bk + Cl = Dn + E
for  the reflection to be considered present.  Reflection classes
are
    1 00l    2 0k0    3 h00    4 0kl    5 h0l    6 hk0    7 hkl

     Suppose  for  example in a superstructure  only  reflections
with h = 3n are to be measured, then the condition would be

         Class  A  B  C  D  E
           7    1  0  0  3  0


SG  Space Group symbol

     Several  of the options of DIFRAC need symmetry information,
e.g. IE, GO, AL.  The SG command interprets the standard form  of
a  space group symbol to calculate symmetry matrices in order  to
be  able to generate equivalent reflections.  The symbol is typed
with blanks separating distinct operators, e.g. P 21/c  or  P  21
21 21  or  P 63/m c m.

     Apart  from  generating  equivalent  indices,  the  symmetry
information  allows  subsequent  routines  to  detect  systematic
absences  and Friedel reflections.  It also allows the segment(s)
of  reciprocal  space which form the unique set to  be  generated
(see  the  description  of  DH  sets  under  GO)  and  if  wanted
equivalent  unique  sets.  For data collection  all  the  routine
really  needs is the Laue group symbol, but it cannot then detect
translational systematic absences. Currently there is a limit  of
24 symmetry operations. Beware of high symmetry space groups!


Example:
 Command sg
 Type the space group symbol (P  1) f d d 2
 Space Group F D D 2
   The  Space  Group  is ACentric F Centered  Orthorhombic   Laue
Symmetry mmm
  Multiplicity of a General Site is  16
  The location of the origin is arbitrary in z

 Space group Equivalent Reflections are:
        h     k     l          h     k     l
        h     k     l          h     k     l
 Friedel Reflections are the  , ,  of these.


TM  2q Minimum and maximum values

     Because  of the use of DH matrices, which minimize the  time
needed  to collect a unique set, it is not normally necessary  to
collect data in 2q shells.  Thus it is usual to input one pair of
values,  say  2ø to 50ø, for MoKa, to control the range  of  data
collection.  If at the end of this, it is felt that it  would  be
useful  to  collect more data, further shells can  be  collected.
The defaults indicated are the current values.

Example:
 Command tm
 Type 2Thetamin and 2Thetamax ( 2.00, 80.00)


TP  Time and Precision parameters for intensity measurement

Prerequisite:   SD

     The  value for the background fraction is requested for  all
measurement types except peak top with precision (types 6  &  7).
This  fraction  is  the  ratio of the  time  for  one  background
measurement to the time for the peak measurement.

     If the scan type is w/2q or w (types 0 and 1) only the value
for  the background fraction is requested.  Suggested values  are
0.1 with profile analysis, 0.25 with no profile analysis.

     If  controlled precision measurement is being used (types  2
and 3), 3 further parameters are requested as explained under SD.
Care  should  be taken to give reasonable values  so  that  large
amounts  of  time  are  not spent measuring  for  little  return.
Suggested  values  are  240  secs  maximum  time,  0.01   desired
precision   i.e.  1%,  and  0.10,  i.e.  10%  minimum  acceptable
precision.

     If  peak top measurements are selected (types 4 and  5)  one
further  value is needed for the peak counting time.  A  suitable
value is 5 secs.

     If  peak top measurements with precision are selected (types
6  and  7)  3 values are needed as explained under SD.   Sensible
values  are  10000 maximum count, 1.0 second sample time  and  10
seconds maximum time.

Example:
 Command tp
 Time and Precision Parameters
 Type the Background fraction (0.1)

Crystal Alignment Commands

AL  ALign reflections and symmetry equivalents for MM

Prerequisites:   LA, Valid matrix

     Values of h,k,l are typed and equivalent reflections can  be
generated if wished. These and their Friedel equivalents will  be
centred  (see  CR) and the results stored on file for  subsequent
use with MM.

     This  command  is meant primarily to provide  the  data  for
accurate  cell  parameters at the end of a data  collection  run,
using suitable reflections found with the BI command.  Up to  200
equivalent    reflections,   counting   Friedel   and    symmetry
equivalents,  may  be stored in the h,k,l  lists.   It  is  often
useful  to  align  the  +  and    Friedel  equivalents  only,  to
establish   an   improved  orientation  matrix  prior   to   data
collection.  In this case choose not to use symmetry equivalents.
It  is  also possible to use 4 geometrically equivalent  settings
for  each  reflection in order to eliminate the  2q  and  c  zero
errors.  If AL is interrupted with K, the process stops when  the
current reflection centreing is finished.  It can be resumed with
AR.

Example:
 Command al
             Alignment   of   Symmetry  and  Friedel   Equivalent
Reflections

 The following   5 reflections are in the AL/RO list
  1.  10   0   0     2.   0  10   0     3.   0  16   0     4.  16
0   0
  5.   0   0  16
 The following options are available :
  U. Use the existing AL/RO list;
  A. Add reflections to the existing AL/RO list;
  D. Delete reflections from the existing AL/RO list;
  N. New AL/RO list.
  L. List the reflections in the existing AL/RO list;
  E. Exit
 Which option do you want (U) ? n
 Friedel equivalents are always used.
 Do you want symmetry equivalents as well (Y) ?
 Align 4 equivalent settings for each reflection (N) ?
 Type the space group symbol (P 4/M)
 Type h,k,l for up to 100 reflections
 h,k,l (End) 1,2,3
         1   2   3        2   1   3        1   2   3        2   1
3
 h,k,l (End) 3,2,1
         3   2   1        2   3   1        3   2   1        2   3
1
 h,k,l (End)
 The following   8 reflections are in the AL/RO list
  1.   1   2   3     2.   2   1   3     3.   1   2   3     4.   2
1   3
  5.   3   2   1     6.   2   3   1     7.   3   2   1     8.   2
3   1
 The following options are available :
  U. Use the existing AL/RO list;
  A. Add reflections to the existing AL/RO list;
  D. Delete reflections from the existing AL/RO list;
  N. New AL/RO list.
  L. List the reflections in the existing AL/RO list;
  E. Exit
 Which option do you want (U) ?

     At  this point the results of the reflection alignment  will
be output to the printer.

Starting Values   1   2   3    15.251    0.000   53.30    63.435
Final    Values                15.263  359.983   53.256   63.435
Starting Values   1   2   3    15.251    0.000  306.699  243.435
Final    Values                15.240  359.979  306.719  243.435
         ................................................
         ................................................
Starting Values   2   3   1    15.251    0.000  344.499  303.690
Final    Values                15.236    0.019  344.534  303.690


AR  Align Resumption after interruption

Prerequisite:   AL

     As  the  AL  command  can be rather time  consuming,  it  is
sometimes necessary to interrupt it and resume later.  AR  allows
this  to be done and the alignment process resumes exactly  where
it was interrupted with K.


A8   Align  the 8 equivalent settings of 1 reflection  for  angle
zeroes

     On  a 4 circle instrument any reflection can in principle be
set at the 8 positions

      1.  +2q   w      c      f       2.  +2q   w      c  180+f
      3.  +2q   w  180 c  180+f       4.  +2q   w  180+c      f
      5.   2q   w      c      f       6.   2q   w     -c  180+f
      7.   2q   w  180 c  180+f       8.   2q   w  180+c      f

     Once  the 8 settings have been centred, instrumental  zeroes
for  2q,  w and c are calculated, as well as crystal and detector
height  adjustments.  It  is best to  use  results  from  several
reflections and take the average values.

     In  practice  the  best  c value to choose  is  near  n*45ø.
However, on kappa geometry goniometers only  reflections  with  c
in  the range 80ø to 100ø. are accessible and these can be  found
with  the BC command.  On CAD 4 machines the instrument alignment
corrections  DET,  HOR, VER and MON (see the CAD  4  manual)  are
calculated and printed.

Example:
 Command a8
 8 Reflection Centring (Y) ?
   (The next 3 lines are for non CAD 4 machines only)
 Type the  2T,Om,Ch step size in 1/100th ( 4, 2,10)
 Type the count time per step in seconds (1.0)
 Type the max count cutoff fraction (0.5)
 Type h,k,l for reflections to be used (End)
 Next h,k,l (End) 2 0 0
 Next h,k,l (End)
 Is everything OK (Y) ?

   The  following  type of output appears on the screen  and  the
printer

Starting  values     1    1   12     24.582    357.229     97.466
359.819
     Final   values                  24.597    357.095     97.412
359.819    564
Starting  values     1    1   12    335.418    357.229     97.466
359.819
     Final   values                 335.409    357.105     97.360
359.819    575
Starting  values     1    1   12     24.582      2.771     82.534
179.819
     Final   values                  24.595      2.688     82.421
179.819    537
Starting  values     1    1   12    335.418      2.771     82.534
179.819
     Final   values                 335.386      2.690     82.357
179.819    502
Starting  values     1    1   12     24.582    352.525    272.747
90.179
     Final   values                  24.571    352.420    272.647
90.179    521
Starting  values     1    1   12    335.418    352.525    272.747
90.179
     Final   values                 335.370    352.429    272.573
90.179    548
Starting  values     1    1   12     24.582      7.475    267.253
269.821
     Final   values                  24.578      7.336    267.085
269.821    733
Starting  values     1    1   12    335.418      7.475    267.253
269.821
     Final   values                 335.373      7.360    267.167
269.821    721
Zero Values of TT,OM,CH     .015    .109    .122
Offsets: Det   .029mm, Hor   .021mm, Ver   .059mm, Mon   .016deg.
True 2Theta     Omega     Chi       Phi
     24.600     2.768    97.480      .000

CH  CHoose reflections from the PK list for use with M2 or M3

     Reflections may be selected from the list produced by PK, if
their  indices  are known, for use with M2 or  M3  to  derive  an
orientation matrix.

Example:
 Command ch
 Choose reflections from OC for M2 or M3 (Y) ?
 Sequence number in OC and indices
 Reflection  1  1 0 0  3
 Reflection  2  2 0 4  0
 Reflection  3  4 5 1  1


CR  Centre the Reflection which is already in the detector

     The reflection which is presently in the detector is centred
in  the  aperture.  It does not have to be an indexed  reflection
and so CR can be used at any time.

     The  centring  algorithm for Euler instruments searches  for
half  height on both sides of the peak as the circles are stepped
consecutively, retaining the counts for each step.  Once the half
heights  on  both sides are found, the centre of the distribution
of  counts is found as the "best" position.  Circles are adjusted
in  the  order w, 2q, c, w, 2q.  For precise work it is advisable
to  restrict  the  detector aperture with narrow  horizontal  and
vertical   slits.  For  initial  setup  normal   apertures   from
collimators are usually sufficient. The step size for each circle
can be set, with defaults of 4/100ø, 2/100ø and 10/100ø for 2q, w
and  c,  f  is held constant. Recommended setting for  TRICS  are
4,4,40 for the steps. The fraction to use as "half height" can be
input, as can the count time/step.  Defaults are 0.5 and 1 sec.

     If  the  peak  was  sensibly in the centre of  the  detector
aperture at the start of the centreing process, then usually only
a   few  steps  are  needed  in  each  direction  to  find   both
half  heights and hence the centre.  If the peak is displaced  so
that  it  lies  within 50 steps above or below  the  centre,  the
routine  detects this and finds the centre from one side  of  the
stepping process.  If the peak is at one of the extreme  ends  of
the +/ 50 step process, the routine adjusts the assumed centre to
the  appropriate end and repeats the process.  If no  significant
peak is found within +/ 50 steps, an error message is printed.

     For kappa instruments centring is achieved with a continuous
2q  scan  followed  by  scans with 45ø slits.   Again  there  are
safeguards  to  ensure  that badly displaced  peaks  are  brought
nearer to their "best" position, with a series of step scans  and
then the normal centring process is repeated.

     These  algorithms are used for all centring  operations  (AL
and A8).

Example:
 Command cr
           Centre the reflection already in the detector
 Is the reflection already set (Y) ?
 Type h,k,l for use in M2/M3  1 2 3

Starting Values    1    2    3   15.251    0.00   53.301   63.435
Final    Values                  15.243   0.008   53.256   63.435


LC  2q Least squares with symmetry Constrained cell

     The  unit  cell derived from the matrix produced  by  MM  is
necessarily triclinic, though hopefully it should agree with  any
known  symmetry, within the standard deviations.  LC is a command
to  use  only  the  2q values from the AL list  and  a  specified
crystal symmetry to produce the optimal unit cell consistent with
the  data  and  the  imposed symmetry.  (Note  the  non  standard
space group setting used below is accepted).

Example:-
 Command lc

          Constrained Cell Dimension Least Squares

 Type the space group symbol (P 4/m) P 2/m 1 1

Wavelength        .709320;          38 reflections.
                     Cell             Errors
       a            9.566021         .0002590
       b            9.930408         .0033505
       c            6.582347         .0003861
       Alpha      100.260            .0148
       Beta        90.000            .0000
       Gamma       90.000            .0000


MM    Matrix from Many reflections by least squares on AL data

     With  a  minimum of 4 reflections, preferably more, a matrix
can  be  calculated  with least squares,  and  a  unit  cell  and
standard  deviations derived.  The input data  is  usually  taken
from  the  list produced by AL, which can be edited and/or  added
to,  before  use. The data can also be typed in, though  this  is
very  tedious. Zero corrections are derived for w and  c.   These
should  be  close to zero if the values used in CZ are  accurate.
If they are  not then zeroes should be checked with A8, corrected
with CZ and MM run again.

Example:
 Command mm
       Least Squares Orientation Matrix (Y) ?
 Reflection data can be on file or from the terminal.
 Wavelength (0.70932)
 Read the data from the terminal (N) ?
 Reflections may be deleted or restored to the list by typing :
 h,k,l,1 for Delete  or  h,k,l,0 for Restore. CR = End.
 >
 Do you wish to insert reflections (N) ?

Omega(0)is   .008   from  19 reflections.
Chi(0)   is  .014   from   0 +/  pairs.
Select a number for the cell geometry to be used
Triclinic     1     Monoclinic   2
Orthorhombic  3     Tetragonal   4
Hexagonal     5     Rhombohedral 6    Cubic  7
Type your selection (2)

The following output appears on the printer

       Orientation   Matrix from   19 Reflections
      0.00050366    0.06722744    0.13259950
      0.10452530    0.00104539    0.00204850
      0.00185812    0.07713195    0.07905444

                      Observed                         Calculated
Angular
   h    k    l  2Theta Omega   Chi    Phi     2Theta Omega    Chi
Ph    Deviation
   0    3    0   12.50   .00  48.92 180.89     12.50   .00 311.08
180.89    0.012
   4    0    0   17.06   .00   1.02  89.72     17.06   .00 358.98
89.72    0.034

........................................................

........................................................
   1    2    2  14.44   .00  62.44  36.85     14.44   .00   97.56
36.85    0.027
   1    2    6   38.02   .00  43.35   7.76     38.02   .00 316.65
7.76    0.036

                         Real Cell
      a         b        c      alpha     beta    gamma
   9.56544   9.93189  6.58240  100.263   89.999   89.999
    .00038    .00129   .00024     .007     .003     .007

                      Reciprocal Cell
      a*        b*       c*     alpha*    beta*   gamma*
   .104543   .102323  .154390   79.737   90.002   90.001
   .000004   .000013  .000004     .007     .003     .007


M2  Matrix from 2 indexed reflections and a unit cell

     If  the unit cell is known, then the crystal orientation and
hence the matrix can be calculated from the angular settings of 2
indexed  reflections.  This can be useful if details of the  unit
cell  and some reflections are known from PK or any other source.
The reflection data can be typed in as h,k,l, w, c, f or selected
from the PK list with CH.

Example:
 Command m2
 Orientation Matrix from Cell + 2 Reflections (Y)
 Type the wavelength ( .70932)
 Type a,b,c,alpha,beta,gamma 9.5654 9.9319 6.5824 100.26 90 90
 Are angles to be typed (Y) ? n
 The two reflections being used are
    0   3   0   .000   48.923  180.892
    4   0   0   .000    1.019   89.725
 Do you wish to edit the reflection indices (Y) ? n
 Select a number for the cell geometry to be used
 Triclinic     1    Monoclinic   2
 Orthorhombic  3    Tetragonal   4
 Hexagonal     5    Rhombohedral 6    Cubic  7
 Type your selection (2) 2

The following output appears on the printer

      Orientation Matrix from M2
   0.00050312  0.06722458    0.13259660
   0.10452580  0.00104658    0.00204272
   0.00185683  0.07713310    0.07905647


M3    Matrix from 3 indexed reflections

     As for M2, a matrix can be calculated from the known indices
and setting angles for 3 reflections.  The reflection data can be
typed in as h,k,l, 2q, w, c, f or selected from the PK list  with
CH.

Example:
 Command m3
 Orientation Matrix from 3 Reflections (Y) ?
 Type the Wavelength (0.70932)
 Are the angles to be typed (N) ?
 The three reflections being used are
   0   3   0  12.501   0.000   48.923  180.892
   4   0   0  17.057   0.000    1.019   89.725
   1   1   5  31.594   0.001   38.164    8.890

The following output appears on the printer

       RIGHT handed Orientation Matrix from M3
    0.00050082  0.06722900     0.13259690
    0.10451990  0.00104665     0.00204341
    0.00185934  0.07713817     0.07906044

a*  .10454    b*  .10233  c* .15439  Alf*  79.741   Bet*   90.001
Gam*  90.002
a 9.56593   b 9.93121  c 6.58228  Alf  100.259  Bet   90.000  Gam
89.998

OC  Orient a Crystal i.e. index the peaks from PK

     This  command uses a modified version of Jacobsen's indexing
routine (Ames Lab. Report, IS 3469,1974) to find a cell which  is
consistent with all the reciprocal lattice vectors found  by  PK.
The  algorithm  searches for the triple of minimum  non  coplanar
vectors which will give essentially integer h,k,l values  to  all
the  input  vectors. The algorithm is extremely robust  and  will
always  produce  a  cell and orientation matrix  with  reasonable
data.   In  case  of difficulty the list from PK may  be  edited,
usually  to  remove  weak  reflections  which  maybe  arise  from
satellite  crystals, or other known peaks can be  added.   It  is
also  possible to read in sets of 2q, w, c, f from a file  called
REFL.DAT.

     As  with  all other indexing algorithms, the routine  cannot
overcome deficiencies in the data.  For example, if the data only
contains  reflections with h = 2n, then the  cell  produced  will
have a dimension a/2.

     The  cell produced is of course not necessarily the  reduced
cell,  though  it  often  is, and the routine  can  automatically
invoke  the  reduction algorithm (RC) and then reset the  crystal
(RS)  if necessary.  Once this is done, the routine automatically
invokes  the  MM least squares procedure to produce an  optimized
orientation  matrix and unit cell from the PK list  with  reduced
cell indexing.

Example:
 Command oc
 Index Reflections and derive an Orientation Matrix
 1) Index reflections in the list from PK
 2) List and edit the reflections
 3) Cancel

 Enter option (1) 2
 There are   39 peaks in the list
 (L) List the reflections;
 (D) Delete a reflection;
 (R) Reinsert a reflection;
 (A) Add a reflection;
 (F) Read reflections from a file;
 (E) Exit.
 Command (L,D,R,A,F,E) f
 Type the reflection file name (REFL.DAT)
 Subtract theta from the omega value (N) ?
  44 reflections have been read from REFL.DAT
 Command (L,D,R,A,F,E) e
 Do you want to index the reflections (Y) ?
 Error Limit = 0.10

 Cell Dimensions:
 a   6.916,  b   6.920,  c   6.901
 alpha 119.98,  beta 119.63,  gamma  60.10.   Volume =   234.37


   h   k   l       h   k   l       h   k   l       h   k   l
   1   1   0       1   1   0       0   1   2       0   1   2
   2   2   1       2   2   1       1   1   1       1   1   1
   1   2   0       1   2   0       1   0   2       2   0   0
   1   1   1       1   1   1       2   0   1       2   0   1
   1   1   1       1   1   1       0   0   2       2   2   0
   2   2   0       0   3   1       2   1   1       2   1   1
   1   1   2       3   1   0       3   1   0       1   2   1
   2   0   3       2   0   3       3   0   0       3   2   0
   3   2   0       2   1   2       2   1   2       3   1   3
   1   2   2       2   2   0       1   2   3       0   1   4
   4   4   2       4   4   2       2   4   0       2   2   2

 Orientation Matrix:
  0.044395  0.123749  0.155932
  0.167463  0.074546  0.002795
  0.033644  0.102249  0.083725

      Cell Reduction Step

Type the Allowable Tolerance on True Cell Angles (0.1deg)
Lattice Type (P) ?

Input  Cell:    6.916      6.920      6.901    119.977    119.632
60.102
            Lattice Type P

 The Shortest Non coplanar Translations
                6.901      6.913      6.916     90.309    119.632
119.875
 The Old to New Cell Matrix
             0.0   0.0   1.0
             0.0   1.0   1.0
             1.0   0.0   0.0

               Possible 2 fold Axes:
              Rows                    Products         Kind
       Direct      Reciprocal       Dot    Vector    of Axis
     1   1   0     1   1   1         2     0.145         2
     1   0   1     1   1   1         2     0.180         2
     0   1   1     0   1   1         2     0.223         4
     0   1   1     1   1   1         2     0.231         4
     0   1   0     1   2   0         2     0.309         2
     2   1   1     1   0   0         2     0.319         4
     1   0   0     2   1   1         2     0.345         2
     1   1   1     0   1   1         2     0.360         2
     0   0   1     1   0   2         2     0.444         2
     2   1   3     0   0   1         3     0.117         3
     2   1   1     1   1   0         3     0.155         3
     2   1   1     1   0   1         3     0.086         3
     2   3   1     0   1   0         3     0.060         3

  # 1          Pseudo        Cubic F    Max Delta     0.444
  a      1.0  1.0  1.0    9.8055  Alpha     90.025  a*      0.000
 0.500   0.500
  b      1.0  1.0  1.0    9.8044  Beta      89.770  b*      0.500
 0.500   0.000
  c      1.0  1.0  1.0    9.7516  Gamma     90.222  c*      0.500
0.000   0.500
  # 2          Pseudo    Hexagonal R    Max Delta     0.345
  a      0.0  1.0  0.0    6.9197  Alpha     90.249  a*      0.667
 1.000   1.000
  b      0.0  1.0  1.0    6.9126  Beta      90.088  b*      0.333
0.000   1.000
  c      3.0  1.0  1.0   16.9989  Gamma    120.148  c*      0.333
0.000   0.000
  # 3          Pseudo   Tetragonal I    Max Delta     0.319
       ..........................................................
       ..........................................................
  # 7      Metrically    Triclinic P    Max Delta     0.000
  a      0.0  0.0  1.0    6.9007  Alpha     90.309  a*      0.000
 1.000   1.000
  b      0.0  1.0  1.0    6.9126  Beta     119.632  b*      0.000
 1.000   0.000
  c      1.0  0.0  0.0    6.9157  Gamma    119.875  c*      1.000
0.000   0.000

     These  transformations are also output to  the  printer  for
checking before answering the following question,

 Which transformation do you wish to use (1) ? 2

     The data is then submitted to least squares with output sent
to the printer as described under MM.  The question

 Do you want to replace the old matrix with this new matrix (N) ?
y

allows the user to :

a. retain the existing matrix, in which case no further action is
taken, or
b.  accept the new matrix, in which case the following appears on
the terminal

 Space group choices are as follows :
 1. The safest space group based on cell reduction R  3
 2. The safest space group based on cell lengths   P  1
 3. Any other space group.
 Which do you want (1)

PK  PeaK search in 2q, c, f  for use with OC

     This  is  the normal and simplest way to orient  an  unknown
crystal.  Ranges of 2q and c are given, together with step sizes,
and  the diffractometer then rotates f through 180ø at each  step
as  it  searches through the c and 2q ranges, until the specified
number of peaks have been found and centred, or the search  range
is  exhausted.  The reason for searching only 180ø  in  f  is  an
attempt  to  maximize the c range for crystals  with  large  unit
cells,  when  many reflections may be found quickly in  a  narrow
range.  No reflections will be missed, but if the c range extends
equally  in both directions about zero with 360ø scans, both  the
+h,+k,+l and  h, k, l equivalents would be found.

     This  command,  with all the accompanying centring,  can  be
quite  lengthy and it is therefore best not to ask for  too  many
peaks.  The PK command goes directly into an OC procedure and  10
  15 peaks are usually sufficient for unambiguous operation.  The
command  can  be  interrupted with K and, if  necessary,  resumed
again with PK, indicating that it is not a new search.

At TRICS it is recommended to use at least 15 degrees as step for
chi as peaks can be 10-15 degrees wide in chi at TRICS.

Example:
 Command pk

  Routine to Search for Reflection Positions

 Is this a new search (Y) ?
 2 theta search: min, max, step (10,30,4) 15,31,4
 Chi search (allowed range  90 to +90)
 min, max, step ( 50,50,10)
 How many peaks do you want to find (20) ?
 Is everything OK (Y) ?

   The  following  output  of  coarse positions  appears  on  the
terminal and printer

            2Theta      Omega        Chi        Phi       INT
       1     15.00        .00      320.00      73.00      779.
       2     15.00        .00         .00      85.00      310.
           ...........................................
           ...........................................
      18     31.00        .00       40.00      35.00      165
      19     31.00        .00       40.00       5.00       42

  19 new peaks were found before the end of the search

     The  routine  then  centres these peaks accurately  and  the
following  output appears on the printer only.  The fifth  number
on the Final Values line is the intensity for a 1 second count at
the  peak  position   These values including  the  intensity  are
stored for submission to MM or LC.

Peak   1 Coarse Setting     14.999      .002   320.001    73.000
         Approximate        14.818      .092   320.549    72.920
          Final Values       14.816      .085   320.571    72.920
7829

............................................................

............................................................
Peak  19 Coarse Setting     30.999      .001    40.001     5.000
         Approximate        30.750      .126    40.683     3.860
          Final Values       30.730      .164    40.735   356.140
353


RC  Reduce a unit Cell

     Cells from LC, M3, MM, OM or OC, can be reduced [Le Page Y.,
J. Appl.Cryst. (1982), 12, 255] using an algorithm to find 2 fold
axes.   It  does this by imposing artificial 2 fold axes  on  the
reciprocal lattice, in all non redundant directions with  indices
less  than  3.   If  the new lattice points  generated  by  these
imposed 2 fold axes coincide, within a tolerance, with points  on
the  original lattice, then the direction is at least a  possible
metric  2 fold axis.  The results of this process, i.e. a set  of
possible 2 fold axes, are analysed, both in terms of the original
symmetry and in terms of possible distributions of 2 fold axes in
all  allowable symmetries. Any additional symmetry is  noted  and
the necessary transforms printed.

     This  is  an extremely robust algorithm and has never  (yet)
been  known  to  fail.   If  the  input  cell  is  in  some   way
non  primitive the routine cannot, of course, account  for  this,
e.g.  an  axis was given at half its true length.  If the routine
detects several possible unit cells with increasing symmetry, the
user  is  allowed  to  choose one to reset the  cell  and  matrix
correspondingly and re index the reflections in the list.

Example:
 Command rc
 Type the Allowable Tolerance on True Cell Angles (0.1deg)
 Lattice Type (P) ?

     The  screen  and printer output are identical  to  the  cell
reduction stage of the OC command


RP  Rotate f 360, centre and save any peaks found

     This  command, which is really the basis of the  PK  search,
rotates f 360ø in 1.8ø steps and then detects the peaks found, if
any.   It  then  does a coarse centring of each, as  the  initial
value of f can be very imprecise, followed by a fine centreing as
in CR.  This command has been largely superseded by PK.


RS   ReSet  the cell and matrix with the results from RC (similar
to TO)

Prerequisite:   RC

     The  cell and matrix can be reset manually using the results
from  RC, but a simpler and safer way to do this is to rerun  OC,
automatically run RC and choose the correct transformation.

Example:
 Command rs
 Reindex 3 Reflections (Y) ?
 Reflection  1. Type OLD indices then NEW indices 0 0  1 1 0 0
   0   0   1   6.28   .00   30.80  179.12     New indices  1    0
0
 Reflection  2. Type OLD indices then NEW indices 1 0 0 0 1 0
   1   0   0   4.25   .00  358.98   89.72     New indices  0    1
0
 Reflection  3. Type OLD indices then NEW indices 0  1 0 0 0 1
   0   1   0   4.16   .00  311.08  180.89     New indices  0    0
1
 Type the Wavelength ( .70932)

The new matrix and cell are output to the printer.

Intensity Data Collection Commands

GO  Start of intensity data collection

    Pre requisites:  CZ LA RO PS RR SD (SG) SW TM TP
                     Orientation matrix from MM(AL) M2 M3 or OC

     This  command  starts,  or resumes,  data  collection  using
parameters given under the pre requisite commands to control  the
measurement  conditions. If the space group has  not  been  given
under  SG,  it is asked for. The user is queried about  measuring
any   translation  element absences from screws and  glides,  and
lattice  mode absences, if any.  It is probably good practice  to
measure the former for later checking, but not the latter.

     If  data  collection is being resumed after an interruption,
the  routine  checks  to  see whether  an  automatic  restart  is
possible,  i.e. no parameters have been changed.  If so  it  then
asks whether the user wishes to restart automatically.

                         DH Matrices

     The   sequence   in  which  reflections  are  generated   is
controlled  by  a set of so called DH matrices.   These  are  3x3
matrices  which  describe  segments  of  reciprocal  space  which
comprise the unique data set.  They are described in Le Page Y. &
Gabe E.J., J. Appl. Cryst. (1979), 12, 464.

     The basic idea is that the segment or segments of reciprocal
space  which  form the unique set are described by  3x3  matrices
which  specify  the segment edges, plus a vector to  specify  the
segment origin.  Thus, the matrix 1,0,0 / 0,1,0 / 0,0,1 describes
the  segment with edges a*, b* and c*.  These matrix  and  vector
pairs  can  be transformed by the symmetry matrices  to  generate
equivalent  segments for further data sets.   There  are  several
advantages to this approach.

     Firstly, reflections can be generated within any segment  by
simple  unit  increments  on a three dimensional  grid  and  then
transformed  to  the  true  indices  with  the  DH  matrix.   The
monoclinic system provides a good illustration.  Two matrices and
origin vectors are needed to describe the complete unique set

        1, 0, 0 / 0, 1, 0 / 0, 0, 1      0, 0, 0  (for +h,+k,+l)
        1, 0, 0 / 0, 1, 0 / 0, 0, 1      1, 0, 1  (for +h,+k, l)

On  the  unit grid, the triple 1,2,3 is transformed by the  first
pair as but with the second pair it is transformed as

A  second example in the cubic Laue group m3m where there is only
one matrix/origin pair

            1, 0, 0 / 1, 1, 0 / 1, 1, 1      0, 0, 0

shows that in this case the same triple 1,2,3 transforms as

     Thus   the  same  indexing  scheme  can  be  used  for   all
space groups.

     A   second  advantage  is  that  the  order  in  which   the
reflections  are generated can be changed easily by swapping  the
rows of the DH matrix without changing the basic index generating
scheme.  The matrix

                   1, 0, 0 / 0, 1, 0 / 0, 0, 1

implies  that the segment of reciprocal space bounded  by  the  3
reciprocal  axes a*, b* and c* forms the segment of  data  to  be
collected  and  the order of data collection is h slowest  and  l
fastest.  It may happen, because there is a short reciprocal axis
for example, that it is more economical in time to increment that
axis  fastest, in which case the matrix may be typed in the order
required,  e.g. if b* is shortest and c* longest, the appropriate
DH matrix is

                   0, 0, 1 / 1, 0, 0 / 0, 1, 0

which  would  generate reflections, within the 2q limit,  in  the
order  0,0,0 to 0,kmax,0, then 1,kmax,0 to 1,0,0, then  2,0,0  to
2,kmax,0 etc, until all the h,k,0 rflections have been collected.
The  process then starts again at the 0,0,1 reflection, and  then
0,0,2 etc until all +h,+k,+l reflections have been collected.

     A  third  advantage is that the unique portion of reciprocal
space  to  be  measured  is  specified  exactly,  i.e.  with   no
repetition  of reflections.  The monoclinic example  above  shows
that  the  reflections  hk0 and 0kl are generated  in  the  first
segment,  but  the reflections  hk0 and 0kl are  avoided  in  the
second by specifying the origin as  1,0,1.
 

The  origin vectors and DH matrices which will measure the unique
set for all
Laue groups are as follows.

         Laue     Origin                DH Matrix

          1      0  0  0      1  0  0    0  1  0    0  0  1
                 1  0  1      1  0  0    0  1  0    0  0  1
                 1  1  0      1  0  0    0  1  0    0  0  1
                 0  1  1      1  0  0    0  1  0    0  0  1

        2/m      0  0  0      1  0  0    0  1  0    0  0  1
                 1  0  1      1  0  0    0  1  0    0  0  1

        mmm      0  0  0      1  0  0    0  1  0    0  0  1

        4/m      0  0  0      1  0  0    1  1  0    0  0  1
                 1  2  0      0  1  0    1  1  0    0  0  1

       4/mmm     0  0  0      1  0  0    1  1  0    0  0  1

        R 3      0  0  0      1  0  0    1  0  1    1  1  1
                 1  1  0      1  0  1    0  0  1    1  1  1
                 0  1  2      1  0  0    1  0  1    1  1  1
                 1  0  2      1  0  1    0  0  1    1  1  1

       R 3m      0  0  0      1  0  0    1  0  1    1  1  1
                 1  1  0      1  0  1    0  0  1    1  1  1

         3       0  0  0      1  0  0    1  1  0    0  0  1
                 1  2  0      1  1  0    0  1  0    0  0  1
                 0  1  1      0  1  0    1  1  0    0  0  1

        31m      0  0  0      1  0  0    1  1  0    0  0  1
                 0  1  1      0  1  0    1  1  0    0  0  1

        3m1      0  0  0      1  0  0    1  1  0    0  0  1
                 1  1  1      0  0  1    1  0  0    0  0  1

        6/m      0  0  0      1  0  0    1  1  0    0  0  1
                 1  2  0      0  1  0    1  1  0    0  0  1

       6/mmm     0  0  0      1  0  0    1  1  0    0  0  1

        m3       0  0  0      1  0  0    1  1  0    1  1  1
                 1  2  0      0  1  0    1  1  0    1  1  1

        m3m      0  0  0      1  0  0    1  1  0    1  1  1


     Having  measured  a unique set the routine  will  go  on  to
measure  equivalent sets if allowed to.  These sets are generated
in  the  order set 1, then the Friedel related set  1,  then  the
first  equivalent set 2, then set  2, etc until the whole  sphere
is measured.

     This  is  all  transparent to the user with the  SG  and  GO
commands, and measurement can safely be interrupted and restarted
automatically.

     Data  collection always starts with the collection of a  set
of  reference reflections, which are printed to hard copy,  along
with  details of when they were taken.  Reflections are generated
and  measured  according to the sequence  controlled  by  the  DH
matrices.   Reference reflections are also taken and  printed  at
the  start  and  end of each segment.  Unique sets  of  data  are
numbered sequentially 1, 2, 3 etc. with Friedel sets numbered  1,
  2,   3  etc.  Thus in the monoclinic case with two DH  matrices
(segments) the numbering scheme would be

      1. Set 1, segments 1 and 2;    2. Set  1, segments 1 and 2;
      3. Set 2, segments 1 and 2;    4. Set  2, segments 1 and 2.

     This  would  then have measured the whole of the  reciprocal
sphere,  if  allowed  to proceed that far.  The  process  can  be
interrupted at any point with K or Q.  During data collection all
reflection profiles are displayed on the screen, with the results
of profile analysis if selected, plus a short printout of results
on the screen.

                    Data Collection Output

     Reflection  results  can  be  printed  to  hard  copy  using
switches  4  and 5 (see the SW command).  Switch 4  is  used  for
normal  reflections and switch 5 for reference reflections.   The
default is to print both.

  Printout during data collection is as follows :

At the start of each set of measurements a printer message gives

        h k l   Reflection   Set   Segment   Record,   where

    h k l       is the next normal reflection to be measured,
    Reflection  is the sequence number of the reflection,
    Set         is the number of the present set,
    Segment     is the number of the present segment,
    Record      is the record number on the .ID file.


For non reference reflection measurements (Printer SW4 = 0)

   On terminal (and printer)   h k l   Inet   s(Inet)
      if   Inet < 2*s(Inet)    h k l   Inet   s(Inet) **

For reference reflection measurements (Printer SW5 = 0)

   Terminal output is
        h k l  Peak  s(Peak)  N,    where
      N is the reference reflection number.

     Profile analysis is never done on the reference reflections,
though the profile is displayed, and all values are based on  the
background time fraction given in TP.  Reference reflections  are
taken at the start and end of each segment and at intervals of  N
reflections, as specified in RR.
For normal scan modes printer output is:

     N  h k l  2q  Scan time  Natt  b1  Peak  b2  Inet,  where
   N           is the reference reflection number,
   Scan time   is the time for the scan in seconds,
   Natt        is the attenuator index (normally 0),
     b1,Peak,b2   low  angle  background,  peak  and  high  angle
background for the
               parameters given in TP and SD
    Inet        is the net count, including any attenuator factor
which puts all
                measurements of the same reflection on a constant
scale to
               facilitate comparison.

For controlled precision modes printer output is:

      N   h  k  l   2q  Nscans  Natt  b1  Peak  b2  Inet s(Inet),
where
   Nscans      is the number of scans done,
    Inet         is  the  net  count, including  attenuation  and
normalized
               to 1 scan.

     There  are  also  other messages which will appear  only  if
there  are  angle  setting or scan collisions, or  problems  with
timing.   The routine should be able to detect these and continue
its normal sequence.


               Profile Analysis During Data Collection

     Profile analysis, if requested, is only done for peaks  with
Inet  > 2*s(Inet), based on minimum background measurements  from
TP  (usually 0.1 of the scan time). Profiles are taken  at  0.01ø
steps  of the scan and the analysis is done on a smoothed profile
to  minimize random statistical fluctuations.  If the  number  of
the  intensity weighted maximum smoothed profile point (MaxI)  is
more  than  a  movement tolerance away from  the  number  of  the
calculated  a1  point  (MaxA)  and  Inet  >  5*s(Inet)  then  the
following appears on the printer

                 h  k  l   MaxI   MaxA   b1    Peak    b2

no  profile analysis is done and the measurement is repeated once
more.   If the same thing happens a second time, results with  no
profile analysis are used.
This can occur for two reasons,

 1.  the reflection is weak and random statistics are the cause,
 2.  the crystal has moved and most measurements show this error.
In this case
     the crystal should be reoriented.

    The  movement  tolerance value is based  on  the  scan  width
parameters and is

            TOL = 100*(As + Cs)/8         where

        100 is the number of profile points/deg. of scan,
        As  is the angular scan width before a1, and
        Cs  is the angular scan width after a2.

     Thus  if  As = Cs = 1, the tolerance is 0.25ø or 25  profile
points.  This can be augmented by 20, 10 or 5 points with the  SW
command using switches 6, 7 and 8, to give a maximum of 35  extra
points, i.e. 0.35ø of scan.

     The  profile display is useful for monitoring the  stability
of the crystal, both for mechanical movement and deterioration.

     Profiles may be saved in compressed form on the binary  file
PROFL7.DAT  by setting switch 9.  This file will tend  to  become
rather  large and normally this option is not selected.   Records
in  the PROFL7.DAT file are 128 bytes long (32 4 byte variables).
Variables  are  4  bytes except for profile points  which  are  2
bytes.

For each reflection the records are as follows

Record  1  h,k,l, Npts, Ilow, Ihigh, Frac, Ib1, Icount,  Ib2,  44
profile pts,
 where
   Npts     is  the  number  of profile points  (+  1000*Nstd  if
reference reflection),
   Ilow    is the profile point number at low angle cutoff (1  if
no analysis)
   Ihigh   is the profile point number at high angle cutoff (Npts
if no analysis)
   Frac    is the ratio 1 bkgd time/peak time (usually 0.1 if  no
analysis)
  Ib1     is the low angle background for time Frac
  Icount  is the total count for all points
  Ib2     is the high angle background for time Frac
  Ipts    are 44 profile points, as Value   32000.

Records 2 to Nrecs   64 profile points,  where
  Nrecs   is (Npts + 20 + 63)/64

PROFL7.DAT can be transformed into an ASCII file with the command
AP.  The file produced has the default name of PROFL7.ASC and the
following format for each reflection
   h,k,l, Npts, Ilow, Ihigh, Frac, Ib1, Icount, Ib2
  ( 3I4,         3I5,        F8.5,  I6,   I7,    I6)
   (Npts + 9)/10 lines of up to 10 profile points (10I6).


               Intensity Data on the IDATA.DA file

     Intensity data is written to the file IDATA.DA, starting  at
record 20 in the following format.

  10 reflections per record as
       10 values of 1000*(h + 500) + k + 500
        "   "    "  1000*(l + 500) + Ia (attenuator #)
         "    "     "   Low angle background  (after any  profile
analysis)
         "    "     "   Peak count            (after any  profile
analysis)
         "    "     "   High angle background (after any  profile
analysis)
        "   "    "  10*speed + background time fraction
        "   "    "  Reflection sequence #
        "   "    "  y (999 if reference reflection)

     The intensity data on the direct access IDATA.DA file can be
also  converted, with the command AI, into a formatted ASCII file
suitable for transmission to, or processing by, other systems.

  The contents and format of the ASCII file are :
       h,k,l, Ia, Ib1, Ipeak, Ib2, Time, Nref, Ipsi
     (   3I4, I2,  I6,    I7,  I6, F9.5,   I6,   I5),    where
   Ia    is the attenuator index  (0 to 5),
   Ib1   is the low angle background,
   Ipeak is the total peak count,
   Ib2   is the high angle background,
   Time  is (time for 1 background) / (Time for peak), i.e.
             FRAC for normal scans, or
              10*number of scans + FRAC for controlled  precision
modes,
   Nref  is the reflection sequence number,
   Ipsi  is the y value, usually 0, 999 for standards.

Example:
 Command go
 Start Data Collection (Y) ?
 Type the space group symbol P 41
 Do you wish to change the order of data collection (N) ?
 Start at Reflection 1, Segment 1, Set 1, Record 20 (Y) ?
 Measure the Translation element absences (Y) ?
 Is everything OK (Y) ?


K   Kill operation at the end of the current reflection

     During lengthy operations it is essential to have some means
of  interrupting the procedure.  This is achieved by  making  the
routine  recognize unsolicited keyboard input at critical  points
during execution.  If the K key is struck during AL, GO or IE for
example, the program sequence will be interrupted at the  end  of
the  operation on the current reflection and control returned  to
the keyboard monitor.


Q   Quit after the next set of reference reflections

     As  for K, but the return to the keyboard  monitor is  after
the next set of reference reflections during the GO command.

     For  both  K  and  Q,  information is  saved  to  allow  the
interrupted operations (GO or AL) to be resumed automatically  if
no changes are made to the control parameters for the operation.


LR   Last Reflection written to IDATA.DA

     Each time a record of 10 reflections is written to IDATA.DA,
the current reflection, set and segment numbers and record number
are written to record 10.  This information can be recovered with
LR.
     
               Restarting Data Collection after a Crash

     Occasionally,  due  to  a machine or  power  failure  it  is
necessary to restart data collection completely from scratch.  At
such  times the information for a restart has not been saved  and
it  is  necessary  to recover it from the printout  and  IDATA.DA
file.

     The important things to know about restarting are :

       h,k,l of the first refln to be collected,
       the set and segment numbers of that reflection,
        the record number in the IDATA.DA file where the new data
is to start,
        the  number of the first reflection, though this  is  not
essential.

     It  is  safest  to  always  have  the  reference  reflection
printing  turned  on  (SW5=1),  as  it  shows  the  next   h,k,l,
reflection number, set number, segment number, and record  number
before  each set of reference measurements.  The set and  segment
numbers are also printed at the start of each segment.

     To restart the collection there are three choices.

   a. Restart at the last set of standards, which is simple but a
bit wasteful.

  b. Use  PD/1  to  search  for the last valid  intensity  record
     written.  As explained above, data is written 10 reflections
     per  record, therefore assuming reference measurements  were
     taken  after  every 100 reflections at the most  10  records
     will  need to be printed to find how far the data collection
     had progressed beyond the last set of reference reflections.
     The  h,k,l  sequence can be followed down the records  until
     there  is  a discontinuity between 2 records.  This  happens
     because the same file is used for all data collections,  and
     data  from  previous collections are probably on  the  file.
     This  means that data up to record n on the file is for  the
     present  crystal, but the data in record n+1 is from another
     crystal.   The  last  reflection in record  n  is  the  last
     reflection saved together with its reflection number.  Using
     this  information and the set and segment numbers  from  the
     last reference reflection print, the restart is at

        Next h,k,l, reflection-number+1, set and segment numbers,
record n+1

  c. Use the LR command to find the required information which is
     written  each  time a record of intensity data  is  written,
     i.e. every 10 reflections.

Angle Setting and Intensity Measurement Commands

GS  Grid Search measurement in 2q/w/c

     The  intensity  of  a  single  reflection  or  a  region  of
reciprocal  space can be measured in small steps  on  an  angular
grid  and output to the printer as a field of numbers.  This  can
be  very  useful  in trying to deal with poor or split  crystals,
before data collection is started.

Example:
 Command gs
 Sample an Angular Grid (Y) ?
 Type the grid specs.
 A response of  is interpreted as no variation of that axis.
 Type start, end & step for 2THETA 16.2,18.0,.2
 Type start, end & step for  OMEGA  .5,.4,.1
 Type start, end & step for    CHI
 Counting time per step (1 sec)

  2THETA ACROSS page, from  16.200  in 10 steps,  to 18.000
   OMEGA   DOWN page, from 359.500  in 10 steps,  to  0.400

    17     5     7    12    22    14    18     9     8    10
    15    11    11    16    25    25    21    13    15    15
    13    11    10    23    20    22    43    20    13    13
    11    13    16    26    44   165  1179   327    44    20
    16    15    17    53   153  1309  1809   985   111    56
    13    17    31  1881   405  1945  1140   249    58    36
    11    23    57  1005  1837  1048   257    73    32    23
     3    10    15    65   584   209    49    34    12    11
    14     8    11    13    34    28    29    21    11    12
    10    10    13    11    20    17    14    16    16    12


IE  Intensity measurement for Equivalent reflections

Prerequisites: LA PS SD (SG) TM TP and a valid  Matrix

     Similar  to  IR, but as the reflections are  typed  in,  all
equivalent h,k,l values other than Friedel equivalents, are added
to  the  list  and  subsequently each one is measured  using  the
current  measurement  parameters.  This command  is  particularly
useful for checking Laue group symmetry before data collection is
started,  and  also to examine the reflection  profile  shape  in
different directions.

Example:
 Command ie
 Intensity Measurements for Equivalent Reflections (Y) ?
 Type the space group symbol (P  1) p 41
 Type h,k,l for up to 50 reflections. CR = End.
 Next h,k,l (End) 1,2,3
       1    2   3        2   1   3        1   2   3        2    1 3
 Next h,k,l (End)

  Output is as for IR below.


IM   Intensity  Measurement of the reflection  which  is  in  the
detector

Prerequisites: SD TP

     Occasionally during initial set up it is useful  to  measure
the  reflection which is set, without knowing its indices.   This
command  does  this  using  the current  measurement  conditions,
except  that  no  y rotation is possible.  Values  of  h,k,l  are
requested, but are only used as a label.  Again, output is as for
IR below.


IP  Intensity measurement in Psi steps for empirical absorption

Prerequisites: LA SD TM TP and a valid  Matrix

     This  is  a  command with the specific purpose of writing  a
file  (CURVES.DAT)  of  intensity  measurements  for  a  set   of
reflections, each of which is measured 37 times in 10ø steps of y
from 0ø to 360ø.  The same restrictions on y apply as for A8 with
Kappa  geometry goniometers, i.e. only reflections with c in  the
range  80ø to 100ø may be used, and these can be found  with  BC.
For Euler geometry goniometers, there are mechanical restrictions
as c approaches 0ø, but they are much less severe.

The contents and format of the CURVES.DAT file is

Lines   1 to  3   Orientation matrix   (3(1X,3F10.6/))
Lines    4 to 40   37 lines of data for 1st reflection in  10ø  y
steps
                  h,k,l, 2q, w, c, f, y, Inet  (3I4,5F8.2,I8)
Lines  41 to 77   Same for 2nd reflection etc.

Example:
 Command ip
 Collect Psi scan data
 Do you want to write data to CURVES.DAT (Y) ?
 Type h,k,l for up to 50 reflections. CR = End.
 Next h,k,l (End) 1,2,3
 Next h,k,l (End)


IR  Intensity measurement for specifed Reflections

Prerequisites: LA PS SD (SG) TM TP and a valid Matrix

     Reflections  from a list of up to 100 sets of  h,k,l  values
can  be measured according to the current measurement parameters.
If  a  range  of  y  values  has been  specified  with  PS,  each
reflection is measured as many times as possible over that range.
Reflections  which  are  considered  to  be  systematic  absences
according  to the space group specified in SG can be measured  or
not,  at the user's discretion.  If no space group has been given
it is asked for.

     Output is h,k,l, 2q, Frac, Natt, B1, Peak, B2, y, Inet

where   Frac    is (Time for 1 background / Time for peak),
        B1, B2  are the backgrounds after profile analysis,
        Inet    is the net count after profile analysis.

Example:
 Command ir
 Intensity Measurements for Individual Reflections
  Type h,k,l and +/  2Theta sense (+) for up to 50 reflections CR
= End
 Next h,k,l (End)  1  1 12
 Next h,k,l (End)

   1   1  12  24.58   .345 0   51   2891   51    .00   2740


LP  Line Profile plot on the printer

     This command performs a step scan of a specified reflection,
for  a specified number of steps of given size, for a given angle
and  produces a normalized plot on the printer.  This should  not
be  confused with the normal terminal profile display which  uses
the current measurement conditions.

Example:
 Command lp
 Plot a Line Profile on the Printer (Y) ?
 Scan type: Theta/2Theta or Omega, 0 or 1
 Type the no. of pts before & after the peak, 500 max. 10,10
 Type the step size in deg. and the count time/step in secs .1,1


SA  Set All angles to specified values

     This  command provides a means of setting the instrument  to
specified   angles  which  are  not  necessarily  those   for   a
reflection.


SC  Set c to the specified value

SO  Set w to the specified value


SP  Set f to the specified value


SR  Set Reflection: h,k,l,

Prerequisites: LA SD (SG) TM TP and a valid Matrix

     The  reflection  specified is set at the y  value  requested
(default 0ø), provided it is within the current limits set by  TM
and  is  not  a systematic absence according to the  space  group
specified in SG.  Fractional values of h,k,l are allowed.


ST  Set 2q to the specified value

TC  Timed Counts

     This is the command for taking either
  a. a single stationary timed count with a given attenuator; or
  b. a  series of such counts to check the stability of the x ray
     generator and counting system.

     The  command  asks for the option to be used  and  then  the
count time in seconds and an attenuator index (default 0).

     If the second option is chosen an initial count of 100 times
the  input  time is taken in order to establish a  reliable  mean
count,  then counts are taken repeatedly for the input  time  and
printed,  10  per line, as the deviation from the  mean  together
with one of the following
           blank    if  the  deviation  is  within  1  s  of  the
mean count, or
           A     if between 1 and 2 s,
           B     if between 2 and 3 s and
           C     if more than 3 s.
At  the  end of 50 such lines (500 counts), a summary is  printed
showing  the observed and theoretical distribution of deviations.
This process will continue until stopped by the K command.

Example:
 Command tc
 Timed Count at a Point (Y) ?
 Type the Count Time in seconds 1
 Do you wish to repeat the counting for a stability test (Y) ? n
 Time    1.000, Count 115909.
 Do you want to repeat the procedure (N) ?

     When  repeated  counting  is done,  output  similar  to  the
following will appear on the printer.

     A  count  is  taken for 50.00 secs to establish a reasonable
mean.   Counts  are  then repeated 500 times  and  a  statistical
summary printed.

Time  0.50, Mean Count 12429.  Sigma(Mean)   111.5
The  deviations from the Mean Count are printed followed by A,  B
or C, if the
deviation is more than 1, 2 or 3 Sigma(Mean).

   101     4    27   113A   75    79    15    40    43   110
       ................................................
       ................................................
  125A    86   154A   63   222A   20    75   109    30    73

     Distribution of Counts   Observed     Theoretical
        .GT.  0.674*Sigma       49.2%         50.0%
        .GT.  1.000*Sigma       30.0%         31.7%
        .GT.  2.000*Sigma        5.0%          4.6%
        .GT.  3.000*Sigma        0.4%          0.3%


ZE  ZEro the instrument angles

     This  command sets all angles to 0ø or initiates a  seek  of
zero  marking  switches.  The order and timing of  axis  movement
depends on the particular goniometer.

Photograph Setup Commands

     The  mechanical  setup  required to  take  photographs  will
depend  on  the particular diffractometer in use.  The photograph
commands  merely provide a means of turning the  crystal  to  the
required orientation.


PL  Photograph in the Laue mode

Prerequisite:   Valid Matrix

     A specified direction h,k,l is set along the direct beam and
the  shutter  opened for a specified time with no circles  moving
during exposure. It is not very useful to attempt to take a  Laue
photo on machines with a monochromator.

Example:
 Command pl
 Set for a Laue Pattern along a given row (Y) ?
 Type the indices of the row 1,2,3
 The setting is NOT feasible
 Command pl
 Set for a Laue Pattern along a given row (Y) ?
 Type the indices of the row 3,2,1
  Setting  angles  for  row  3   2    1   0.000   15.501   90.000
123.690
 Set it (Y) ?


PO  Photograph in the Oscillation mode

     A  specified real cell direction is set vertically and w  is
rotated through a given, usually small, range a specified  number
of times.

Example:
 Command po
 Oscillation Picture (Y) ?
 Type the omega scan limits  5,5
 Type the time to perform 1 scan in minutes 1
 Type the number of repeats (1) 4


PR  Photograph in the Rotation mode

     A  specified  real  cell direction is set vertically  and  w
rotated through a given, usually large, range once only.

Example:
 Command pr
 Set a Direct Lattice Row upwards along the Omega Rotation Axis
 Confirm (Y)
 Type the indices of the row  0  1  0
 The Periodicity for a Primitive Lattice is   9.932 Angstroms
 Type the Crystal to Film Distance in mm 200
 Separation in mm between the + and   nth levels

       1      28.6
       2      57.7
       3      87.7
       4     119.2
       5     152.9
       6     189.7
       7     230.9
       8     278.5
       9     335.6
   Setting angles    .000     .000   149.178    1.430

General System Commands

AH   Angles to H, k, l

     The h, k, l values associated with a set of Euler angles are
calculated and printed as fractional values.

Example:
 Command ah
 Calculate Reciprocal Coordinates
 Type the reflection angles (End)  12,0,50,45
     Reciprocal Coordinates (h,k,l)     1.340     1.340     2.258
 Type the reflection angles (End)


AI  Ascii Intensity data file conversion

     Intensity  data on the binary file IDATA.DA is converted  to
ASCII  and  written  to  a  file,  which  has  the  default  name
IDATA.ASC, in the format described under GO.


AP  Ascii Profile data file conversion

     The  profile data on the binary file PROFL7.DAT is converted
to  ASCII  and  written  to a file, which has  the  default  name
PROFL7.ASC, in the format described under GO.


BC  Big c search for y rotation

    Prerequisites :    SG TM Valid matrix

     When  measuring intensities with y rotation,  the  range  of
permissible  y values increases with c, until at c  =  +/  90ø  a
complete  360ø y rotation is always possible.  On Euler  geometry
machines  the  restriction on the y range comes about  because  w
moves  from  the bisecting position by a maximum of +/  |90  cb|,
where cb is the c value at the bisecting position.  If cb is near
0ø the w excursion will approach 90ø and collisions will occur as
the  c  ring approaches the tube mounting.  For reflections where
cb  approaches 90ø the w excursion is a minimum and  usually  the
full  360ø  rotation is attainable.  On kappa  geometry  machines
similar restrictions apply, but a more severe restriction  occurs
because  of the small range of c attainable above c = 90ø.   This
range  is  2a 90ø and as a is usually around 50ø only reflections
with  cb  in the range 80ø to 90ø can have full 360ø y  rotation.
The  BC  command will find all reflections with 2q  less  than  a
specified  maximum  and cb between a specified  minimum,  usually
80ø, and 90ø.

Example:
 Search for reflections with High Chi Values

 Type the minimum acceptable chi value (80)
 Type 2theta(max) (100.0) 30
 h,k,l for 2theta 30.000, chi 90    8.525    2.635    1.466
 Reflections with chi greater than 80.000
        h   k   l    2theta   omega    chi     phi
        3   1   1     7.294    .000  82.829  355.234
        3   1   0     6.988    .000  81.821  197.964
        5   1   1    11.270    .000  82.603   82.854
        6   2   2    14.617    .000  82.829  355.234
        6   2   1    14.186    .000  88.445  264.275
        6   2   0    14.001    .000  81.821  197.964
        8   2   1    18.199    .000  85.679  124.069
        8   2   0    18.040    .000  81.139  161.016
        7   3   2    17.703    .000  81.733  308.986
        7   3   1    17.339    .000  82.627  263.346
        8   2   2    18.554    .000  84.587  51.404


BI  Big Intensity search in the IDATA.DA file

     When a data collection is complete, it is normal to use  the
more  intense  higher angle reflections to collect accurate  data
for  cell  determination  with AL and MM  or  LC.   This  command
searches  the intensity data file for the 25 biggest  intensities
in  the  range of IDATA.DA records given, with 2q values  greater
than a minimum.  It is only necessary to search the IDATA records
containing  the  unique set, as AL will expand the  unique  h,k,l
values.

Example:
 Command bi
 Search for the 25 biggest Inet/Sigma(Inet) (Y) ?
 Type 2thetamin 25
 Intensity data is in records 20 to  154
 Type the first and last record numbers (All) 20 100
 Do you want to search more records (N) ?

The following output appears on the printer

         h   k   l    2Theta      Inet    I/SigI
         5   1   2     25.60     72050    268.41
         5   4   2     31.37     58198    241.21
            .................................
            .................................
         2   1   5     33.96     25302    159.05

HA  H, k, l to Angles

     The  Euler  angles  for specified h,k,l  and  y  values  are
calculated  and printed, in the order 2q, w, c, f, y.  Fractional
indices are allowed.

Example:
 Command ha
 Type h, k, l, Psi  (End) 1,2,3
   1   2   3  15.251   0.000  53.301  63.435   0.000
 Type h, k, l, Psi  (End)


IN  INitialize integer parts of angles.

     This command is meant for initializing the integer parts  of
the  current  angle  values, for instruments  that  do  not  have
absolute  encoding  systems.  It will not be applicable  to  most
systems.


NR  set the NRc program flag

     As  explained on page 12, there is a flag called  NRC  which
can be set to take care of the definition of the c zero position.
If  c = 0 occurs when the f circle mechanism is at the bottom  of
the c circle NRC should be set to 1, otherwise  1.


P9  rotate f by 90ø

     This  command is meant to help with optical centring  during
the initial crystal setup.  Usually, the f circle must be rotated
several  times  during this process and this command  helps  with
this  by  rotating f so that successive 90ø rotations bring  both
goniometer  head  translations into  a  position  normal  to  the
viewing direction so that they may be adjusted.


PA  Print Angle settings

     The  present Euler angles at which the circles are  set  are
printed on the terminal in the order 2q, w, c, f.

     The  h,k,l values printed are the last values used  and  may
not correspond to the angles printed.

Example:
 Command pa
 Current values are   1   2    3    15.251  0.000  53.301 0.000


PD  Print Data of all forms

     All  forms  of  data, basic and intensity, may  be  printed,
either  on  the terminal or to hard copy.  If intensity  data  is
being  printed,  it  is advisable to print  only  selected  small
quantities of data, or printing time can become very lengthy.

Example:
 Command pd
           Print Data on Terminal or LPT
 Options are :    0   Print Basic Data on Terminal
                  1   Print Basic Data on LPT
                  2   Print Intensity Data on Terminal
                  3   Print Intensity Data on LPT
 Type your choice (0) 0

 Space group P 2/M        Wavelength    0.70932
            Orientation   Matrix                            Theta
Matrix
  0.09999949  0.00000003  0.00387554       0.00503130  0.00196553
0.00155299
  0.00000000  0.06250248  0.00000001       0.00000000  0.00038998
0.00000000
  0.00000000  0.00000000  0.05542216
  Cell       10.0245   15.9994   18.0433         90.000    94.000
90.000
 D2theta  0.000   Domega  0.000   Dchi  0.000
 No attenuators.
 No Psi rotation
  1 Reference reflections every 100 reflections
   4   0   0
 No Re orientation during data collection.
   16  Alignment/Re  orientation Reflections  (including  Friedel
equivalents)
   1   2   3      2   1   3      1   2   3      2   1   3
   3   2   1      2   3   1      3   2   1      2   3   1

 Type  when ready to proceed.

   2Theta  Limits:  Min  4.000;  Max  50.000.  Hmax 12, Kmax  20,
Lmax 22.
 There are NO Explicit Absence Conditions
 Omega/2Theta Scan.     Profile analysis.
 Bisecting Geometry.   Scan speed    4.000deg/min
 Scan Parameters:    1.000 +  0.700*tan(theta) +  1.000
  Time/Precision Params:   Bkfrac 0.100; Tmax   10.0, PA    1.00,
PM   1.00
 Segment Data (DH Matrices)   2 segment(s)
   0   0   0   1   0   0   0   1   0   0   0   1
   1   0   1   1   0   0   0   1   0   0   0   1
  Next  reflection:    0   0   0, #    1, set  1, segment  1,  at
record   20

     For intensity data each line contains the following :

N h k l  2q  Frac  Natt  Blow  Peak  Bhigh  y  Inet Inet/s(Inet)

most of which is self explanatory but,
       N      is blank or the reference reflection number.
       Frac   is 10*scan speed + time ratio for normal scans, or
               10*number  of  scans  + time ratio  for  precision
scans.
              Time ratio is the background time/peak time.
              Background time is the time for 1 background, and
              peak time is the scan time, after profile analysis.
      Natt    The attenuator number (0 to 5)
      Blow    Low angle background
      Peak    Integrated peak count
      Bhigh   High angle background.
               If there is profile analysis, both backgrounds and
the peak count
              are adjusted to reflect the cut off points, and the
time ratio is
              that for the adjusted values.
       y        The  value for the measurement, usually 0ø.   999
for standards.
      Inet    Net intensity, with profile analysis, if used.

Example:
 Command pd
           Print Data on Terminal or LPT
 Options are :    0  Print Basic Data on Terminal
                  1  Print Basic Data on LPT
                  2  Print Intensity Data on Terminal
                  3  Print Intensity Data on LPT
 Type your choice (0) 2

     Attenuator(0)    1.00
     Attenuator(1)   18.14

 Type 2thetamin, 2thetamax and min(I/sigI) (All Reflns)
 Type the first and last record numbers (All) 31

     12    7    0    61.639  40.250 0  123.   451.   123.    .000
447   21.05
     11    7    0    57.435  40.525 0  204.  1627.   204.    .000
1621   40.19
     10    7    0    53.416  40.250 0  124.   480.   124.    .000
476   21.73
      9    7    0    49.591  40.250 0  135.   524.   135.    .000
520   22.72
      8    7    0    45.975  40.250 0  155.   668.   155.    .000
664   25.69
   1    10    0    0    43.527   40.264  0   402.  39627.    402.
35607  145.70
   2     0    0    5    31.778   40.218  0   256.  35154.    256.
32594  148.84
   3     0   10    0    42.556   40.243  0   396.  41735.    396.
37775  152.28
      7    7    0    42.590  40.446 0  248.  1564.   248.    .000
1557   39.37
      8    8    0    49.045  40.667 0  472. 10935.   472.    .000
10923  104.46

 Do you want to print more records (N) ?


RB  Read the Basic data from the IDATA.DA file

     All  the  current control parameters for all commands,  plus
all  derived  quantities  such as the orientation  matrix,  h,k,l
limits  etc  are written in the first 3 records of  the  IDATA.DA
file.   The  RB command reads these values, which are written  by
the  WB command or whenever a data collection is started with the
GO command.  (See the description of the IDATA file)

UM  (UMpty) Count the unique reflections within the 2q limits
    (Umpty   a large but indefinite number O.E.D.)

     An  accurate count of the unique reflections within  the  2q
limits  for the unique DH segments derived with SG is calculated.
From this users can estimate (allowing for reference reflections,
scan  time, slewing time and any re orienation), how long it will
take to collect a unique set.

Example:
 Command um
 Count the number of reflections in each segment (Y)
 DH Segment  1 contains  1718 reflections
 DH Segment  2 contains  1416 reflections


VM  set the circles to the View Microscope position

     The  Euler angles for the most convenient microscope viewing
position  are stored in the goniom.ini file and used  by  the  VM
command  to set the instrument to this position ready for optical
centring of a crystal, in conjunction with the P9 command.


WB  Write the Basic data to the IDATA.DA file

     Write  all the current parameters to the first 3 records  of
the IDATA file.  It is a good idea to use this command whenever a
valid  orientation  matrix  is established,  as  this  will  save
trouble on subsequent restarts   planned or not!