From 7da97a4f26b9e369e7073c7f61c7a38a3e3110eb Mon Sep 17 00:00:00 2001 From: Markus Rosenstihl Date: Tue, 27 Feb 2024 17:14:28 +0100 Subject: [PATCH] Add option to suppress ringing in Saturation Recovery script A parameter option "suppress_ringing" has been added to the Saturation Recovery script. This option modifies phase lists and allows the application of a phase cycle that compensates for ringing but reduces signal-to-noise ratio by half. This gives users the option to prioritize either reduced ringing or higher SNR as per their requirements. --- .../satrec2_exp.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Scripts/Saturation_Recovery_with_Solid_Echo_Detection/satrec2_exp.py b/Scripts/Saturation_Recovery_with_Solid_Echo_Detection/satrec2_exp.py index 142d940..1cfc550 100644 --- a/Scripts/Saturation_Recovery_with_Solid_Echo_Detection/satrec2_exp.py +++ b/Scripts/Saturation_Recovery_with_Solid_Echo_Detection/satrec2_exp.py @@ -25,8 +25,9 @@ def experiment(): # saturation-recovery with soild-echo detection pars['D2'] = 1e-4 # end interval in saturation sequence (s) pars['DATADIR'] = '/home/fprak/Students/' # data directory pars['OUTFILE'] = None # output file name + pars["suppress_ringing"] = False # 16 Phase cycle, reduces ringing but halves SNR - # specify a variable parameter (optional): + # specify a variable parameter (optional): pars['VAR_PAR'] = 'TAU' # variable parameter name (a string) start = 1e-4 # starting value stop = 1e-0 # end value @@ -109,11 +110,17 @@ def satrec2_experiment(pars, run): pars['PROG'] = 'satrec2_experiment' - # phase lists: - pars['PH1'] = [ 0] # saturation pulses - pars['PH3'] = [ 0, 180, 0, 180, 90, 270, 90, 270] # 1st 90-degree pulse - pars['PH4'] = [90, 90, 270, 270, 0, 0, 180, 180] # 2nd 90-degree pulse - pars['PH2'] = [ 0, 180, 0, 180, 90, 270, 90, 270] # receiver + if pars["suppress_ringing"]: + # phase cycle to compensate ringing (loss of half the signal!) + pars['PH3'] = [ 0, 0, 0, 0, 90, 90, 90, 90, 180, 180, 180, 180, 270, 270, 270, 270] # 1st 90-degree pulse + pars['PH4'] = [ 0, 90, 180, 270, 90, 180, 270, 0, 180, 270, 0, 90, 270, 0, 90, 180] # 2nd 90-degree pulse + pars['PH2'] = [ 180, 0, 180, 0, 270, 90, 270, 90, 0, 180, 0, 180, 90, 270, 90, 270] # receiver + else: + # simple phase cycle: + pars['PH1'] = [0] # saturation pulses + pars['PH3'] = [0, 180, 0, 180, 90, 270, 90, 270] # 1st 90-degree pulse + pars['PH4'] = [90, 90, 270, 270, 0, 0, 180, 180] # 2nd 90-degree pulse + pars['PH2'] = [0, 180, 0, 180, 90, 270, 90, 270] # receiver # read in variables: P90 = pars['P90']