3.8. - Reciprocal Space Macros
The following macros are general and applicable to most geometry configurations. Macros special to the four-circle geometry configuration are described in the Four-Circle Reference that follows this guide.
ca H K L # Display calculated positions for H K L cal H K L # As above, but don't reset positions ci tth th chi phi # Display calculated H K L for angles br H K L # Move to H K L mk H K L # Move to H K L ubr H K L # Move to H K L while updating screen umk H K L # Move to H K L while updating screen mi ALPHA BETA # Move to ALPHA BETA wh # Display H, K, L, tth, th, chi, phi, etc. pa # Display geometry parameters
The difference between
ca
and
cal
is that the first macro restores the
A[]
angles and
H
, K
and
L
to the current diffractometer position, while the second
macro leaves them
at the calculated values.
There is no difference between the
br
and
mk
macros,
except their names.
The
ubr
and
umk
macros continuously read the motor positions
from the controller and show the positions on the screen.
The frequency of updates is set by the global variable
UPDATE
. # Go to a Bragg position def br '_br $*; move_poll' def _br ' if ($# != 3) { print "Usage: br H K L" exit } waitmove; { H=$1; K=$2; L=$3 } getangles; calcA onp; offt; printf("\nbr %g %g %g\n", H, K, L); offp; ont move_em '
# Calculate motor positions for a given H, K, and L def cal ' if ($# != 3) { print "Usage: cal H K L" exit } ; {H = $1; K = $2; L = $3 } calcA; calcHKL onp printf("\nCalculated Positions:\n") _var offp ' # As above but reset positions to diffractometer positions def ca ' if ($# != 3) { print "Usage: ca H K L" exit } ; {H = $1; K = $2; L = $3 } calcA; calcHKL onp printf("\nCalculated Positions:\n") _var offp waitmove; getangles; calcHKL '
# Where - reciprocal and real space def wh ' waitmove; getangles; calcHKL onp _var offp '
# A macro called by "wh", "ca" and "ci" to display important # geometry quantities. (Four-circle version.) def _var ' printf("\nH K L = %.5g %.5g %.5g\n", H, K, L) printf("ALPHA = %.5g BETA = %.5g", ALPHA, BETA) printf(" AZIMUTH = %.5g LAMBDA = %g\n\n", AZIMUTH, LAMBDA) _mot 4 '