The Spin Polarised Hot Neutron Beam Facility

Control Software

Some MAD commands, specific to D3

Note that help is provided on line for most of the general MAD commands:
To get a list in MAD, type: help commands

A rather complete description may also be found in the D9 web pages

Instrument configuration

par crpd 0(1): CRYOPAD mode off (on). CRYOPAD mode off switches on normal beam mode.

Polarisation state

spi (spo) sets polarization in (out)

spi 1: flipper_in set  "spin up" (negative current)
spi -1: flipper_in set  "spin down" (positive current)
spi 0: no current in flipper_in (beam roughly de-polarised)
spi +x: polarization along +x (acts on nutators and precession coils)
spi –x, spi +y, spi –y, spi +z, spi –z: similar for polarization along ±x, ±y, ±z
spo... : same as spi for polarization out

spi ±x, ±y, ±z rotates the nutator angle theta_in (short name ti) and sets the current in the first precession 
coil to a value ii (Amps), corresponding to a precession angle xi (degs). Similarly spo ±x, ±y, ±z acts on to, io, xo.
All these axes may be driven separately for tests.

Count and scan

flacq (or fla): same as acq, with extra parameter fl:

fla 5s t  fl 40 n 2 0: count for 5 seconds, with 40% of the time spin_up and do it twice, without saving
fla 5s t  fl 40 n 2: same but saves the results into a Numor

flscan (or fls): same as scan with extra parameter fl (see flacq)

qsc  and sscan  types of scan (for q-scan and simultaneous scan of 2 axes): use the extra parameter fl (see flacq) to flip

par viz 0 (1) to plot count rates (polarization) during a scan in flipping mode

par sps 300000 1 0 30

300 seconds (300000 µs) per point (or per iteration in bpb: see below)
1 stands for time (0 for monitor)
0 for no timeout when counting on monitor (not used)
0 0 minimum counts/sec to define peak (sets a variable success to .false. if smaller – see below)

Flipping ratio / asymmetry ratio measurement

inib initiates a reduced output file, with contents depending on crpd parameter:

in flipping ratio mode:
Numor, HKL, angles, flipping ratio and error, T, H, date & time, omega shift
(format compatible with CCSL DTYP 9)
with output file results.bpb

in cryopad mode:
Numor, HKL, date time T Pol_in Pol_out  Asym dAsym Flipping_ratio dR
Pol_in, Pol_out = ±x, ±y, ±z
with output file results.apo

creates the file: filename.bpb or fiename.apoinib filename
without the inib command, the file results.bpb (results.apo) is created automatically

par bpb 0.2 2. 3 0

0.2 = fraction of time in background
2. = distance from peak for background measurement (in degrees)
3 = number of iterations
0/1/2/3 for no optimization (0) to full optimization (3)

par sps 30000É: the time is the time per iteration and not the total time

par  nsf cell_name He_pressure initial_He_pol Date Time T1

cell_name: up to 8 characters
Date = DD MM YY
Time = HH MM
T1 estimated relaxation time (Å 100 hours)
(the expected analyzer efficiency is calculated by the program for 15 cm cell:)

par flip 0 (1): to flip using flipper in (out).  

Make sure the other flipper is set to 1 using the spi command, if you use a command not specific to polarised neutron mode.

Advanced CRYOPAD commands (ask instrument scientists for details)

par mdc: sets the precession matrix (CRYOPAD)

par aber 0(1) val: to set (remove) the aberration correction on theta-out (to), according to equation: to = to(setpoint) ­– val*sin(2to)

a command starting with  > will be executed only if success=.true.

a command starting with  < will be executed only if success=.false.