TasSyntaxIntro

New Common Triple Axis Syntax

This is a frist draft, as discussion base. M. Zolliker, 7 April 2005

Some modifications added by Mark Könnecke, Oct 2005.

The three triple axis instruments at SINQ should get a common instrument software (SICS) with a common syntax.

The idea is to implement and the new syntax on EIGER or RITA-2 first and to upgrade TASP after it is successful.


TasDriveCommand

Drive Command

The command name is DR. The command drive as used at other instruments is available but behaves differently.

Markus Zolliker: this behaviour may confuse the user. My proposition is to rename the original sics drive command and to make dr and drive act similar

Motors are driven as on other SICS instruments. With a single drive command several motors may be driven.

Driving in reciprocal lattice units

Driving Q:

> DR QH qh qk ql en

If en (the energy transfer value) is omitted, the energy transfer is assumed as zero (in contrast to TASMAD, where it is the last used value). It is an error to give less than 3 numbers.

WARNING: The new system allows to drive Q out of plane within the limits of the sample goniometers sgu and sgl. If there is some sample device on the table which may not be tilted, restrict the movements of sgu and sgl through software limits.

Markus Zolliker: this behaviour is dangerous, because people will always forget to set software limits. My proposition is to have different names for Q-variables driven in 2 and 3 dimensions. An error should be signaled when driving the 2D Q-variable out of plane

For powders (no more powder mode switch, qm is in Å-1):

> DR QM qm EN en

Driving the energy transfer alone is also possible, (using the last given q values):

> DR EN en

Analyzer and monochromator energies are represented by the virtual motors EI, KI, EF and KF, as in TASMAD.

An error is signaled:


TasScanCommand

Scans

The scan syntax is like on TASMAD.

Arguments of SC:

  1. any driveable variable, and its center value
  2. any step (D immediately followed by the variable name)
  3. NP followed by the number of points (note: if NP is even, the scan center is between the two points in the middle).
  4. MN or TI followed by the monitor or time preset value

The presence of 4 argument parts is mandatory, but the order of the parts is not relevant. For every step variable, the corresponding center value must be given. If no step is given for a center variable, a step 0 is used.

Special cases are the variables QH and Q3 , and their corresonding steps DQH and DQ3 which have 3 or 4 values.

Examples:

Warning

The new UB matrix system allows to drive Q out of plane within the limits of the sample goniometers sgu and sgl. If there is a sample environment device on the sample table which may not be tilted, please restrict the movement of motors sgu and sgl through software limits.

Polarised scans

> POLSCAN script "scan variables and steps" NP np MN mn

The script contains all what has to be done at one scan point. Its exact syntax is still open.


TasOtherCommands

Commands from TASMAD

CO
count (arguments: either MN mon or TI time)
FI (FIX)
without argument: show which motors are fixed
with arguments: motors to fix.
CL
without argument: show which motors are fixed
CL ALL: clear all motors
with arguments: motors to unfix.
DO
alias to exe
LE
summarize q and energy infromation
LZ, LL
summarize zero points and limits informaiton
LM
summarize machine parameters
LS
summarize sample information (the format may change due to the ub matrix system)
LT
show targets and positions
LI
the same as LM, LS, LZ, LT, LE executed one after another
OUT
set additional output variables to be printed into the data file and on command history
PR (PRINT)
print variable values.
remark: the values of sics objects may be printed also by directly entering the name, but this does not work for Lmm, Umm, Zmm, SS, SA, SM and FX (where mm is any motor)
SE (SET)
set variable values.
remark: the values of sics variables may be set also by directly entering the name and the value, but this does not work for Lmm, Umm, Zmm, SS, SA, SM and FX (where mm is any motor)

Other Commands

Naturally, all general SICS commands are valid also.


TasUBMatrix

UB Matrix for Triple Axis Instruments

> CELL a b c alpha beta gamma

set unit cell constants. If b or c are omitted, the same value as for a is used, if angles are omitted, they are set to 90 degress. Without arguments, the cell constants are listed.

> addauxref qh qk ql

Define the vectors for the scattering plane.

> REF qh qk ql a3 a4 sgl sgu Ei Ef

Make an entry in the list of peaks. For angles and k-values not given, the current motor positions are used. The peak number and the peak data are returned.

> REF AUX qh qk ql Add an auxiliary reflection to the list of reflections. A4 is calculated from the cell constants, the current ei and ef values are used. A3 is left alone or is calculated to have the right angular difference to the previous reflection. Using auxiliary reflections is a help during setup of the instrument or in powder mode.

The sequence:

ref clear all
cell aa bb cc alpha beta gamma
addauxref ax ay az
addauxref bx by bz
makeub 1 2
with ax, ay, az being the first plane vector and bx, by, bz being the second plane vector creates a UB matrix which allows to drive Q positions and qm. But be aware that a3, sgu and sgl values are still invalid.

> REF CLEAR peak

Remove a peak.

> REF CLEAR ALL

Remove all peaks.

> REF

List all peaks.

> MAKEUB peak1 peak2

Calculate, activate and print out the UB matrix, as well as the peak list with qhkl values calculated back. peak1 is used as the main peak, i.e. driving to the angles given for this peak will correspond to a QHKL which may only differ by a scalar factor of about one, if the cell constants are not correct. peak2 is used only for determining the scattering plane.

It has to be checked that this is fully compatible with the TASMAD specification. In principle, AX,AY,AZ should correspond to peak1 and BX,BY,BZ to peak2.

>MAKEUBFROMCELL

Calculate and activate a UB which has been calculated from the cell constants alone. This is useful to get a4 when no reflection has yet been found to calculate a proper UB.

>MAKEAUXUB qh qk ql

Calculate a UB matrix from the first reflection and an auxiliary second reflection specified through the miller indices qh , qk, ql. The auxiliary reflection will have the same angles as the first reflection, except a3 and a4 will be adjusted to match the requirements from the crystalls geometry.

Markus Zolliker: there should be a an easy way helping the user to correct the cell constants (for example due to thermal contraction) according to the measured peak.

> LISTUB

List the UB matrix, the cell constants and all stored reflections.

Out Of Plane Operation

This formalism allows to drive out of the scattering plane using the tilt motors of the sample stage. Some cryostats cannot stand this. Therefore driving out of plane can be switched off and on.

> TASUB OUTOFPLANE 1

This command switches out of plane operation on.

> TASUB OUTOFPLANE 0

This command switches out of plane operation off.

> TASUB OUTOFPLANE

lists the current value of the outofplane variable

Example session:
(Some numbers might not be correct, as this module does not yet work in this form).

We enter cell values

   > CELL 2.88 2.88 2.88 90 90 90

   > MAKEUBFROMCELL

MAKEUBFROMCELL builds a UB matrix from the cell only. With this you can drive to 2 0 0
   
   > drive qh 2 0 0

This will get you the correct two-theta == a4. You have to search the peak in a3, sgu and sgl and optimize it. 

Once we are at the maximum:

   > REF 2 0 0
   Peak   QH     QK     QL      A4      A3     SGL     SGU
   1    2.00   0.00   0.00   65.31  -87.21    1.25   -5.22

   > makeauxub 0 4 4
   > dr qh 0 4 4 
Make an axiliary UB and drive to the theoretical position for 0 4 4

Find the peak 0 4 4 and optimize it.

   ...

Once we are at its maximum:

   > REF 0 4 4
   Peak   QH     QK     QL      A4      A3     SGL     SGU
   1    0.00   4.00   4.00   65.31  -87.21    1.25   -5.22
   
Show again the peak list:

   > REF
   Peak   QH     QK     QL      A4      A3     SGL     SGU
   1    2.00   0.00   0.00   65.31  -87.21    1.25   -5.22
   2    0.00   4.00   4.00   99.45   20.39    4.25   -1.22

Calculate the UB matrix, with 2 0 0 as primary peak and 0 4 4 as
secondary peak.

   > MAKEUB 1 2
   UB   2.456   0.530  -0.200
       -0.530   2.456  -0.090
        0.200   0.090   2.456
   Peak    QH     QK     QL      A4      A3     SGL     SGU     QH     QK     QL
   1 A   2.00   0.00   0.00   65.31  -87.21    1.25   -5.22   2.03   0.00   0.00
   2 B   0.00   4.00   4.00   99.45   20.39    4.25   -1.22   0.02   3.95   4.03

the last 3 columns above show the Q values calculated back from the angles.
We drive now to the 2 0 0 peak

   > DR QH 2 0 0
   > PR A4 A3 SGL SGU
   A4 =  64.218
   A3 = -87.515
   SGL =  2.258
   SGU = -3.217

The value of A4 has changed, because the cell constants do not match the values
given for the first peak. The value of A3 has changed by the same reason, and
in addition, because the the plane given by 2 0 0 and 0 4 4 is now tilted back
into in the scattering plane. For the latter reason SGU and SGL have changed also.

   > DR QH 3 3 3
   > PR A4 A3 SGL SGU
   A4 =  82.516
   A3 = -31.215
   SGL =  2.258
   SGU = -3.217

note that the values for SGU and SGU have not changed. The will not change
as long as we stay in the scattering plane (no drives to Q3) and as long
as the UB matrix has not changhed.

   > REF 3 3 3
   Peak   QH     QK     QL      A4      A3     SGL     SGU
   3    3.00   3.00   3.00   82.32  -31.25    2.26   -3.22
   > MAKEUB C B
   UB   2.456   0.530  -0.200
       -0.530   2.456  -0.090
        0.200   0.090   2.456
   Peak    QH     QK     QL      A4      A3     SGL     SGU     QH     QK     QL
   1     2.00   0.00   0.00   65.31  -87.21    1.25   -5.22   2.03   0.00   0.00
   2 B   0.00   4.00   4.00   99.45   20.39    4.25   -1.22   0.02   3.95   4.03
   3 A   3.00   3.00   3.00   82.32  -31.25    2.26   -3.22   3.00   3.00   3.00

We have calculated a new UB matrix, based on the peak 3 3 3 as primary and the
0 4 4 as secondary peak. The UB matrix has not changed, as we were already exactly
at 3 3 3.

TasVariables

Configuration

DM,DA
Monochromator/Analyser d-spacing [Angstroem].
SM,SS,SA
Scattering sense at Mono (new: as text LEFT/RIGHT/STRAIGHT)
FX
new as text: KI or KF

informational only:

ALF1,ALF2,ALF3,ALF4
Horizontal collimation before mono, before sample, before analyser, before detector [minutes FwHm]
BET1,BET2,BET3,BET4
Vertical collimation before mono, before sample, before analyser, before detector [minutes FwHm]
ETAM,EATS,ETAA
Monochromator/Sample/Analyser mosaic [minutes FwHm]

Limits and Zeros

Lower and upper limits and zeros for all motors. L, U and Z are appended as a prefix to the variable names to indicate Lower limit, Upper limit and Zero.

Motors

A1      Monochromator angle             (Bragg angle in degrees)
A2      Scattering angle at mono.       (twice Bragg angle in degrees)
A3      Sample angle (degs)             (A3=0 when (AX,AY,AZ) is along KI)
A4      Scattering angle at sample      [degrees]
A5      Analyzer angle                  (Bragg angle in deg.)
A6      Scattering angle at analyzer    (twice A5 in deg.)

MCV     Mono curvature vertical
SRS     Sample table second ring
ACH     Anal curvature horizontal
MTL     Mono   lower translation
MTU     Mono   upper translation
STL     Sample lower translation
STU     Sample upper translation
ATL     Anal   lower translation
ATU     Anal   upper translation
MGL     Mono   lower goniometer         (Reserved)
MGU     Mono   upper goniometer
SGL     Sample lower goniometer
SGU     Sample upper goniometer
AGL     Anal   lower goniometer         (Reserved)
AGU     Anal   upper goniometer

D1T D1B D1R D1L Diaphragm 1 (top/bottom/right/left)
D2T D2B D2R D2L Diaphragm 2 (top/bottom/right/left)
D3T D3B D3R D3L Diaphragm 3 (top/bottom/right/left)

Virtual motors

EI      Incident neutron energy         [meV]
KI      Incident neutron wavevector     [Angstroem-1]
EF      Final neutron energy            [meV]
KF      Final neutron wavevector        [Angstroem-1]

QH      Q in Reciprocal Lattice Units (3 components!)

EN      Energy transfer; +ve neutron energy loss        [meV]
QM      Length of Q                             [Angstroem-1]

Polarisation analysis

not yet specified


TasObsoleteFeatures

Features removed from TASMAD or changed


TasSyntaxSuggestions

UB matrix stuff

Henrik Ronnow:

I assume the UB-stuff is with the intention that one can eventually drive out of the AB-plane using the goniometers? For some experiments - e.g. the incommensurate stuff Oksana, Sabine and I are working on, this would be extremely useful.

Markus Zolliker:

This is implemented with the Q3 variable. The only difference to the QH variable is, that it does really move out of the scattering plane, whereas a drive on QH gives an error when a vector outside the scattering plane is given. What remains open, is, how to resolve the redundancy on drives outside the scattering plane. For EN=0, you have 4 angles to drive, but only 3 components of the Q vector. We have to specify, how to resolve this redunant information. One possibility would be, that the vector in the AB-plane, which is perpendicular to the scattering vector, stays in the scattering plane.

"Henrik:" One solution to redundancy problem would be to choose solution that has minimum total tilt - sqrt(Gu^2+Gl^2) would do.

Crystal Orientation Tool

Henrik Ronnow:

Related to this is a command to tilt the current scattering vector. Normally we always rotate the sample or the cryostat to have the crystallographic axes along the goniometer axes. But this is silly since instead of scanning sgu and sgl independently one can just make a coupled scan that exactly tilts the current scattering vector. Much of the time, this is a small convenience thing, but sometimes, the sample does not have refelctions at perpendicular angles, in which case such a feature would allow more accurate alignment.

Markus Zolliker:

Me also, I thought about a virtual motor simulating a goniometer with arbitrary axis. I think about a syntax to implement this.

Special Stuff of individual Instruments

Henrik Ronnow:

The other thing we need to think about is how to deal with the multiplexing. For RITA-II its only 7-9 channels, but for EIGER-CAMERA it will be 60 degree continuous scattering and 5 of those. We obviously do not need to sort that out in detail before when CAMREA is closer to ready, but we should make sure that the syntax and underlying code can be generalised to this kind of analyser-detector systems.

Markus Zolliker:

I did not specify such things. The aim is, to have the same syntax for all stuff common on the 3 instruments. I have also not specified in detail the polarisation analysis, which is only used on TASP. But if something is found in the syntax, which might give trouble when extended to some instrument specific stuff, then we like to have a feedback.

Bertrand Roessli: thanks Christoph to have sent me the link. The following is just the result of some suggestions that I can think of after discussion with Christof and Markus. Sorry if they are redudant.

-It is written that En is set to zero in case the command 'Sc Qh h k l' does not contain the energy transfer. I think this is quite dangerous if somebody forgets to do it and the instrument drives back automatically to the elastic position.

-It seems there will be no switches in future apparently. Please remember that TASP has polarisation analysis.

-The option with the UB matrix allows scans out of the scattering plane. Some security should be installed to prevent that a typo in a scan or in a job drives the goniometers (and the cryostat that is on it). I am not sure that setting the soft limits is a good option. I like Markus' proposition with the 'sc/dr Q3' command very much.