Tas parser

Commands

Most commands can be abreviated by their starting letters (when no ambiguity is permitted).

Command syntax

There are a few rules :

# An input line must always begin with a command.

# A command can usually be abbreviated to its first TWO relevant letters, e.g. CO is equivalent to COU or COUNT but for SetZero type SZ or SZERO and so on.

# A command must be separated from information which follows on the same line by at least one space.

# Only one command may be given per line of input. However this does not exclude using, for example, the DRIVE command to drive several or even all motors.

# All command lines are terminated by a carriage return <CR>. So do not forget to put one <CR> ( or more) at the end of your xbufile.

Most commands are followed either by:

* Syntax type (A)

(A) a sequence of variable names.

e.g. DM,DA,SS (carry out command given on variables DM, DA, SS)

Note : that for this type of syntax (type a) the only acceptable variable separators are ' ' (i.e. a space).

* Syntax type (B)

(B) a sequence of variable names and values.

e.g. AS 3.24 CC 90 (AS is set to value 3.24 and CC to 90)

e.g. QH 1 0 2.0 (variable QH takes the value 1 and the following variables in storage [QK, QL] take the values 0 and 2 )

In commands involving this construction type (B) THE Program echoes the variable names and values it has understood. Possible separators are ' ' ('space').

Further help exists on the following sub-topics...

• SC(AN)

Scans a variable. All variables which may be driven may also be scanned.

The SCan command is of type B syntax . The scan-increment, preset monitor (MN) (or time, TI) and the number of scan points (NP) may be specified by a SET command (done before the scan), by default (the most recently used values) or on the same line as the SCAN command. Any number (less than 10) of variables may be scanned in a single command.

The value of the scanned variable given in the SCAN command is the CENTRAL point of the scan. The maximum number of points per scan is 999. For odd NP this means that the center is at the middle of the scan; for even NP the center is the first point after the middle.

e.g.

SC A1 0 DA1 1 NP 3 --> A1 = -1, 0, +1

SC A1 0 DA1 1 NP 6 --> A1 = -3, -2, -1, 0, +1, +2, +3

>SC A2 -40 DA2 0.1 NP 11 TI 10

scans A2, in steps of 0.1 degree, about A2=-40 degrees for 10 seconds per point.

>SC A3 20.2 A4=40.4 DA3 -0.1 DA4 -0.2

gives a theta-two-theta scan. If NP and TI have not been changed since the example above, there will be 11 points each counted for 10 seconds.

>SC QH 1 0 0 0 DQH 0 0 0 0.1 NP 31 MN 100

causes a constant-Q scan, with an energy step of 0.1 (meV or THz depending on the start-up conditions) to be carried out at Q=(1,0,0). There are 31 points each counted for 100 monitor counts.

SC EN 1.1

the constant-Q scan will be repeated, centered at an energy transfer of 1.1 (meV or THz).

As with the DRIVE command, scans in Q-E space are carried out at fixed KI (FX=1) or fixed KF (FX=2). During a scan with Kf fixed (i.e.FX=2), the program will automatically check and adjust A5 and A6; for Ki fixed (FX=1) however, MAD Program will not adjust at check and adjust at every point A1 and A2 because these variables are not likely to move in a Ki-fix scan.

>SC EI 14 DEI 0.1 NP 9 TI 1

causes a scan of the incident energy to be performed.Such a scan may be carried out independently of the value of FX.

Drive to the peak position

Nomad program can also DRive scans variable (just first variable of the scan) to the peak position (maximum or minimum). Use the *FM* command. It'is the same syntax of SCan command.

If the is no peak, scan drives variable to the center of the scan.

Set zero to the peak position

Nomad program can also set zero of the scans variable (just first variable of the scan) to the peak position. Use the *FZ* command. It'is the same syntax of SCan command.

If the is no peak, scan set zero of the variable to the center of the scan.

Other types of scan

* *BS* command is a scan command, which are given the first point of the scan instead of the center scan.

e.g.

BS A1 0 DA1 1 NP 3 --> A1 = 0, +1, +2

BS A1 0 DA1 1 NP 6 --> A1 = 0, +1, +2, +3, +4, +5

* *BM* command is a scan like BS command but with driving the variable to the peak position at the end.

* *BZ* command is a scan like BS command but with setting zero of variable to the peak position at the end.

• FI(X)

Fixes a simple dynamic variable (i.e. a variable that is directly connected with the position of a spectrometer motor , or the value of a current).

The variable is fixed at its current value so that subsequent attempts to change the value will fail unless a CLEAR command is issued first.

FIX is a command of type A syntax. The FIX command issued with no variable name gives a list of motors and supplies which are fixed.

e.g.

> FIX A3

fixes A3 motors

• CL(EAR)

The CLEAR command un-fixes a previously fixed motor or power supplies. Issued alone it un-fixes all previously fixed motors and power supplies. CLEAR is a command with type A syntax. In all cases the motors or supplies which have been cleared are listed by the Program.

e.g.

> CL A1-A3

clears A1, A2, A3 motors.

> CL I3 RA I4

clears RA motor and I3, I4 powers.

> CL

clears all motors and powers.

• DR(IVE)

Changes dynamic variables which describe the spectrometer configuration in some way. These variables have always a current position (actual value) and a target value. Under normal circumstances, targets and positions are equal within a small error. Definition of wavevectors : Ki, Q, and Kf are defined by the current values of the Two-Theta angles , A2, A4, A6 respectively. Therefore, it is possible (after an abort or an explicit motor drive) that the spectrometer is not really at the given position in Q-energy space, but every unperturbed drive of Q-energy will restore the correct position in Q-energy space: that means that all the four variables Qh, Qk, Ql and EN will be driven (explicitly or implicitly) to their target values if (at least) one of them is explicitly driven or scanned.

Motor angles, wavevectors, energies, temperature, power-supply and Helmholtz-field values must all be driven.

DRIVE is a command of type B syntax. The spectrometer is driven to its new position and the appropriate variable is altered in the memory.

A DRIVE command will fail (non destructively) if:

# a motor or power supply is protected or fixed (see FIX/CLEAR)

# a software or hard limit is exceeded; the soft limits may be changed if necessary using the SET command provided the value desired is within the allowed range.

# there is ambiguity among the driven variables.

e.g. > DR KI 2.662 A2 40

sets two different targets for A2 and fails.

Examples of valid DRive commands:

> DR A1 10 A2 20

moves A1 to 10 and A2 to 20 degs

> DR EI 14

moves A1 and A2 to give an incident energy of 14 whichever unit was chosen at start-up.

> DR QH 1 0 0 0

moves the spectrometer at fixed KI or KF depending on the value of FX - so that QH=1,QK=0, QL=0 and EN=0

If one of QH, QK, QL and EN is driven, ALL the others are taken into consideration.

e.g. > DR EN 5

uses the value of EN specified and the existing target values of QH, QK and QL and makes the appropriate spectrometer movements taking account of the value of FX.

Special commands for driving sample temperature:

•  No ramp:

> DR <TT,TRT,TT2,TRT2> <temp> (fast,nofast) (bg)

- TT means set set-point on the main sample temperature controller, TRT  on the main regulation one, TT2 on the secondary sample one and TRT2 on the secondary regulation one.

- temp is the set-point temperature.

- fast or nofast is the option for using fast mode or not.

- bg is to executed the command in background, so prompt is accessible for others commands.

e.g. > DR TT 100 FAST BG

Goes to 100K in background using fast mode algorithm

• Using ramp:

> DR <TT,TRT,TT2,TRT2> <temp> <rampdelta> <ramptime> (cold valve pressure) (bg)

- rampdelta is the delta temperature to add between each ramptime

- ramptime is the time between each set-point to set on temperature controller

- cold valve pressure means you could use a fixed pressure during the ramp using this valu

e.g. > DR TT 200 0.5 1m

Goes to 200K using a ramp of 0.5K per 1 minute

e.g. > DR TT 100 1 30s 20

Goes to 100K using a ramp of 1K per 10 seconds using a fixed cold valve pressure at 20

The background option also available for cold valve and magnetic field controller:

e.g. > DR VF 20 BG

Open the cold valve to 20 in background

e.g. > DR MAG 5 BG

Goes to 5 Tesla in background

• LI(ST)

LIST gives a listing of all spectrometer variables and parameters.

There are "subsidiary" commands LE, LL, LM, LS, LT and LZ described below.

* LE : Lists Physical variables in (Q,w) space and temperature

* LL : List Limits. Gives a listing of all motor limits and zeros.

* LM : List Machine. Gives a listing of all machine parameters.

* LS : List Sample. Gives a listing of all sample parameters.

* LT : Lists Targets. Gives a listing of all target values, i.e. where the motors want to be and actual positions.

Note that the target values usually describe the actual spectrometer configuration and should be equal (within a certain tolerance) to the positions. Clear exceptions are a power supply which has been turned OFF, abort of a drive by Ctrl^C and, for instance, the incident wavevector after a drive of A1 or A2.

* LZ : Lists Zeros. Equivalent to command LL (ListLimits).

* LP : Lists Limits, Zeros, Targets and Positions of powers.

• OU(TPUT)

Defines extra variables to be output. The teletype and disk-file output produced by a SCAN command usually consists of values of variables which are scanned in addition to values of M1, M2, time and detector counts. The OUTPUT command may be used to force the output of additional variables. The total number of variables which can be output (including those which are scanned and those which are referred to in a .PAL file but excluding monitor, time and detector counts) is 20. Thus setting a variable to be output means that its value will be printed for every point in every scan until disabled. Typing OU with NO following variables will stop the output of ALL variables apart from scanned ones.

Type A syntax. A variable that has to be output because it is scanned and has also been selected with the OUT command will only be output once.

e.g.

>OU A3,A4<CR>

A3 & A4 will be printed in addition to the scan variables.

>OU<CR>

stops all extra output.

• PR(INT)

Prints the current value of one or more variables or parameters. PRINT is a command of type A syntax:

e.g.

> PR A1 A5

A1 = -20.60

A5 = 20.60

> PR QH-EN GM

QH = 0.20143

QK = 0.00166

QL = -1.98956

EN = -0.01364

QM = 2.31468

GM = 61.03

> PR DM

DM = 3.35500

• SE(T)

This command is used to change the values of parameters which do not directly alter the spectrometer configuration (variables which do alter the spectrometer configuration must be changed with the DRIVE command). The parameters which may be changed using SET are given in section V; in general these are instrument parameters such as monochromator and analyzer d-spacings, sample parameters, motor limits and zeroes, and steps for scans.

Nomad Program echoes the values which it has understood. SET is a command of type B syntax.

e.g.

> SE DM 3.355 DA 3.355

sets dM and dA to 3.355

• SZ (SetZero)

This command sets the zero for a variable such that its current value is change into a specified value.

Obviously this command works only for variables that have a zero.

e.g.

> PR A3

 A3 = -25.76

> SET ZA3 45

 OLD LA3 = -173.10 UA3 = 174.90 ZA3 = 0.00

 NEW LA3 = -128.10 UA3 = 219.90 ZA3 = 45.00

• Variables

Variables are divided into five groups:

* parameters which define some aspect of the instrument configuration but are not directly related to a motor angle or power supply value. These variables are changed by the SET command.

* parameters which relate to the sample.These are also changed by SET.

* limits and zeroes for motors and power supplies, also changed by SET.

* Variables which are explicitly or implicitly related to a motor position or power supply value. These variables are changed by the DRive command.

* Increments (steps) for the variables of type under; these are changed by SET.

The following list gives the variable identifiers and definitions,

where the order is as the variables are stored in the Program.

• Instrument

* DM Monochromator d-spacing [Angstrom].

* DA Analyzer d-spacing [Angstrom].

* SM Scattering sense at Mono (+ve to the left)

* SS Scattering sense at Sample (+ve to the left)

* SA Scattering sense at Analyzer (+ve to the left)

* ALF1 Horizontal collimation before mono [minutes FwHm]

* ALF2 Horizontal collimation mono to sample [minutes FwHm]

* ALF3 Horizontal collimation sample to anal. [minutes FwHm]

* ALF4 Horizontal collimation before detector [minutes FwHm]

* BET1 Vertical collimation before mono [minutes FwHm]

* BET2 Vertical collimation mono to sample [minutes FwHm]

* BET3 Vertical collimation sample to analyzer [minutes FwHm]

* BET4 Vertical collimation before detector [minutes FwHm]

* ETAM Monochromator mosaic [minutes FwHm]

* ETAA Analyzer mosaic [minutes FwHm]

* FCU Flipper Control Unit ratio Up/Down [ 0 < fcu <1 ]

* FX =1 for constant Ki; =2 for constant Kf

* NP Number of points in a scan

* TI Preset time [seconds] for a COunt or SCan

* MN Preset monitor for a COunt or SCan

* NROTA3 is the number of goniometer table rotation in PI/2.

* SIGNGL is the sens of lower goniometer (-1/+1).

* SIGNGU is the sens of upper goniometer (-1/+1).

* MODE is the type of instrument (tas, flatcone, imps, cryopad...).

* USEGONIO is used for activated the gonio automatic moving.

* MODGONIO is the mode of gonio (0:A3 Moving / A3P Disable, 1: A3P Moving / A3 Disable, 2: A3 and A3P / A3 moving, 3: A3 and A3P / A3P moving.

* USEFLIPPERS is used for activated the flipper In and the flipper Out coils

* USEHELMZ is used for activated the Helmholtz coils

* CRYOPADAUTO is used for activated the automatic settings of cryopad powers and axis

* TO: Timed out on sample temperature control (0 for no timed out)

* TSTAB: Stabilisation time on sample temperature control (0 for no stabilisation)

* TOMAG: Timed out on magnetic field control (0 for no timed out)

* MOMAG: mode for magnetic field control (0: non persistent, 1: persistent)

remark: ALF1 to ETAA are not used by Nomad Program but stored for your own convenience.

Please *DO NOT FORGET* to update ALF1-ALF4 variable after collimator change to avoid confusion when you analyse your data after one or two years

• IN1

* RCU220HMIN

* RCU220HMAX

* C1RCU220H

* C2RCU220H

* RCU220VMIN

* RCU220VMAX

* C1RCU220V

* C2RCU220V

* RCU331HMIN

* RCU331HMAX

* C1RCU331H

* C2RCU331H

* RCU331VMIN

* RCU331VMAX

* C1RCU331V

* C2RCU331V

* RSHMIN

* RSHMAX

* C1RSH

* C2RSH

* RSVMIN

* RSVMAX

* C1RSV

* C2RSV

• IN3
• IN8
• IN12
• IN20
• THALES
• Limites

Lower and upper limits and zeroes for all variables given in section below. L, U and Z are appended as a prefix to the variable names to indicate Lower limit, Upper limit and Zero.

Storage order is the same as for the corresponding variables, i.e. :

LA1, UA1, ZA1, LA2, UA2, ZA2, LA3 ...

h2. Sample

* AS

* BS Sample unit-cell edges [Angstrom]

* CS

* AA

* BB Sample unit-cell angles [degrees]

* CC

* ETAS Sample mosaic [minutes FwHm]

* AX

* AY Components of a recip. lattice vector in scattering plane of the sample. A3 is the angle between KI and (AX,AY,AZ).

* AZ

* BX

* BY Components of a second distinct reciprocal lattice vector in the sample's scattering plane.

* BZ

• Special

* SET TITLE : Give a title string stored in the data file header (between quotes).

* SET USER : Give the experiment user's name

* SET LOCAL : Give the local contact's name

• Temporary and permanent files

Temporary files : are called 0000## where ## is a integer between 1 and 99.

Files are written sequentially and are therefore periodically overwritten. Scans launched from the teletype will be stored in temporary files unless the appropriate switch is set (see SWITCHES).

Permanent files : are called ###### where ###### is an integer between 1 and 999999.

Files are written sequentially but are never overwritten because the disk does have room or 999999 files. The location for writting files is :

* /users/data : for Data files (scans)

* HOME/log : for Log files, recording all nomad outputs and commands

Permanent files are automatically transferred to the Archive central computer (called *serdon*).

File format

Files are of variable length (depending on the number of scan points) and are written in ASCII.

The header file is the ILL ASCII data format and look like:

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR

043784 1 0

ILL TAS data in the new ASCII format follow after the line VV...V

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

80 0

IN3 kulda 05-Dec-08 10:15:37

VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV

Special data

Example:

INSTR: IN3 : Name of the instrument

EXPNO: INTER1566 : Proposal number

USER_: kulda : User name

LOCAL: kulda : Local contact name

FILE_: 043784 : File numor

DATE_: 05-Dec-08 10:15:37 : Date and time creation

TITLE: PMN 3D : Title of the experiment

Scan parameters

Example:

COMND: SC QH 2.3 0 -.5 0 DQH .05 0 0 0 NP 21 MN 1000000 : Scan command

POSQE: QH= 1.8000, QK= 0.0000, QL= -0.5000, EN= 0.0000, UN=meV : HKLE position before the scan

STEPS: QH = 0.0500, QK = 0.0000, QL = 0.0000 : Step variables of the scan

STEPS: EN = 0.0000 :

Curve options

Example:

CURVE: MONO= auto, ANA= manu : Show option of automatic control of curve is selected or not

Parameters

It shows Tas Mad parameters like instrument and sample parameters.

Example:

PARAM: DM= 3.35500, DA= 3.35500, SM=-1., SS=-1., SA= 1.

PARAM: FX= 2., KFIX= 2.66264

PARAM: ALF1= 600.00, ALF2= 60.00,ALF3= 600.00, ALF4= 600.00

PARAM: BET1= 600.00, BET2= 600.00,BET3= 600.00, BET4= 600.00

PARAM: ETAM= 35.0, ETAA= 35.0

PARAM: AS= 4.04000, BS= 4.04000, CS= 4.04000

PARAM: AA= 90.0000, BB= 90.0000,CC= 90.0000, ETAS= 1.0

PARAM: AX= -1.000, AY= 0.000, AZ= 0.000

PARAM: BX= 0.000, BY= -1.000, BZ= 0.000

Actual value of variables

It shows the actual position of motors.

Example:

VARIA: A1 = -20.60, A2 = -41.18, A3 = 54.60, A4 = -70.03

VARIA: A5 = 20.60, A6 = 41.18, TM = 4.31, GM = 61.03

VARIA: RM = 6.12, GU = 14.77, GL = 0.51, RAH = 8.93

VARIA: RAV = 5.99, D1T = 14.38, D1B = 15.31, D1R = 10.66

VARIA: D1L = 11.21, D2T = 19.38, D2B = 17.50, D2R = 15.71

VARIA: D2L = 16.26, TU = -26.59, TL = -22.88

Zeros

Its shows the zero values of the motors.

Example:

ZEROS: A1 = 1.52, A2 = 2.65, A3 = 1.56, A4 = 1.00

ZEROS: A5 = -1.80, A6 = -0.11, TM = 0.00, GM = 0.00

ZEROS: RM = 0.00, GU = -0.74, GL = 1.68, RAH = 0.00

ZEROS: RAV = 0.00, D1T = 0.00, D1B = 0.00, D1R = 0.00

ZEROS: D1L = 0.00, D2T = 0.00, D2B = 0.00, D2R = 0.00

ZEROS: D2L = 0.00, TU = 0.00, TL = 0.00

Polarised analysis parameters

It shows the polarised analysis *pal* file used with the scan.

Example:

POLAN: DR I9 1 I10 -1

POLAN: DR P1 0 1 0 P2 0 1 0

POLAN: CO MN 150000

POLAN: DR P1 0 1 0.087 P2 0 1 0.087

POLAN: CO MN 150000

POLAN: DR P1 0 1 0.176 P2 0 1 0.176

POLAN: CO MN 150000

Other parameters

It shows other parameters like counting set point, sample temperatures, magnetic field...

Example:

PARAM: MN=1000000.00

PARAM: TT= 9.31, RT= 10.00, TT2= 0.00, RT2= 0.00, MAG= 0.00

Fortran format line

This the fortran format line describes the scan result line format.

Example:

FORMT: (I4,1X,F9.4,1X,F9.4,1X,F9.4,1X,F9.4,2(1X,F8.0),1X,F9.2,1x,F9.0,6(1X,F9.4))

Data

There are now the data of the scan as it printed in *mad* window.

Example:

DATA_:

PNT QH QK QL EN M1 M2 TIME CNTS TRT TT A3 A4 GU GL

1 2.5013 -0.5001 -0.4979 4.0033 9900000. 71. 483.81 512. 299.9990 298.5480 52.0100 -90.8100 10.9100 -1.7900

2 2.5010 -0.4001 -0.4991 4.0033 9900000. 68. 483.82 460. 299.9980 298.5510 50.1700 -90.0300 11.0600 -1.4800

3 2.5016 -0.3006 -0.4980 4.0033 9900000. 81. 483.61 459. 299.9980 298.5540 48.2300 -89.4400 11.1400 -1.0500