REM *********************************************************************** REM * * REM * SHAPE - GMB 2001 * REM * * REM * SHAPE is only a test of the selectivity of a shaped pulse train * REM * applied to a region of frequencies around the peak of interest. The * REM * pulse sequence is: * REM * * REM * d0 - selpulse - acquire (x) * REM * * REM * The selective pulse is a shaped DANTE pulse train, and it is read * REM * from the shaped pulse profile file, generated with 'shapetool'. The * REM * decoupler is used for excitation to have better control over the * REM * resolution of the pulses in the train. Use this pulse sequence to * REM * to determine the appropriate parameters of a shaped pulse before * REM * including it as part of a larger pulse sequence. * REM * * REM *********************************************************************** REM Read in dante initial conditions... re "c:\eft\h1\dante.ini" showwin cls print "Shaped pulse train test" print print "This program is designed to run a number of acquisition" print "blocks of NS scans each in which a certain spin will be" print "selectively irradiated using a shaped pulse train. The offset" print "will be varied by a certain ammount between blocks, so that" print "the selectivity (excitation bandwidth) of the shaped pulse" print "can be estimated." input "Enter number of experiments:",b cls print "Shaped pulse train test" print print "Slect the frequency range that the shaped pulse train will" print "sweep. The peak of intereset should be located at the center" print "of the range before starting, and the step of the increment" print "will be calculate according to the number of experiments." input "Enter the frequency range (Hz):",c GETCFG "Z0CAL" l c=c/(90.02*b*l) GETSHIM "Z0" z SETSHIM "Z0" z+c*b/2 cls print "Shaped pulse train test" print print "The relaxation delay needs to be set in the range 1 to 5" print "times the expected T1 for the sample. 2.0 sec is a good" print "general purpose value." input "Enter a relaxation delay (S):",d0 if d0=0 then d0=2 cls print "Shaped pulse train test" print print "Enter the file name were the shaped pulse profile is stored." print "If no name is specified, a 64 step DANTE train will be used." input "Shaped pulse file (h1\shapes\square64.shp):",s$ if s$="" then s$="c:\eft\h1\shapes\square64.shp" REM In order to only store pulse profiles and define the pulse width REM interactively, ask the user for the shaped pulse width and wether REM it will be an excitation or an inversion pulse... cls print "Shaped pulse train test" print print "The shaped pulse can be either an excitation (90 degree) or" print "an inversion (180 degree) pulse. Selct which one to use." input "Selective excitation (0) or inversion (1):",t define p5 h90lp50 "C:\eft\h1\pulses.txt" 'decoupler 90 at 50 dB if t=1 then p5=2*p5 print print "Enter the shaped pulse widh. The excitation bandwitdh" print "will be ROUGHLY the inverse of the pulse width." input "Shaped pulse width (mS):",v REM Open the shaped pulse profile file and print out some information REM about the pulse... cls print "Shaped pulse parameters" print print "Pulse shape file:",s$ open s$ for input as #1 input #1,g$ print "Pulse profile:",g$ input #1,g$,j print "Number of pulses in the train:",j print "Shaped pulse width:",v print "Nutations at +/- N *",(1e3*j/v)-(1e3*j/v)%1,"Hz from the carrier" REM Read in the sum of the profile to calculate pulse lenghts... input #1,g$,u input " to continue...",g$ cls print "Shaped pulse train test" print print "Enter a file name for the data. The default file my_shape" print "can be used by responding with an . Any file with" print "the same name will be overwritten without warning." input "Enter output file name (data\my_shape):",x$ if x$="" then x$="data\my_shape" cls print "Running shaped pulse train test..." print print "The spectrometer is set to do",b,"experiments of",n,"scans..." print print "Current offset:",c*90.02*l*b/2,"Hz..." print REM write the 2D file header... WH2D x$ b 0 0 rem will use 3*dw/16 delay before turning receiver on e=3*d/16 rem will use dw/16 delay before turning digitizer on f=d/16 REM Possible phases of the shaped pulse (2 step phase cycle to have REM positive and negavie amplitudes), with 'extra' cycles which allow REM the pulse programmer to do up to 511 DANTE-type steps... REM These are '0s'... a$ = "0213" c$ = "0213" e$ = "0213" g$ = "0213" REM These are '180s'... b$ = "2031" d$ = "2031" f$ = "2031" h$ = "2031" REM Receiver phase. Should follow the first pulse, '0'... i$ = "0213" REM Calculate the pulse constant from the sum of the pulse profile, and REM the nominal values of the delays depending on the pulse width... p5=p5/u d2=1e3*v/j REM The logic below is to allow for two things. First, we may need to cycle REM the phase of the pulses in the DANTE to get the shape we need. Second, REM the really ugly logic following is to allow the pulse programmer to do REM more than 128 steps with the same pahse... PROGRAM "clear" PROGRAM 0 d0 S RX a$ REM loop over all the pulses... for i=1 to j input #1,p1,q REM Calculate the pulse width and delay for the particular step... p1=p1*p5 REM Try to correct pulses below 0.5 uS. The decoupler behaves funny below these REM pulse width values... if p1<0.5 then p1=p1+0.1 REM If still below 0.2 uS, weed them out... if p1<0.2 then goto 600 REM Otherwise, correct the delay and halve it... d1=(d2-p1)/2 PROGRAM + d1 uS REM change the phase string depending on the number of pulses... if i<128 then goto 100 if i=128 then goto 200 if i<256 then goto 200 if i=256 then goto 300 if i<384 then goto 300 if i=384 then goto 400 if i<512 then goto 400 100 if q=0 then PROGRAM + p1 uS DEC FX PX a$ if q=180 then PROGRAM + p1 uS DEC FX PX b$ goto 500 200 if q=0 then PROGRAM + p1 uS DEC FX PX c$ if q=180 then PROGRAM + p1 uS DEC FX PX d$ goto 500 300 if q=0 then PROGRAM + p1 uS DEC FX PX e$  if q=180 then PROGRAM + p1 uS DEC FX PX f$ goto 500 400 if q=0 then PROGRAM + p1 uS DEC FX PX g$ if q=180 then PROGRAM + p1 uS DEC FX PX h$ goto 500 500 PROGRAM + d1 uS goto 700 600 PROGRAM + d2 uS 700 NEXT close #1 PROGRAM + e uS PROGRAM + f uS RX PROGRAM + 1.0 uS ADC RX PROGRAM + a S RX PROGRAM "coadd" i$ PROGRAM + 1.0 uS FOR i=1 to b ZERO START d4=c*90.02*l*(b/2 - i) WF x$ i d4 if i=1 then wr "c:\eft\data\pnmr.fid" cls SETSHIM "Z0" z+c*(b/2 - i) print "Running shaped pulse train test..." print print "Experiment",i,"of",b,"completed..." print print "Current offset:",c*90.02*l*(b/2 - i),"Hz..." print NEXT SLEEP 1 CLS print "Shaped pulse train test finished." print print "Results stored in file:",x$ print print "To process, switch to complex arrayed mode (AR), read in" print "the file (GA), do a baseline correction (BC), and apply a" print "Fourier transform (FT). Then you can display the results" print "of the experiment as a stacked plot (SP)." input " to exit the pulse program...",g$ REM Restore the field to whatever it was before starting... SETSHIM "Z0" z END