Instrument control for users is only possible from the control terminal
Starting with the instrument control program
You should have the prompt MAD > on the instrument control terminal. If not, (e.g. you see the prompt D17) start the instrument control program by just typing MAD. Note: it takes about 15 sec until the prompt MAD comes up. If MAD was not cleanly exited or if MAD is blocked, from another UNIX window type MADKILL before typing MAD again.
In another window type lamp to start the idl control/analysis program
click pad and start the macros (from buttons) d17data and d17spy. The displays can be made larger in the dial menus by selecting large dial
If lamp hangs up it can (mostly) be brought back to life by <crtl> c in the lamp window until the snooper> prompt appears in the unix window. At
the snooper prompt type
>retall
then
>lamp
if this does not work you will have to stop lamp and restart by typing lamp in the unix window
To top
san rotation of sample
trs translation of sample
phi tilt of sample
sht sample height
det detector distance
dan detector angle
s1w background slit width
s1h background slit height
s2w first collimation slit width
s3w second collimation slit width
s3h second collimation slit height
For monochromatic and polarized neutrons only
col1 collimation arm angle
sol in/out of sollar collimator
ros rotation of sollar colimator
trm translation of monochromator (30=pol, 101=mono & 230=out)
rof rotation of mono/pol (~1.76)
trf translation of filter (101= in , 230=out)
rof rotation of filter (~ 0.1)
tra translation of analyser (-2-530mm)
Not motors
fl1 flipper in/out
b1 flipper current (use the lamp dial flipper to tune the currents)
b2 compensation current
att attenuator (att n sets att value n. n=0-7)
chop open chopper opening
chop speed chopper speed
To read a motor value:
MAD>san <return>
reads the current value of the motor san
To move a motor:
MAD>san x <return>
moves the motor san to the value x
To re-define a motors value without moving it:
MAD>par set san x <return>
re-defines the motor san to the value x without moving it
To scan a motor:
MAD>scan san n1 n2 n3 co n4 t a <return>
scans the motor san from n1 to n2 with a step n3, counts for n4 seconds and plots the total detector counts without saving each run. Leaving out the ëaí will save each run.
To top
An alternative to the 'manual' method below there is now an automatic macro which will align the sample. Simply type in the LAMP window
>autoalign,a,b
where a is th sample length and b is the desired sample angle. The program will under-illuminate the sample, set trs to be zero at the correctly
aligned value and move and define the sample angle to be the desired value.
To top
1) Switch the motors san.trs,phi and sht to manual
2) Align the sample in phi and san by getting the reflection from the laser perpendicular to the beam on the cross on the wall.
Move sht so this laser stikes the sampl ein the middle. Align the sample in trs such that the laser parallel to the beam just strikes the reflecting surface.
3) Switch the motors san.trs,phi and sht back to program
4) Re-define the values for trs,san,phi and sht to be zero i.e.
MAD>par set san 0 <return>
MAD>par set trs 0 <return>
MAD>par set phi 0 <return>
MAD>par set sht 0 <return>
4) Run the alignment script file align.cmd with the command:
MAD>start align <return>
5) You should have a peak in the trs scan. If the peak value for trs is x then first move
negative of the to take up backlash:
MAD>trs (x-0.5) <return>
then move to the peak:
MAD>trs x <return>
6) Take a quick run to enable a calculation of the true angle between the beam ans the reflection surface, q
MAD>run 10 t
7) In lamp use the macro tth to calculate q
tth,n1,n2 <return>
where n1 is a run number of a direct beam run and n2 is the run number of the quick run just taken. Look in the blue window from which lamp was running and note the calulated value of q.
8) Re-define the value of san to be this calculated value (it should be close to 0.3)
MAD>par set san q
where q is the calculated value.
If the calculated value was more than 0.2 degrees from 0.3 then repeat steps 5 to 8
9) You are now ready to run. Trs zero is now means the beam strikes the middle of the reflection surface and san is equal to the angle between the beam and the reflection surface. To move the sample out of the beam move positive in trs.
To top
1) What is the q range you wish to measure? qmin-qmax
2) Do you want high (constant 1% dT/T) or low resolution (1-10% dT/T)?
3) What is the active reflection area of your sample L=length along beam H=height
4) The useful wavelength range is 2.2-19A. This determines the angles needed to cover the desired q-range.
Using q=sin-1(ql/(4p)) the first angle is determined by qmin and lmax
q1= sin-1(qmin x lmax/(4p))
The final angle is determined by qmax and lmin
qf= sin-1(qmax x lmin/(4p))
Now if these two angles are sufficient for the entire q-range they will have to overlap in q
if the maximum q from the first angle , 4psin(q1)/lmax is greater than the minimum q from the final angle, 4psin(qf)/lmin then only these two angles are needed. If there is no overlap then an intermediate angle must be chosen that overlaps the q-range from both q1 and qf.
4) Assuming two angles were sufficient we need to calculate what collimation we need to under-illuminate the sample for each angle. If we keep the illumination constant we gain in flux at the price of looser resolution in the second angle. Use the program slitwit on d17sgi to calculate good values for s2w and s3w for each angle. The distance between the slits is 3.4m and the distance from the final slit to the sample axis is 210mm. Sample length is L
5) Usually a chopper opening of 1.2 is fine for the first angle. This corresponds to zero true chopper opening (the is an offset of 1.2 degrees) and means dT/T is constant at 1%. For the second angle if the low resolution option is chosen the chopper angle can be set to be 3-4 degrees. For high resolution both angles would use the 1.2 degrees value.
6) Set he height of the beam (s3h) to be 5mm less than the sample height H. You may have to set it twice.
7) With the sample out of the beam set the conditions for the first angle (opening, s2w and s3w) with the detector angle, dan set to 0.8 degrees. Take a quick run and make sure the the mean rate is less than 10,000 c/s. If so reduce the slits. If the rate is fine then count for an hour with these conditions.
to set a chopper opening:
MAD> chop open 1.2 <return>
it takes about 5 minutes to move from 1.2 to 3 degrees.
to read the chopper status
MAD>chop read <return>
8) For the second angle with the larger slit values and chopper opening the beam cannot be directly put on the detector. Rotate the oscillating attenuator, found just after the slit s3, into the beam. Switch on the power supply found under the focusing guide (red button) and the slit should oscillate up and down. This provides a wavelength independent attenuation of the beam. Set the chopper opening, s2w and s3w for the second angle conditions and measure for an hour.
9) Place the water sample in the beam making sure that it is the correct height. Remove the oscillating attenuator from the beam. Move dan to 30 degrees, s2w=s3w=3mm and open the chopper until you have a rate of ~1000c/s. Count for one hour.
10) Remove the water and mount the sample.
To top
Angular resolution
Choose:
Constant relative angular resolution- Both collimation slits are opened for each sample angle (q-point) such as to keep the illumination and relative angular divergence constant.
Why? Maximises intensity for each q-point. Fractional q-resolution is constant.
But: Must make a calibration run of the direct beam of each q-point. This typically takes 30 minutes and can be used for many reflectivity scans.
Or:
Constant slits- Both slits are fixed at a value such that the sample is under-illuminated at the smallest theta in the scan.
Why? Only one direct beam measurement is required saving time and this does not rely on the use of attenuators.
But: Severe loss of intensity at high q as only a tiny fraction of the sample is illuminated. Relative angular resolution is good (and gets better at high q) but needlessly so as the q resolution will never be better that that given by the selector.
Detector movement
Choose:
Theta 2theta- For each q-point the detector angle is moved double the sample angle thus keeping the reflected beam on the same part of the detector.
Why? Reduces the effect of varying detector efficiency of the pixel lines.
But: If DAN cannot position better than 0.1 degrees (which is not normally the case) then there is no point as the reflection is not kept at the desired X pixel line.
Or:
Constant detector angle- Detector angle remains constant throughout the scan.
Why? If there is interesting SANS scattering in parallel with the reflectivity it is more convenient to analyse this with a fixed detector angle.
But: Maximum reflection angle (hence q) is limited by half the angle subtended by the detector from the sample position. Water calibration must be more reliable.
Measurement steps in q
Choose:
Resolution q steps- dq/q is known from the contributions of the selector (dlambda/lambda) and the angular resolution (dtheta/theta). Resolution steps means that the gap between 2 q points in the scan is dq.
Why? Whatís the point in taking more points in q that can be resolved by the instrument? Scan production programs do allow the step to be some multiple of dq.
But: At low q the step size may be smaller than the precision of some motors
Or:
Constant q steps- dq is a constant for the whole scan.
Why? There may regions of interest such as the critical edge, off specular scattering or bragg peaks where many points may be required even if they are superficial in terms of reflectivity resolution.
But: If there are no parts of the scan of special interest it is an enormous waste of time and neutrons.
6) Use the program SCAINMAIN.TK to create a scan command file
Simply type scanmain.tk at the prompt in a UNIX shell. The program allows you to make all the choices for that type of scan you require and FTP it to the instrument. From MAD it only remains to type
MAD> start NAME <CR> where name is the NAME.CMD file created by scanmain.tk
To top
On the instrument control computer, Just type the name to start in lamp or idl
tof
Analyses TOF data to create R(q) with the background removed
spondle
To retreave a R(q) data file and read it into a workspace
spondle,'stuff.dat',w1,x1,e1
reads the file stuff.dat into workspace 1
tth
calculates 2 theta for a direct stored beam and reflection run
tth,numor1,numor2
where numor1 id the db run and numor2 is the reflection run. The reults is seen in the blue idl window outside lamp.
The following programs can be accessed from the Silicon graphic terminal by typing the program name at a UNIX shell prompt.
slitwit
Calculates the angular resolution and illumination of the sample given the instrument geometry, sample dimensions and reflection angle.
scanmain.tk
Derived from the old FORTRAN scanscam program to create a scan command file. Also creates a direct beam calibration file if desired for a variable slit scan. The resulting files are ftpíed to the instrument control computer at the push of a button.
slab_fit
Maximum entropy program for finding the scattering length density profile
from the reflectivity data with the minimum of assumptions. From D. Shiva RAL.
slab_refine
Refinement of a starting guess of the scattering length density profile from slab_fit or the user. From D. Shiva RAL.
To top
MAD > scan trs n1 step co n2 m a n3
where trs is the motor (this is the sample translation motor. N1 is the motor starting value, step is the coder step, co sets a count at each value for a preset of n2. M can be m or t for monitor or time presets, a is alignment mode and n3 is the total number of steps in the scan. With the ëaí then no data is stored but a listing of the detector counts in a box defined by par scan for each step is shown plus the coder value of any peak found is given. If the ëaí is omitted then each step is stored as a normal run file.
MAD will plot the total counts over all time bins and all detector pixels. Make sure the direct beam is not on the detector if you are scanning a reflection.
To top
Enter the parameter level.
command on the instrument control terminal:
MAD > par[ameter] <CR>
The following commands are that which would be typed at the mad prompt. If you are in the parameter level as described above the initial par can be omitted.
(a) enter experimenters name
command on the instrument control terminal:
MAD > par name user <CR> where user is your name (10 ASCII characters)
(b) enter experiment title
command on the instrument control terminal:
MAD > par title experiment <CR> where experiment is your
experiment title (39 ASCII characters)
(e) enter proposal number
command on the instrument control terminal:
MAD > par proposal number <CR> where number is the proposal number
(8 ASCII characters, e.g. 9-99-999)
(d) enter logbook number
command on the instrument control terminal:
MAD > par log number <CR> where number is the number of the current logbook
To top
The chopper separation, CHT defines an offset in the time resolution, dT/T=CHT/D where D is the total TOF distance
To change CHT
MAD>CHT n <CR> where n is the chopper separation in mm. Range 4-84mm
To top
The chopper opening determines the gradient of dT/T as a function of wavelength
To change speed and opening (must be done together)
MAD>Chopper speed n opening m <CR> sets the speed n rpm and m window opening in degrees. Speed range: 400-1400, opening range 0-45 degreees
To read back the status of both the chopper disks:
MAD>Chopper read <CR>
To top
MAD> det n <CR> where n is the detector distance in meters (1.2-3.4m)
To top
MAD> dan n <CR> where n is the detector angle in degrees (-2 - 50 deg)
To top
MAD > coll n <CR> where n is the collimation arm angle in degrees (-2 - 5 deg)
To top
The three attenuators can be moved into or out of the beam under computer control in any combination. there are thus 7 possible attenuator values.
To set a given attenuator value:
MAD> att n <CR> where n is the att number. This is zero for no attenuator.
Each additional attenuator drops the beam intensity by a factor of 2.6
To top
You cannot move the beamstop as it does not exist!
To top
Be sure that the beam is open.
MAD > run preset m (or t) s (or n) x <CR> where preset is the desired preset value
either on monitor (m) or on time in sec. (t).The spectrum is saved by typing s (=save); it is not saved when typing n (=nosave).The default option (without specification) is s (=save.) x is a number of repeats you wish to count for (default one run only if omitted)
To top
To abort a spectrum without save type in the MAD window KILL.
To abort a spectrum with save type STOP <CR> .
To pause a run type PAUSE <CR>
Te resume counting type RESUME <CR>
To top
MAD> start name <CR> where name corresponds to the file NAME.CMD.
where NAME.CMD contains a list of standard MAD commands. Command files can be nested up to seven levels.
To top
The D17 detector has a base array of 285x275 pixels.
MAD> par group nx ny xmin xmax ymin ymax
where nx and ny are grouping factors. xmin etc are always the ungrouped limits of the desired detector window
normal TOF operation we group over the y pixels
par group 1 275 0 285 0 0
for MONO mode we can take all the detector
par group 1 1 0 285 0 275
To top
Hit the d17data button in pad control. This starts dials showing the data every 5 seconds. This data can be read into a workspace by typing w1=d1.value (warning it may be log10 of the data)
To top
This slit can change the beam size in the horizontal and vertical directions to a precision of 0.1mm
Each shutter can be individually controlled but it is recommended to use the following compound commands:
To change the horizontal slit width
MAD> SmW n <CR>
To translate the mean position of the horizontal slits (not recomended unless you suspect the mean horizontal positions of the slits do not lie on a radius centred on the sample axis rotation)
MAD> SmX n <CR>
To change the vertical slit separation (only first and last slits 1,3)
MAD> SmH n <CR>
To change the mean position of the vertical slits (only first and last slits 1,3)
MAD> SmY n <CR>
m corresponds to the slit number:
1 is the first slit, positioned immediately after the beam shutter, before the chopper for reducing bacground 0.1mm precision in all motors
2 is the first precision (0.02mm) collimation slit before the focusing guide in the collimator arm. There are no vertical shutters so only the commands S2W and S2X exist.
3 is the final slit before the sample. The horizontal beam defining slits are as 2 but the vertical slits are low precision as 1
Ranges:
S1W 0-10 mm
S1X -2,2 mm
S1H 0-160 mm
S1Y -2,2 mm
S2W 0-30 mm
S2X -2,2 mm
S3W 0-10 mm
S3X -2,2 mm
S1H 0-70 mm
S1Y -2,2 mm
S1W and S3W can move 0-30mm but at present, due to radioprtection limitations, the beam is resitricted to 10mm width at both positions.
To top
MAD> SHT n <CR> Where n is the sample height in mm. Precision 0.1mm range +/-25mm
To top
MAD> TRS n <CR> Where n is the sample x translation in mm. Precision 10 microns. range: +/-30mm
To top
MAD> SAN n <CR> Where n is the sample rotation in degrees. Precision 0.02 deg. Range 0-90 deg
To top
MAD> PHI n <CR> Where n is the sample rotation in degrees. Precision 0.02 deg. Range +/- 5 deg
To top
Polarised reflectivity requires a polarising mirror with a variable angle and a rotation of the sample rotation axis position such that the reflected beam from the mirror lies on a radius from the sample rotation axis. In addition the polarisation can be flipped. The setting of the mirror and sample position should normally be done by an instrument responsible. The reflection angle of the polarisation mirror strongly affects the efficiency of polarisation and reflected intensity
Changing from TOF to monochromatic mode takes only 20 minutes but should be done under the supervision of an instrument responsible
To top
MAD> b1 b2 on <CR> Flips the neutrons 180 degrees relative to the initial polarisation set by the mirror.
MAD> b1 b2 off <CR> No flip relative to the initial polarisation set by the mirror.
b1 and b2 are the currents in the compensation and flipper coils located after the polariser
Polarisation analysis is to be insatlled in the near future
To top