SPICE macros can be used to automate repeated scans, reciprocal-space mapping, temperature-dependent measurements, and instrument-alignment procedures.
The examples below are based on macros used in actual HODACA experiments. Numerical values such as motor positions, reciprocal-space coordinates, energy transfer, temperature, and counting conditions are experiment-specific and should be checked and modified before use.
For the syntax of individual SPICE commands, see the SPICE Command Reference.
Purpose:
Acquire a two-dimensional map by stepping A2 and performing a C2 scan at each A2 position.
Example:
scantitle "<Sample Name>, E=0.4 meV, A2-C2 map"
drive e 0.4
loop a=64.0, 65.51, 0.5
drive a2 %a
drive c2 -62
scan c2 -61.0 -57.01 0.5 preset mcu 5
endloop
scantitle ""
What it does:
A2 is stepped from 64.0° to approximately 65.5° in 0.5° increments. At each A2 position, a C2 scan is performed.
This type of macro can be used to acquire a two-dimensional intensity map in scattering-angle space.
Before use, check:
A2 and C2 ranges and step sizes
energy transfer
counting condition
motor limits and accessibility
scan title
Choosing the scan step
HODACA has 24 analyzer–detector channels arranged at 2° intervals. A single A2 setting therefore samples the scattering angle at approximately 2° intervals.
For general mapping, measurements at two A2 positions separated by 1° are recommended. This interleaves the analyzer channels and provides approximately 1° angular sampling, reducing the risk of missing a narrow feature between neighboring analyzer channels.
For finer sampling, four A2 settings separated by 0.5° can be used, for example A2 = 64.0, 64.5, 65.0, and 65.5°.
For C2, a 1° step is a useful standard choice. A 0.5° step may be used for sharp or detailed features, while a 2° step can be useful for broad features or preliminary scans.
Data acquired with fine angular steps can later be rebinned or integrated over wider angular bins during analysis. However, finer motor steps increase the number of motor movements and can substantially increase the total measurement time, particularly when the counting time per point is short.
Purpose:
Measure maps at several energy transfers using the same A2–C2 scan geometry.
Example:
scantitle "Elastic map"
drive e 0
loop i=85,86.81,0.2
drive a2 %i
scantitle "<Sample>, (HK0), E=0 meV, A2=%i deg"
scan c2 -45 40 1 preset mcu 10/60
endloop
scantitle "Inelastic map"
loop j=0.5,2.01,0.5
drive e %j
loop i=85,86.61,0.4
drive a2 %i
scantitle "<Sample>, (HK0), E=%j meV, A2=%i deg"
scan c2 -45 40 1 preset mcu 1
endloop
endloop
scantitle ""
What it does:
The first loop measures an elastic map at E = 0 meV. The second loop repeats the measurement at E = 0.5, 1.0, 1.5, 2.0 meV with a different A2 step and counting condition.
The map geometry and counting conditions should be adjusted for each experiment.
Purpose:
Measure an energy scan at a fixed reciprocal-space position.
Example:
drive h 1.5 k 0 l 0
drive e -0.6
scantitle "Sample, (1.5,0,0), constant-Q"
scan h 1.5 k 0 l 0 e -0.5 2.51 0.1 preset mcu 2
What it does:
Moves to Q = (1.5, 0, 0) and scans the energy transfer from −0.5 to 2.5 meV in 0.1 meV steps.
Explicitly specifying h, k, and l during the scan is recommended so that the intended reciprocal-space position is retained.
Purpose:
Repeat the same measurement at a sequence of temperatures.
Example:
te 30
wait 600
drive e -0.6
scantitle "Sample, (1.5,0,0), T=30 K"
scan e -0.5 2.5 0.1 preset mcu 2
te 60
wait 800
drive e -0.6
scantitle "Sample, (1.5,0,0), T=60 K"
scan e -0.5 2.5 0.1 preset mcu 2
What it does:
Changes the temperature, waits for a specified period, and then repeats the same energy scan.
Important:
A fixed wait time does not confirm that the sample temperature has stabilized. When appropriate, use the temperature-control commands and stabilization criteria suitable for the installed sample environment.
Purpose:
Check the positions of the four blades of the first slit.
Example:
scantitle "slit scan"
scan 1l 19 1 1 preset time 1
scan 1r 19 1 1 preset time 1
scan 1t 19 1 1 preset time 1
scan 1b 19 1 1 preset time 1
scantitle ""
What it does:
Sequentially scans the left, right, top, and bottom blades of the first slit.
Note:
For the first slit, smaller motor values correspond to a wider opening. A value of 1 is fully open, while 19 is fully closed.
Typical use:
This is one of the standard scans used during the initial setup of a user experiment, typically after sample alignment.
Long experiments can be divided into several macro files rather than placing the entire measurement sequence in a single file.
For example, a temperature-dependent mapping experiment may be divided into:
low-temperature measurements
intermediate-temperature measurements
high-temperature measurements
repeated or recovery scans
This makes it easier to restart an experiment after an interruption and to modify later parts of the measurement sequence without changing scans that have already been completed.
Before restarting from a later macro, always check the current instrument state, including temperature, energy transfer, motor positions, and sample orientation.
The following examples are intended primarily for instrument alignment and maintenance rather than routine user measurements.
Purpose:
Measure several Al₂O₃ reflections for instrument calibration or alignment checks.
Example:
scantitle "Al2O3, 012 scan"
scan a2 38 42 0.2 preset time 7
scantitle "Al2O3, 104 scan"
scan a2 53.5 57.5 0.2 preset time 7
scantitle "Al2O3, 113 scan"
scan a2 67 71 0.2 preset time 7
scantitle "Al2O3, 024 scan"
scan a2 84 88 0.2 preset time 7
scantitle "Al2O3, 116 scan"
scan a2 93.5 97.5 0.2 preset time 7
What it does:
Performs A2 scans around five Al₂O₃ reflections over a wide scattering-angle range.
This macro is intended for instrument calibration and alignment checks.
Instrument-staff use.
Purpose:
Perform rocking scans of the individual HODACA analyzer axes.
Example:
scanrelt c3-01 -3 3 0.3 5
scanrelt c3-02 -3 3 0.3 5
scanrelt c3-03 -3 3 0.3 5
...
scanrelt c3-24 -3 3 0.3 5
What it does:
Each analyzer axis from C3-01 to C3-24 is scanned over ±3° relative to its current position, using a 0.3° step and 5 s counting time per point.
The resulting scans are used to check or refine analyzer alignment.
Instrument-staff use.
Before running a macro:
Check the current sample, UB matrix, and scattering plane.
Confirm that all requested motor positions are accessible.
Check the energy-transfer range and counting conditions.
Check the installed sample environment and temperature limits.
Use the ScanSim feature in ASYURA, where applicable, before running unfamiliar scan sequences.
For long unattended measurements, check the instrument state before restarting from the middle of a macro sequence.
Macros used for instrument calibration or alignment should not normally be modified or executed by general users without understanding the corresponding instrument procedure.