diff --git a/Scripts/Hahn_Echo/op_hahn_exp.py b/Scripts/Hahn_Echo/op_hahn_exp.py index 91d0fff..face746 100644 --- a/Scripts/Hahn_Echo/op_hahn_exp.py +++ b/Scripts/Hahn_Echo/op_hahn_exp.py @@ -128,12 +128,16 @@ def hahn_experiment(pars, run): # run the pulse sequence: e.wait(RD) # delay between scans e.set_frequency(SF+O1, phase=PH1) # set frequency and phase for 1st RF pulse + e.ttl_pulse(TXEnableDelay, value=TXEnableValue) # enable RF amplifier e.ttl_pulse(P90, value=TXEnableValue|TXPulseValue) # apply 1st 90-degree pulse - e.wait(TAU-P90/2-TXEnableDelay) # wait for TAU + + e.wait(TAU-P90/2-P180/2-TXEnableDelay) # wait for TAU e.set_phase(PH3) # set phase for 2nd 90-degree pulse + e.ttl_pulse(TXEnableDelay, value=TXEnableValue) # enalble RF amplifier e.ttl_pulse(P180, value=TXEnableValue|TXPulseValue) # apply 2nd 90-degree pulse + e.set_phase(PHA) # set phase for receiver e.wait(TAU-P180/2+D4) # wait for TAU e.record(SI, SW, sensitivity=ADCSensitivity) # acquire echo points diff --git a/Scripts/Saturation_Recovery_with_Solid_Echo_Detection/op_satrec2_exp.py b/Scripts/Saturation_Recovery_with_Solid_Echo_Detection/op_satrec2_exp.py index 28c1ab4..2aef311 100644 --- a/Scripts/Saturation_Recovery_with_Solid_Echo_Detection/op_satrec2_exp.py +++ b/Scripts/Saturation_Recovery_with_Solid_Echo_Detection/op_satrec2_exp.py @@ -161,7 +161,7 @@ def satrec2_experiment(pars, run): # echo detection: e.ttl_pulse(TXEnableDelay, value=TXEnableValue) # enable RF amplifier e.ttl_pulse(P90, value=TXEnableValue|TXPulseValue) # apply 90-degree pulse - e.wait(D3-P90/2-TXEnableDelay) # echo delay + e.wait(D3-P90-TXEnableDelay) # echo delay e.set_phase(PH4) # set phase for next pulse e.ttl_pulse(TXEnableDelay, value=TXEnableValue) # enable RF amplifier e.ttl_pulse(P90, value=TXEnableValue|TXPulseValue) # apply 90-degree pulse diff --git a/Scripts/Solid_Echo/op_solidecho_exp.py b/Scripts/Solid_Echo/op_solidecho_exp.py index 4cd6f79..fa74221 100644 --- a/Scripts/Solid_Echo/op_solidecho_exp.py +++ b/Scripts/Solid_Echo/op_solidecho_exp.py @@ -130,7 +130,7 @@ def solidecho_experiment(pars, run): e.set_frequency(SF+O1, phase=PH1) # set frequency and phase for 1st RF pulse e.ttl_pulse(TXEnableDelay, value=TXEnableValue) # enable RF amplifier e.ttl_pulse(P90, value=TXEnableValue|TXPulseValue) # apply 1st 90-degree pulse - e.wait(TAU-P90/2-TXEnableDelay) # wait for TAU + e.wait(TAU-P90-TXEnableDelay) # wait for TAU e.set_phase(PH3) # set phase for 2nd 90-degree pulse e.ttl_pulse(TXEnableDelay, value=TXEnableValue) # enalble RF amplifier e.ttl_pulse(P90, value=TXEnableValue|TXPulseValue) # apply 2nd 90-degree pulse @@ -144,4 +144,4 @@ def solidecho_experiment(pars, run): e.set_description('run', run) # current scan e.set_description('rec_phase', -PH2) # current receiver phase - return e \ No newline at end of file + return e diff --git a/Scripts/Spin_Alignment/op_spinal_exp.py b/Scripts/Spin_Alignment/op_spinal_exp.py index 4d7d1fa..59e9770 100644 --- a/Scripts/Spin_Alignment/op_spinal_exp.py +++ b/Scripts/Spin_Alignment/op_spinal_exp.py @@ -1,25 +1,25 @@ # -*- coding: iso-8859-1 -*- -TXEnableDelay = 2e-6 +TXEnableDelay = 1e-6 TXEnableValue = 0b0001 # TTL line blanking RF amplifier (bit 0) TXPulseValue = 0b0010 # TTL line triggering RF pulses (bit 1) -ADCSensitivity = 2 # voltage span for ADC +ADCSensitivity = 1 # voltage span for ADC def experiment(): # Jeener-Broekaert echo sequence (a.k.a. spin-alignment) # set up acquisition parameters: pars = {} - pars['P90'] = 2.3e-6 # 90-degree pulse length (s) + pars['P90'] = 4.2e-6 # 90-degree pulse length (s) pars['SF'] = 46.7e6 # spectrometer frequency (Hz) pars['O1'] = -30e3 # offset from SF (Hz) - pars['SW'] = 1e6 # spectral window (Hz) - pars['SI'] = 1*512 # number of acquisition points - pars['NS'] = 8 # number of scans + pars['SW'] = 10e6 # spectral window (Hz) + pars['SI'] = 1*1024 # number of acquisition points + pars['NS'] = 16 # number of scans pars['DS'] = 0 # number of dummy scans - pars['RD'] = 3 # delay between scans (s) + pars['RD'] = 0.5 # delay between scans (s) pars['D1'] = 30e-6 # delay after first pulse, or tp (s) pars['D2'] = 100e-6 # delay after second pulse, or tm (s) - pars['PHA'] = -36 # receiver phase (degree) + pars['PHA'] = -52 # receiver phase (degree) pars['DATADIR'] = '/home/fprak/Students/' # data directory pars['OUTFILE'] = None # output file name @@ -104,10 +104,10 @@ def spinal_experiment(pars, run): pars['PROG'] = 'spinal_experiment' # 8-step phase cycle (1-14 modifided to deal with T1-recovery and extended for Re/Im imbalance) - pars['PH1'] = [0, 270, 0, 270, 90, 90, 180, 180 ] # 1st (90-degree) pulse - pars['PH3'] = [90,180, 90, 180, 180, 180, 90, 90 ] # 2nd (45-degree) pulse - pars['PH4'] = [90, 90, 270, 270, 180, 0, 0, 180 ] # 3rd (45-degree) pulse - pars['PH2'] = [0, 180, 180, 0, 90, 270, 90, 270 ] # receiver + pars['PH1'] = [0, 270, 0, 270, 180, 90, 180, 90] # 1st (90-degree) pulse + pars['PH3'] = [90, 180, 90, 180, 90, 180, 90, 180] # 2nd (90-degree) pulse + pars['PH4'] = [90, 90, 270, 270, 0, 0, 180, 180] # 3rd (90-degree) pulse + pars['PH2'] = [0, 180, 180, 0, 90, 270, 270, 90] # receiver # read in variables: P90 = pars['P90'] @@ -137,13 +137,13 @@ def spinal_experiment(pars, run): e.ttl_pulse(TXEnableDelay, value=TXEnableValue) e.ttl_pulse(P90, value=TXEnableValue|TXPulseValue) # 90-degree pulse - e.wait(D1-P90/2-TXEnableDelay) # 'short tau' + e.wait(D1-P90/2-P45/2-TXEnableDelay) # 'short tau' e.set_phase(PH3) e.ttl_pulse(TXEnableDelay, value=TXEnableValue) e.ttl_pulse(P45, value=TXEnableValue|TXPulseValue) # 45-degree pulse - e.wait(D2-P45/2-TXEnableDelay) # 'long tau' + e.wait(D2-P45-TXEnableDelay) # 'long tau' e.set_phase(PH4) e.ttl_pulse(TXEnableDelay, value=TXEnableValue) @@ -151,7 +151,7 @@ def spinal_experiment(pars, run): e.wait(TXEnableDelay) e.set_phase(PHA) - e.wait(5e-6)#D1-P45/2-TXEnableDelay) # 'short tau' + e.wait(D1-P45/2-TXEnableDelay) # 'short tau' e.record(SI, SW, sensitivity=ADCSensitivity) # acquisition # write experiment parameters: diff --git a/Scripts/Spin_Alignment_Spin32/op_spinal32_exp.py b/Scripts/Spin_Alignment_Spin32/op_spinal32_exp.py index 6e517b5..3b15f2f 100644 --- a/Scripts/Spin_Alignment_Spin32/op_spinal32_exp.py +++ b/Scripts/Spin_Alignment_Spin32/op_spinal32_exp.py @@ -137,13 +137,13 @@ def spinal32_experiment(pars, run): e.ttl_pulse(TXEnableDelay, value=TXEnableValue) e.ttl_pulse(P90, value=TXEnableValue|TXPulseValue) # 90-degree pulse - e.wait(D1-P90/2-TXEnableDelay) # 'short tau' + e.wait(D1-P90/2-P45/2-TXEnableDelay) # 'short tau' e.set_phase(PH3) e.ttl_pulse(TXEnableDelay, value=TXEnableValue) e.ttl_pulse(P45, value=TXEnableValue|TXPulseValue) # 45-degree pulse - e.wait(D2-P45/2-TXEnableDelay) # 'long tau' + e.wait(D2-P45-TXEnableDelay) # 'long tau' e.set_phase(PH4) e.ttl_pulse(TXEnableDelay, value=TXEnableValue) diff --git a/Scripts/Steady_Gradient_Spin_Echo/op_sgse_exp.py b/Scripts/Steady_Gradient_Spin_Echo/op_sgse_exp.py index c70e533..efeb26c 100644 --- a/Scripts/Steady_Gradient_Spin_Echo/op_sgse_exp.py +++ b/Scripts/Steady_Gradient_Spin_Echo/op_sgse_exp.py @@ -134,13 +134,13 @@ def ste_experiment(pars, run): e.ttl_pulse(TXEnableDelay, value=TXEnableValue) e.ttl_pulse(P90, value=TXEnableValue|TXPulseValue) # 90-degree pulse - e.wait(D1-P90/2-TXEnableDelay) # 'short tau' + e.wait(D1-P90-TXEnableDelay) # 'short tau' e.set_phase(PH3) e.ttl_pulse(TXEnableDelay, value=TXEnableValue) e.ttl_pulse(P90, value=TXEnableValue|TXPulseValue) # 90-degree pulse - e.wait(D2-P90/2-TXEnableDelay) # 'long tau' + e.wait(D2-P90-TXEnableDelay) # 'long tau' e.set_phase(PH4) e.ttl_pulse(TXEnableDelay, value=TXEnableValue) diff --git a/Scripts/Steady_Gradient_Spin_Echo_with_CPMG_Detection/op_sgse2_exp.py b/Scripts/Steady_Gradient_Spin_Echo_with_CPMG_Detection/op_sgse2_exp.py index 81102bf..b0c3a87 100644 --- a/Scripts/Steady_Gradient_Spin_Echo_with_CPMG_Detection/op_sgse2_exp.py +++ b/Scripts/Steady_Gradient_Spin_Echo_with_CPMG_Detection/op_sgse2_exp.py @@ -3,31 +3,32 @@ TXEnableDelay = 2e-6 TXEnableValue = 0b0001 # TTL line blanking RF amplifier (bit 0) TXPulseValue = 0b0010 # TTL line triggering RF pulses (bit 1) -ADCSensitivity = 2 # voltage span for ADC +ADCSensitivity = 5 # voltage span for ADC def experiment(): # the diffusion editing sequence with stimulated echo and CPMG detection # set up acqusition parameters: pars = {} - pars['P90'] = 1.7e-6 # 90-degree pulse length (s) - pars['SF'] = 338.7e6 # spectrometer frequency (Hz) - pars['O1'] = -60e3 # offset from SF (Hz) + pars['P90'] = 0.8e-6 # 90-degree pulse length (s) + pars['SF'] = 161.85e6 # spectrometer frequency (Hz) + pars['O1'] = 0e3 # offset from SF (Hz) pars['NS'] = 16 # number of scans pars['DS'] = 0 # number of dummy scans - pars['RD'] = 3 # delay between scans (s) + pars['RD'] = 6 # delay between scans (s) pars['D1'] = 20e-6 # delay after first STE pulse (s) - pars['D2'] = 100e-6 # delay after second STE pulse (s) - pars['NECH'] = 16 # number of 180-degree pulses in the CPMG train - pars['TAU'] = 40e-6 # half pulse period in the CPMG train (s) - pars['PHA'] = -127 # receiver phase (degree) + pars['D2'] = 20e-6 # delay after second STE pulse (s) + pars['D4'] = 2.5e-6 # pre-acquisition delay (s) + pars['NECH'] = 128 # number of 180-degree pulses in the CPMG train + pars['TAU'] = 50e-6 # half pulse period in the CPMG train (s) + pars['PHA'] = -190 # receiver phase (degree) pars['DATADIR'] = '/home/fprak/Desktop/test/' # data directory pars['OUTFILE'] = None # output file name # specify a variable parameter (optional): pars['VAR_PAR'] = 'D2' # variable parameter name (a string) start = 20e-6 # starting value - stop = 4e-3 # end value - steps = 3 # number of values + stop = 3e-1 # end value + steps = 24 # number of values log_scale = True # log scale flag stag_range = False # staggered range flag @@ -117,6 +118,7 @@ def ste2_experiment(pars, run): RD = pars['RD'] D1 = pars['D1'] D2 = pars['D2'] + D4 = pars['D4'] TAU = pars['TAU'] NECH = pars['NECH'] PH1 = pars['PH1'][run%len(pars['PH1'])] @@ -143,28 +145,28 @@ def ste2_experiment(pars, run): e.ttl_pulse(TXEnableDelay, value=TXEnableValue) e.ttl_pulse(P90, value=TXEnableValue|TXPulseValue) # 1st 90-degree pulse - e.wait(D1-P90/2-TXEnableDelay) # short delay + e.wait(D1-P90-TXEnableDelay) # short delay e.set_phase(PH3) e.ttl_pulse(TXEnableDelay, value=TXEnableValue) e.ttl_pulse(P90, value=TXEnableValue|TXPulseValue) # 2nd 90-degree pulse - e.wait(D2-P90/2-TXEnableDelay) # long delay + e.wait(D2-P90-TXEnableDelay) # long delay e.set_phase(PH4) e.ttl_pulse(TXEnableDelay, value=TXEnableValue) e.ttl_pulse(P90, value=TXEnableValue|TXPulseValue) # 3rd 90-degree pulse - e.wait(D1+TAU-P90/2-TXEnableDelay) # wait for first echo and tau + e.wait(D1+TAU-P90/2-P180/2-TXEnableDelay) # wait for first echo and tau e.set_phase(PH5) e.loop_start(NECH) # ----- loop for CPMG pulse train: ----- e.ttl_pulse(TXEnableDelay, value=TXEnableValue) # enable RF amplifier e.ttl_pulse(P180, value=TXEnableValue|TXPulseValue) # apply a 180-degree pulse e.set_phase(PHA) # set phase for receiver - e.wait(TAU-(P180+TXEnableDelay+AQ)/2) # pre-acquisition delay + e.wait(TAU-(P180+TXEnableDelay+AQ)/2+D4) # pre-acquisition delay e.record(SI, SW, timelength=AQ, sensitivity=ADCSensitivity) # acquire echo samples - e.wait(TAU-(P180+TXEnableDelay+AQ)/2) # post-acquisition delay + e.wait(TAU-(P180+TXEnableDelay+AQ)/2-D4) # post-acquisition delay e.set_phase(PH5) # set phase for theta-degree pulse e.loop_end() # -------------------------------------- diff --git a/Scripts/Steady_Gradient_Spin_Echo_with_CPMG_Detection/op_sgse2_res.py b/Scripts/Steady_Gradient_Spin_Echo_with_CPMG_Detection/op_sgse2_res.py index f8b7d2c..accb2d2 100644 --- a/Scripts/Steady_Gradient_Spin_Echo_with_CPMG_Detection/op_sgse2_res.py +++ b/Scripts/Steady_Gradient_Spin_Echo_with_CPMG_Detection/op_sgse2_res.py @@ -77,6 +77,8 @@ def result(): #echodecay.y[1][i] = sum(echo.y[1]) #echodecay.y[0][i] = echo.y[0][echo.x.size/2] # or a middle echo point #echodecay.y[1][i] = echo.y[1][echo.x.size/2] + #echodecay.y[0][i] = max(echo.y[0]) # or maximum echo point + #echodecay.y[1][i] = max(echo.y[1]) # compute a signal's phase: phi0 = arctan2(echodecay.y[1][0], echodecay.y[0][0]) * 180 / pi @@ -105,7 +107,7 @@ def result(): # print '%s%02g' % ('T2 [s] = ', 1./rate) # measurand[var_value] = amplitude - measurement[var_value] = sum(echodecay.y[0][:]) + measurement[var_value] = sum(echodecay.y[0]) # provide measurement to the display tab: data[measurement.get_title()] = measurement diff --git a/Scripts/T1Q/op_t1q_exp.py b/Scripts/T1Q/op_t1q_exp.py index 3200415..db57446 100644 --- a/Scripts/T1Q/op_t1q_exp.py +++ b/Scripts/T1Q/op_t1q_exp.py @@ -9,22 +9,22 @@ def experiment(): # Jeener-Broekaert sequence with solid-echo detection to measu # set up acquisition parameters: pars = {} - pars['P90'] = 2.3e-6 # 90-degree pulse length (s) + pars['P90'] = 4.2e-6 # 90-degree pulse length (s) pars['SF'] = 46.7e6 # spectrometer frequency (Hz) pars['O1'] = 5.6e3 # offset from SF (Hz) pars['SW'] = 200e3 # spectrum width (Hz) pars['SI'] = 1*256 # number of acquisition points - pars['NS'] = 32 # number of scans + pars['NS'] = 16 # number of scans pars['DS'] = 0 # number of dummy scans pars['RD'] = .5 # delay between scans (s) pars['D1'] = 30e-6 # delay after first pulse or 'short tau' (s) - pars['D2'] = 30e-6 # delay after second pulse or 'long tau' (s) - pars['PHA'] = -27 # receiver phase (degree) + pars['D2'] = 30e-1 # delay after second pulse or 'long tau' (s) + pars['PHA'] = -40 # receiver phase (degree) pars['DATADIR'] = '/home/fprak/Students/' # data directory pars['OUTFILE'] = None # output file name # specify a variable parameter (optional): - pars['VAR_PAR'] = 'D2' # variable parameter name (a string) + pars['VAR_PAR'] = None#'D2' # variable parameter name (a string) start = 30e-6 # starting value stop = 2e-0 # end value steps = 16 # number of values @@ -109,7 +109,6 @@ def t1q_experiment(pars, run): pars['PH5'] = [0, 0, 180, 180, 270, 90, 90, 270] # refocucing 90-deg pulse pars['PH2'] = [0, 180, 0, 180, 180, 0, 180, 0] # receiver - # read in variables: P90 = pars['P90'] P45 = pars['P90']*0.5 @@ -124,6 +123,9 @@ def t1q_experiment(pars, run): PH5 = pars['PH5'][run%len(pars['PH5'])] PH2 = pars['PH2'][run%len(pars['PH2'])] PHA = pars['PHA'] + + if (run/8)%2 != 0: + PH5 += 180 # set sampling parameters: SI = pars['SI'] @@ -138,13 +140,13 @@ def t1q_experiment(pars, run): e.ttl_pulse(TXEnableDelay, value=TXEnableValue) e.ttl_pulse(P90, value=TXEnableValue|TXPulseValue) # 90-degree pulse - e.wait(D1-P90/2-TXEnableDelay) # 'short tau' + e.wait(D1-P90/2-P45/2-TXEnableDelay) # 'short tau' e.set_phase(PH3) e.ttl_pulse(TXEnableDelay, value=TXEnableValue) e.ttl_pulse(P45, value=TXEnableValue|TXPulseValue) # 45-degree pulse - e.wait(D2-P45/2-TXEnableDelay) # 'long tau' + e.wait(D2-P45-TXEnableDelay) # 'long tau' e.set_phase(PH4) e.ttl_pulse(TXEnableDelay, value=TXEnableValue) @@ -157,7 +159,7 @@ def t1q_experiment(pars, run): e.ttl_pulse(P90, value=TXEnableValue|TXPulseValue) # 90-degree pulse e.set_phase(PHA) - e.wait(13e-6) + e.wait(12e-6) e.record(SI, SW, sensitivity=ADCSensitivity) # acquisition # write experiment attributes: diff --git a/Scripts/T2_Filtered_ZZ_Exchange/op_t2zz_exp.py b/Scripts/T2_Filtered_ZZ-Exchange/op_t2zz_exp.py similarity index 96% rename from Scripts/T2_Filtered_ZZ_Exchange/op_t2zz_exp.py rename to Scripts/T2_Filtered_ZZ-Exchange/op_t2zz_exp.py index 033f32a..08fc4f1 100644 --- a/Scripts/T2_Filtered_ZZ_Exchange/op_t2zz_exp.py +++ b/Scripts/T2_Filtered_ZZ-Exchange/op_t2zz_exp.py @@ -141,19 +141,19 @@ def t2zz_experiment(pars, run): e.ttl_pulse(TXEnableDelay, value=TXEnableValue) e.ttl_pulse(P90, value=TXEnableValue|TXPulseValue) # 1st pulse - e.wait(D1-P90/2-TXEnableDelay) # echo delay + e.wait(D1-P90-TXEnableDelay) # echo delay e.set_phase(PH3) e.ttl_pulse(TXEnableDelay, value=TXEnableValue) e.ttl_pulse(P90, value=TXEnableValue|TXPulseValue) # 2nd pulse (90- or 180-degree) - e.wait(D1-P90/2-TXEnableDelay) # echo delay + e.wait(D1-P90-TXEnableDelay) # echo delay e.set_phase(PH4) e.ttl_pulse(TXEnableDelay, value=TXEnableValue) e.ttl_pulse(P90, value=TXEnableValue|TXPulseValue) # 3rd pulse (z-storage pulse) - e.wait(D2-P90/2-TXEnableDelay) # mixing time + e.wait(D2-P90-TXEnableDelay) # mixing time e.set_phase(PH5) e.ttl_pulse(TXEnableDelay, value=TXEnableValue) diff --git a/Scripts/T2_Filtered_ZZ_Exchange/op_t2zz_res.py b/Scripts/T2_Filtered_ZZ-Exchange/op_t2zz_res.py similarity index 100% rename from Scripts/T2_Filtered_ZZ_Exchange/op_t2zz_res.py rename to Scripts/T2_Filtered_ZZ-Exchange/op_t2zz_res.py diff --git a/Scripts/Zeeman_Order/op_zeeman_exp.py b/Scripts/Zeeman_Order/op_zeeman_exp.py index 91db8e1..5646fec 100644 --- a/Scripts/Zeeman_Order/op_zeeman_exp.py +++ b/Scripts/Zeeman_Order/op_zeeman_exp.py @@ -133,13 +133,13 @@ def zeeman_experiment(pars, run): e.ttl_pulse(TXEnableDelay, value=TXEnableValue) e.ttl_pulse(P90, value=TXEnableValue|TXPulseValue) # 90-degree pulse - e.wait(D1-P90/2-TXEnableDelay) # 'short tau' + e.wait(D1-P90-TXEnableDelay) # 'short tau' e.set_phase(PH3) e.ttl_pulse(TXEnableDelay, value=TXEnableValue) e.ttl_pulse(P90, value=TXEnableValue|TXPulseValue) # 90-degree pulse - e.wait(D2-P90/2-TXEnableDelay) # 'long tau' + e.wait(D2-P90-TXEnableDelay) # 'long tau' e.set_phase(PH4) e.ttl_pulse(TXEnableDelay, value=TXEnableValue) @@ -156,4 +156,4 @@ def zeeman_experiment(pars, run): e.set_description('run', run) # current scan e.set_description('rec_phase', -PH2) # current receiver phase - return e \ No newline at end of file + return e