-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStark_shift_1_half_to_1_half_loop.txt
151 lines (106 loc) · 7.36 KB
/
Stark_shift_1_half_to_1_half_loop.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
{{
//// Common Parameter Definition
//Clock Parameters
const sampling_rate={sampling_rate}; // Hz; Sampling rate, should be the same as what you set on the right panel!
const Number_of_burning_pulses = {Number_of_burning_pulses}; //Number of burning pulse repetitions
const Number_of_burning_back_pulses = {Number_of_burning_back_pulses}; //Number of burn-back pulse repetitions
const Number_of_amplitudes = {Number_of_amplitudes}; // Number of stark shift amplitudes
const Number_of_stark_readings = {Number_of_stark_readings}; // Number of averages for Stark measurements
cvar i;
// Buring Pulse Parameters
const centre_freq_burning={centre_freq_burning}; //Hz; Central frequency set to drive the AOM for burning
const chirpAmplitude_burning = {chirpAmplitude_burning};// V; amplitude of burning pulse
const freq_sweeping_burning={freq_sweeping_burning};//Hz; set the scanning frequency range of burning pulse (the actual scanning range should be 4*freq_detuning)
const burning_duration={burning_duration}; //s; burning time
const startFreq_burning = (centre_freq_burning-freq_sweeping_burning)/sampling_rate;//Hz; starting frequency of the burning pulse
const stopFreq_burning = (centre_freq_burning+freq_sweeping_burning)/sampling_rate;//Hz; ending frequency of the burning pulse
const chirpSamples_burning = round(burning_duration*sampling_rate/16)*16;// Calculating sampling points
const phase = 0;
// Burning Back Pulse Parameters
const centre_freq_burning_back={centre_freq_burning_back}; //Hz; Central frequency set to drive the AOM for burn-back
const chirpAmplitude_burning_back = {chirpAmplitude_burning_back};// V; amplitude of burn-back
const freq_sweeping_burning_back={freq_sweeping_burning_back};//Hz; set the scanning frequency range of burn-back (the actual scanning range should be 4*freq_detuning)
const burning_back_duration={burning_back_duration}; //s; burning time burn-back
const startFreq_burning_back = (centre_freq_burning_back-freq_sweeping_burning_back)/sampling_rate;//Hz; starting frequency of the burn-back
const stopFreq_burning_back = (centre_freq_burning_back+freq_sweeping_burning_back)/sampling_rate;//Hz; ending frequency of the burn-back
const chirpSamples_burning_back = round(burning_back_duration*sampling_rate/16)*16;// Calculating sampling points
// Reading Pulse Parameters
const centre_freq_reading={centre_freq_reading};//Hz; Central frequency set to read out the burned spectral hole
const chirpAmplitude_reading = {chirpAmplitude_reading};// V; amplitude of reading-out pulse
const freq_sweeping_reading={freq_sweeping_reading};//Hz; set the scanning frequency range of reading-out pulse (the actual scanning range should be 4*freq_detuning) 1.32877326E6
const reading_duration={reading_duration}; //s; reading-out time
const startFreq_reading = (centre_freq_reading-freq_sweeping_reading)/sampling_rate;//Hz; starting frequency of the reading-out pulse
const stopFreq_reading = (centre_freq_reading+freq_sweeping_reading)/sampling_rate;//Hz; ending frequency of the reading-out pulse
//const stopFreq_reading = (centre_freq_reading-freq_detuning_reading)/sampling_rate;//Hz; stopping frequency of the reading-out pulse in opposite direction (from positive to negative)
//const startFreq_reading = (centre_freq_reading+freq_detuning_reading)/sampling_rate;//Hz; ending frequency of the reading-out pulse in opposite direction (from positive to negative)
const chirpSamples_reading = round(reading_duration*sampling_rate/16)*16;// Calculating sampling points
// E-filed Pulse Parameters
const rect_amplitude = {rect_amplitude}; //V; amplitude of rectangular pulse train
// Shuffle Pusle Parameters
const centre_freq_shuffle={centre_freq_shuffle};//Hz; Central frequency of the shuffle pulse
const chirpAmplitude_shuffle = {chirpAmplitude_shuffle};// V; amplitude of shuffling pulse
const freq_sweeping_shuffle={freq_sweeping_shuffle};//Hz; set the scanning frequency range of shuffling pulse
const shuffle_duration={shuffle_duration};//s; shufling time
const startFreq_shuffle = (centre_freq_shuffle-freq_sweeping_shuffle)/sampling_rate;//Hz; starting frequency of the shuffling pulse
const stopFreq_shuffle = (centre_freq_shuffle+freq_sweeping_shuffle)/sampling_rate;//Hz; ending frequency of the shuffling pulse
const chirpSamples_shuffle =round(shuffle_duration*sampling_rate/16)*16;// Calculating sampling points
//// Waveform Definitions
wave marker_left=marker(chirpSamples_reading/2,0);
wave marker_middle=marker(chirpSamples_reading/16,1);
wave marker_right=marker(chirpSamples_reading/2, 0);
wave w_marker=join(marker_left,marker_middle,marker_right);
wave chirpedSine_burning_0 = chirpAmplitude_burning*chirp(chirpSamples_burning,1,startFreq_burning,stopFreq_burning, phase); //burning pulse with marker appended
wave chirpedSine_burning = chirpAmplitude_burning*chirp(chirpSamples_burning,1,startFreq_burning,stopFreq_burning, phase); //burning pulse without marker appended
wave chirpedSine_burning_back = chirpAmplitude_burning_back*chirp(chirpSamples_burning_back,1,startFreq_burning_back,stopFreq_burning_back, phase); //burnback pulse
wave chirpedSine_reading = chirpAmplitude_reading*chirp(chirpSamples_reading,1,startFreq_reading,stopFreq_reading, phase)+w_marker; //read-out pulse
wave w_flat = rect(chirpSamples_reading, rect_amplitude)+w_marker;
//assignWaveIndex(1,chirpedSine_reading,0);
//assignWaveIndex(2,w_flat,0);
assignWaveIndex(chirpedSine_reading,w_flat,0);
wave chirpedSine_shuffle = chirpAmplitude_shuffle*chirp(chirpSamples_shuffle,1,startFreq_shuffle,stopFreq_shuffle, phase); //shuffle pulse
//// Pulse Sequence
//setTrigger(0);
cvar k;
for(k=0;k < Number_of_amplitudes;k++){{
// Play Burning Pulse Sequence
const delay_00 = 0.3E-3; //s; time delay between repeated burning pulses
const sample_delay_00=round(delay_00*sampling_rate/16)*16;
playWave(chirpedSine_burning_0);
playZero(sample_delay_00);
for (i = 0; i < Number_of_burning_back_pulses; i++) {{
playWave(chirpedSine_burning);
playZero(sample_delay_00);
}}
// Wait Between Burning and Burning Back Pulses
const delay_01=0.3E-3; //s; time delay between the burning pulses and burn-back
const sample_delay_01=round(delay_01*sampling_rate/16)*16;
playZero(sample_delay_01);
// Play Burning Back Pulses
const delay_02 = 0.3E-3; //s; time delay between repeated burn-back pulses
const sample_delay_02=round(delay_02*sampling_rate/16)*16;
for (i = 0; i < Number_of_burning_back_pulses; i++) {{
playWave(chirpedSine_burning_back);
playZero(sample_delay_02);
}}
// Wait Between Burning back and Readout Pulses
const delay_05=1E-3; //s; time delay between the clean and read-out pulses (also, between burn and read-out when testing with no burn-back and clean)
const sample_delay_05=round(delay_05*sampling_rate/16)*16;
playZero(sample_delay_05);
// Play Readout and Apply E-field
//setTrigger(1);
//playWave(chirpedSine_reading);
executeTableEntry(k);
waitWave();
//setTrigger(0);
// Wait between readout and shuffle
const delay_06=20E-3;//s; time delay between the read-out pulse and shuffle pulse
const sample_delay_06=round(delay_06*sampling_rate/16)*16;
playZero(sample_delay_06);
//setTrigger(0);
playWave(chirpedSine_shuffle);
// Wait between shuffle and Burning pulses
const delay_07=40E-3;//s; time delay between the shuffle pulse and burning pulse
const sample_delay_07=round(delay_07*sampling_rate/16)*16;
playZero(sample_delay_07);
}}
}}