fourc
4-circle geometry modes
DESCRIPTION
The fourc version of spec operates a standard four-circle diffractometer. These notes give a brief description of the features of fourc. Further details are given in the Four-Circle Reference section of the spec manual.
FOUR-CIRCLE MODES
The four-circle modes represent the various constraints that can be made on the transformation equations from reciprocal space to diffractometer angles. Use the setmode macro to select a four-circle mode. The different modes are numbered as follows:
0 - Omega Equals Zero1 - Omega Fixed2 - Zone (Chi and Phi Fixed)3 - Phi Fixed4 - Azimuthal5 - Alpha Fixed6 - Beta Fixed7 - Theta Fixed8 - Chi Fixed
(Chi-fixed mode added in spec release 6.12.06.)
FROZEN ANGLES
Each of the four-circle modes has associated an angle (or angles) that are fixed in that mode. As a convenience, there is a freeze macro that turns on frozen mode. When in frozen mode, all moves that specify reciprocal space coordinates will use the frozen value(s) of the current mode's fixed angle(s). Thus you can move motors around for lining up, etc, but have the the fixed parameter automatically restored to the frozen value when doing reciprocal space scans, br moves, etc. The unfreeze macro turns frozen mode off.
The frozen values are stored in variables (actually macros representing elements of the Q[] associative array) named F_THETA (theta-fixed mode), F_OMEGA (omega-fixed mode), F_CHI_Z and F_PHI_Z (zone mode), F_CHI (chi-fixed mode) F_PHI (phi-fixed mode), F_AZIMUTH (azimuthal mode), F_ALPHA (alpha-fixed mode), and F_BETA (beta-fixed mode). You can, of course, assign values to these variables by hand.
FOUR-CIRCLE SECTORS
The sector transformations are symmetry operations on the diffractometer angles that calculate eight additional positions of the diffractometer circles that correspond to the same H, K and L position. The sectors H K L macro prints the diffractometer angles that would be used for each of the possible sectors for a particular reciprocal space position. Use the setsector macro to select a sector.
The sectors transformations are:
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
tth | tth | -tth | -tth | tth | tth | -tth | -tth |
omega | om+180 | -om | 180-om | -om | 180-om | om | om+180 |
chi | -chi | chi+180 | 180-chi | 180-chi | chi+180 | -chi | chi |
phi | phi+180 | phi | phi+180 | phi+180 | phi | phi+180 | phi |
The azimuth-fixed, alpha-fixed and beta-fixed modes only allow sectors zero through three. Sectors 2, 3, 6 and 7 are generally unavailable in theta-fixed mode. Sectors 2, 3, 4 and 5 are generally unavailable in chi-fixed mode.
In many instances, transformations for different sectors will result in the same set of angles.
An additional sector 8 minimizes abs(chi - 90) and abs(phi). However, values created by this sector will often violate the frozen angle constraint.
CUT POINTS
Cut points affect the direction the diffractometer circles turn to get from one position to the next. For example, if a cut point is at zero, the corresponding circle will only move through angles of 0 to 360 degrees. Thus, to get from 355 (=-5) to 5 degrees, the circle will turn 350 degrees. If a cut point is at -180, the circle will move through angles from -180 to 180. Thus the same motion from -5 to 5 will require only 10 degrees of movement. Use the cuts macro to select cut points for theta, chi and phi (and the azimuth). The two-theta motor always uses -180 as a cut point. (Only the sign of the azimuth cut point is used, and it determines the sign of the azimuth angle.)
LATTICE PARAMETERS
The setlat and setrlat macros let you set the lattice parameters in direct space or reciprocal space, respectively.
ORIENTATION MATRIX
With known lattice parameters, you need to find two (nonparallel) reflections in order to determine the orientation matrix. The macros or0 H K L and or1 H K L are used to associate the current diffractometer angles with the primary and secondary reflections. Macros called setor0 and setor1 also let you set the orientation reflections, but don't require you to move the diffractometer to the correct position. Instead, you are prompted for each of the angles and values for H, K and L. The or_swap macro is available to exchange the primary and secondary reflections.
You can also fit an orientation matrix if you have three or more known reflections (not all in the same plane), but unknown lattice parameters. Use reflex_beg to initialize a reflections data file. Use reflex H K L to add the current reflection to the file. Use reflex_end to complete the file. You then run the reflections file as a spec command file in order to fit the reflections to obtain a new orientation matrix. To calculate lattice parameters from the new orientation matrix, type calcL. You can then display the lattice parameters with the pa macro. Naturally, you can edit the reflections data file to delete or modify any of the reflection data there.
VARIATIONS
spec supports seven variations on the four-circle geometry, listed below in the order they became available.
1. The standard configuration with tth, th, phi and chi motors.
2. An omega-type diffractometer where the theta motion is linked to the two-theta motion, such that the when the two-theta circle is moved, the theta circle moves half the distance. The theta circle can also be moved independently of two theta. This configuration corresponds to replacing the independent theta motion with an omega = theta - two-theta/2 motion. The configuration is chosen based on the motor mnemonics. If a th motor exists, then the standard configuration is used. If not, and if an om motor exists then the omega-type configuration is used.
3. A kappa-type diffractometer is detected if motors kth, kap and kphi are present. Use the setkappa macro to set the kappa tilt angle. Use the setvmode macro to enable vertical mode (a vertical configuration of a kappa diffractometer).
4. A modified Picker diffractometer where the chi and phi motions are coupled as:
A[phi] = A[chi] * r + A[phiR]where phiR is the real motor and phi is a pseudomotor. In order to trigger adjustment of the phiR position to keep phi fixed when chi is moved, chi is also a pseudomotor, with chiR the corresponding real motor. The existence of motors with mnemonics chiR and phiR activates this configuration. The factor r is called g_picker and can be set using the setpic macro.
5. An obscure 3-axis configuration with monochromator (M), sample stages (S), analyzer (A) and detector (D) on four parallel rails perpendicular to the incident beam. The monochromater rail position is adjusted manually, while the S, A and D stages are moved along the rails under control of spec:
S A O----O / \ / \ / \ M/ \D X-rays >--O O ^ ^ ^ | | | |-ms-|-sa-|-ad-| | | | v v v sy ay dyAdditional motors:
thR - real theta (sample rotation)tthR - real two-theta (detector rotation)sy - sample railay - analyzer raildy - detector railmth - monochromator rotationath - analyzer rotationParameters:
ms - distance from mono to sample (g_mon_sam_len)sa - distance from sample to analyzer (g_sam_ana_len)ad - distance from analyzer to detector (g_ana_det_len)
- The sixth is the CrystalLogic kappa diffractometer for which tth is a pseudomotor controlled by a liner deflection motor called xlhgt. This diffractometers has two additional parameters, g_xtalogic_d1 and g_xtalogic_d2, that are needed to describe the geometry.
- The seventh is a configuration where the theta (th) motor is called omega (om), but everything else is as the same fourc or kappa. The config file needs an "omega_for_theta" parameter set to a positive value.
GLOBALS AND MACROS
- Q[]
a built-in array which holds the following four-circle parameters:
- def H 'Q[0]'
- Reciprocal space coordinate.
- def K 'Q[1]'
- Reciprocal space coordinate.
- def L 'Q[2]'
- Reciprocal space coordinate.
- def LAMBDA 'Q[3]'
- Wavelength of X rays.
- def ALPHA 'Q[4]'
- Incident angle, useful for surface diffraction.
- def BETA 'Q[5]'
- Exit angle, useful for surface diffraction.
- def OMEGA 'Q[6]'
- The theta - two-theta / 2 parameter.
- def AZIMUTH 'Q[7]'
- Rotation angle of a reference vector about the scattering vector, useful for surface diffraction.
- def F_ALPHA 'Q[8]'
- Frozen value of ALPHA for alpha-fixed mode.
- def F_BETA 'Q[9]'
- Frozen value of BETA for beta-fixed mode.
- def F_OMEGA 'Q[10]'
- Frozen value of OMEGA for omega-fixed mode.
- def F_AZIMUTH 'Q[11]'
- Frozen value of AZIMUTH for azimuth-fixed mode.
- def F_PHI 'Q[12]'
- Frozen value of A[phi] for phi-fixed mode.
- def F_CHI_Z 'Q[13]'
- Frozen value of A[chi] for zone mode.
- def F_PHI_Z 'Q[14]'
- Frozen value of A[phi] for zone mode.
- def CUT_AZI 'Q[15]'
- The azimuth cut point flag.
- def CUT_TTH 'Q[16]'
- The tth cut point.
- def CUT_TH 'Q[17]'
- The th cut point.
- def CUT_OM 'CUT_TH'
- The om cut point (omega-for-theta setting).
- def CUT_CHI 'Q[16]'
- The chi cut point.
- def CUT_PHI 'Q[17]'
- The phi cut point.
- def CUT_KTH 'Q[20]'
- The kth cut point (kappa geometry).
- def CUT_KAP 'Q[21]'
- The kap cut point (kappa geometry).
- def CUT_KPHI 'Q[22]'
- The kphi cut point (kappa geometry).
- def CUT_CHIR 'Q[23]'
- The chiR cut point (Picker geometry).
- def CUT_PHIR 'Q[24]'
- The phiR cut point (Picker geometry).
- def F_THETA 'Q[25]'
- Frozen value of th for theta-fixed mode.
- def F_CHI 'Q[26]'
- Frozen value of chi for chi-fixed mode.
- G[]
a built-in array which holds the following four-circle parameters:
- def g_mode 'G[0]'
- Holds current four-circle mode.
- def g_sect 'G[1]'
- Holds current four-circle sector.
- def g_frz 'G[2]'
- Nonzero when frozen mode is on.
- def g_haz 'G[3]'
- H of azimuthal reference vector.
- def g_kaz 'G[4]'
- K of azimuthal reference vector.
- def g_laz 'G[5]'
- L of azimuthal reference vector.
- def g_zh0 'G[6]'
- H of first zone-mode vector.
- def g_zk0 'G[7]'
- K of first zone-mode vector.
- def g_zl0 'G[8]'
- L of first zone-mode vector.
- def g_zh1 'G[9]'
- H of second zone-mode vector.
- def g_zk1 'G[10]'
- K of second zone-mode vector.
- def g_zl1 'G[11]'
- L of second zone-mode vector.
- def g_kappa 'G[12]'
- Angle of kappa tilt (kappa geometry).
- def g_vmode 'G[13]'
- Set if using vertical mode.
- def g_picker 'G[14]'
- Factor r for Picker geometry where A[phi] = A[chi] * r + A[phiR].
- def g_omsect 'G[15]'
- Omega-sector flag.
The following group are for the type 5 3-Axis configuration described above.
- def g_mon_sam_len 'G[16]'
- Distance from mono to sample.
- def g_sam_ana_len 'G[17]'
- Distance from sample to analyzer.
- def g_ana_det_len 'G[18]'
- Distance from analyzer to detector.
- def g_mon_sign 'G[19]'
- Sign of monochromater rotation.
- def g_sam_sign 'G[20]'
- Sign of sample rotation.
- def g_ana_sign 'G[21]'
- Sign of analyzer rotation.
- def g_mon_d 'G[22]'
- Monochromator d-spacing.
- def g_ana_d 'G[23]'
- Analyzer d-spacing.
- def g_inci_offset 'G[24]'
- Incident offset angle.
The following parameters are for the type 6 CrystalLogic diffractometer described above.
- def g_xtalogic_d1 'G[25]'
- The vertical distance between the instrument center and the driven point below the detector table.
- def g_xtalogic_d2 'G[26]'
- The horizontal distance between the instrument center and the detector table vertical axis.
- pa
Display current geometry parameters in the form:
Four-Circle Geometry, Phi fixed (Three-circle) (mode 3) Frozen values: Phi = 60 Sector 0 Primary Reflection (at lambda 1.54): tth th chi phi = 60 30 0 0 H K L = 1 0 0 Secondary Reflection (at lambda 1.54): tth th chi phi = 60 30 0 -90 H K L = 0 1 0 Lattice Constants (lengths / angles): real space = 1.54 1.54 1.54 / 90 90 90 reciprocal space = 4.08 4.08 4.08 / 90 90 90 Azimuthal Reference: H K L = 0 0 1 Monochromator: d-spacing = 3.13542 Angstroms Separation = 0 mm Energy = 4 keV Lambda = 3.0996 Cut Points: tth th chi phi -180 -180 -180 -180
- setmode [mode]
- Selects the geometry mode.
- setsector [sector]
- Selects the geometry sector.
- setomsect [how]
- Selects the sector option where chi will be reflected about the x-y plane if Q[x] is negative, i.e., the transformation becomes chi = 180 - chi. In older versions of fourc, this option was changed by recompiling geo_fourc.c.
- sectors *H K L*
- Displays motor positions corresponding to the given H K L values for each of the sectors. If the difference between each H, K and L calculated from the new positions differs by more than 0.0001 from the arguments, the values are not displayed. In some geometry modes, some sectors are unobtainable.
- startgeo
- Invokes macros for setting geometry parameters in the order: setmode, setsector, setomsect, setlat, setaz. If using a kappa variation, invokes setkappa and setvmode. If using the Picker variation, invokes setpic. If using the 3-axis variation, invokes set3axis.
- savegeo
- Prints all the geometry parameters associated with the running instance of fourc in a format that can be read as a spec command file. For example, the input savcmd savegeo pars.cmd writes such a command file. One can then start fresh (fourc -f) to reset the state, but re-establish the geometry parameters from the pars.cmd file with qdo pars.cmd.
- cuts [args]
- With no arguments, prompts for cut point values for each geometry motor. Can be invoked with two arguments -- a motor mnemonic and a cut point -- to set the cut point for one motor. Can be invoked with cut point values for all motors. Note, the number of motors with cut points depends on the four-circle configuration.
- calcHKL
- Calculates H, K, L, ALPHA, BETA, and AZIMUTH from the four-circle angles in the motor array A[].
- calcA
- Calculates A[], OMEGA, ALPHA, BETA and AZIMUTH from H, K and L.
- calcZ
- Calculates the phi and chi to put the two vectors specified by the six elements of the built-in Z[] array in the scattering plane.
- freeze [arg1 [arg2]]
- Turns frozen mode on. If no arguments, freezes the real or pseudo angle(s) associated with the current geometry mode to the current value(s) of the angle(s). With arguments, sets the frozen value(s) to the argument(s).
- unfreeze
- Turns frozen mode off.
- cz *h0 k0 l0 h1 k1 l1*
- "calculate zone", prints the chi and phi necessary to put the two vectors specified as arguments in the scattering plane.
- mz *h0 k0 l0 h1 k1 l1*
- "move zone", moves to the chi and phi values that put the two vectors specified as arguments into the scattering plane. Also sets zone mode and turns on frozen mode using the calculated chi and phi values.
- sz *h0 k0 l0 h1 k1 l1*
- "set zone", calculates the chi and phi values that put the two vectors specified as arguments into the scattering plane. Also sets zone mode and turns on frozen mode using the calculated chi and phi values.
- pl chi phi and upl chi phi
- Move chi and phi (pl for "plane").