9.5 ESEEM script
The following script is for a 3-pulse (stimulated echo) ESEEM experiment. It uses the Oxford magnet for the 275 GHz spectrometer at the Rijksuniversiteit Leiden, a special pulser used there and the RB8509 ADC (which converts the voltage measured via a boxcar integrator, that can't be connected directly to the computer). As you will see there aren't too many differences to the previous script, the most interesting part is probably how the pulses are moved during the experiment.
1DEVICES: 2 3 ips120_10; // magnet power supply 4 rb_pulser; // pulser 5 rb8509; // ADC (connected to boxcar) 6 7 VARIABLES: 8 9 repeat_time = 50 ms; 10 p1_to_p2_dist = 400 ns; 11 p2_to_p3_dist = 400 ns; 12 p2_to_p3_incr = 20 ns; 13 p1_len = 100 ns; 14 p2_len = 200 ns; 15 p3_len = 200 ns; 16 field = 90000 G; 17 N_Avg = 10; 18 I; 19 data; 20 File; 21 22 ASSIGNMENTS: 23 24 TRIGGER_MODE: INTERNAL, REPEAT_TIME = repeat_time; 25 26 PREPARATIONS: 27 28 P1: FUNCTION = MICROWAVE, 29 START = 120 ns, 30 LENGTH = p1_len; 31 32 P2: FUNCTION = MICROWAVE, 33 START = P1.START + p1_to_p2_dist + 0.5 * ( P1.LENGTH - p2_len ), 34 LENGTH = p2_len; 35 36 P3: FUNCTION = MICROWAVE, 37 START = P2.START + p2_to_p3_dist + 0.5 * ( P2.LENGTH - p3_len ), 38 DELTA_START = p2_to_p3_incr, 39 LENGTH = p3_len; 40 41 P4: FUNCTION = DETECTION, 42 START = P3.START + p1_to_p2_dist + 0.5 * P3.LENGTH, 43 DELTA_START = p2_to_p3_incr, 44 LENGTH = 100 ns; 45 46 init_1d( 1, 0, p2_to_p3_dist / 1 ns, p2_to_p3_incr / 1 ns, 47 "Pulse separation [ns]", "Echo amplitude [a.u.]" ); 48 49 EXPERIMENT: 50 51 magnet_field( field ); 52 53 File = get_file( ); 54 55 I = 1; 56 pulser_state( "ON" ); 57 daq_gain( 4 ); 58 59 FOREVER { 60 wait( 1.1 * repeat_time * N_Avg ); 61 data = daq_get_voltage( CH0 ); 62 display( I, data ); 63 fsave( File, "#,#\n", 64 ( p2_to_p3_dist + p2_to_p3_incr * ( I - 1 ) ) / 1 ns, data ); 65 pulser_shift( ); 66 pulser_update( ); 67 I += 1; 68 } 69 70 ON_STOP: 71 72 save_comment( File, "%" ); |
In the DEVICES
section three devices are needed, the magnet power
supply, the pulser and a device or measuring the data, here it's a
analog/digital converter which has it's input connected to a boxcar
integrator. The signal goes to the boxcar and integrates a number of
signals on each trigger it receives (the set-up of the boxcar is done
manually).
In the VARIABLES
section we first have a variable for the
repetition time of the pulse sequence. The next two are the
center-to-center distances between the first and second and second
and third microwave pulse as well as the increment of the distance
between the second and third pulse. Then follow the lenghts of all
three pulses. Finally, we need the field at which the experiment is#
to be done and the number of averages to do for each pulse separation
step and, as usual, a counter, a value for storing a data point and
a file handle.
The ASSIGNMENTS
section for the pulser used is rather simlple:
since the functions of the pulses can't be changed only the trigger
mode and, with te mode, the repetition time needs to be set.
In the PREPARATIONS
section first the pulses must be defined.
The first microwave pulse can't start earlier then at 120 ns,
so that's used as the start time of the first pulse. The start
positions of both the other microwave pulses need a bit of
calculations since the values in the VARIABLES
section
are center-to-center pulse separations, but here start positions
are needed. The fourth pulse is the detection pulse that triggers
the boxcar integrator - it's required position can be calculated
from the ones of the three microwave pulses.
The other thing to be done in the PREPARATIONS
section is the
initialization of the graphics with init_1d()
- we need
an x
-axis that shows the distance between the second and third
microwave pulse.
The first things to be done in the EXPERIMENT
section are
telling the magnet power supply to go to the required field value
using the magnet_field()
function, open a file for saving
the data using get_file()
, switch on the pulser by a call
of pulser_state()
and set a gain factor for the DAC with
daq_gain()
. Then the usual loop starts.
Within the loop we first need to wait long enough for the boxcar to
average over as many pulse sequences as required - we wait for 10%
longer than necessary to be on the safe side, that's what the
additional factor of 1.1
is meant for. Then the DAC is told to
convert the voltage from the boxcar using
daq_get_voltage()
and this value is displayed and,
together with the current pulse separation in nano-seconds, written
into the data file. All then left to be done is to shift the third
microwave and the detection pulse using pulser_shift()
and asking the pulser to update the pulse sequence with
pulser_update()
.
Since one usually doesn't know at which pulse separation the signal
will have become undetectable the whole loop is an infinite loop,
i.e. the experiment only stops when the user presses the STOP
button.
Once the user has just done that it should still be possible to enter
some comments, e.g. which sample was used and other experimental
conditions. For this we need the ON_STOP
pseudo-section: the
program will jump to this point when the STOP
button gets
pressed and the remaining code following this label is executed (while
this happens the STOP
button has no function anymore). Calling
the function save_comment()
opens up a new window where
the user can input arbitrary text that then will get appended to the
data file.
This document was generated by Jens Thoms Toerring on September 6, 2017 using texi2html 1.82.