c**ft2d_roesy ty ft2d_roesy ;define the processing parameters appropriate for your data def dat_fl roesy ;name of the data file (.dat) def mat_fl roesy ;name of the matrix file (.mat). Will be created if not already there. ; def ctd_d1 2048 ;complex points in D1 FID: Bruker TD/2 def rtd_d2 2048 ;real points in D2 FID: Bruker "1 TD" ; def csz_d1 4096 ;complex points in D1 FID after zero-filling def rsz_d2 4096 ;real points in D2 FID after zero-filling ; def dcim 12 ;decimation rate, use "uxgrep decim" to extract from Bruker acqus file def dfvs 12 ;dsp firmware number, use "uxgrep dspfvs" to extract from Bruker acqus file ; ; Let's figure out the length of the FID after correction for digital filters: ; exr digphs &dcim &dfvs eva fidlen (&ctd_d1-&digdel) ; ; Set the window functions and corresponding parameters ; def wdw_d1 ss ;name of the window type for D1 def wp1_d1 &fidlen ;first parameter def wp2_d1 90 ;second parameter (blank if n/a) ; def wdw_d2 sb ;name of the window type for D2 def wp1_d2 &rtd_d2 ;first parameter def wp2_d2 90 ;second parameter (blank if n/a) ; ;def cnvcmd cnv 0 16 ;command to be used in D1 for cnv filtering. Put "nop" in if not used. def cnvcmd nop ;command to be used in D1 for cnv filtering. Put "nop" in if not used. ; ; Set the sweep width in D1 and D2 ; def sw_d1 15015.015 ;Sweep width in Hz in D1 (Bruker sw_h: uxgrep sw_h) def sw_d2 15015.015 ;Sweep width in Hz in D2 ; ; Phase parameters ; def ph0_d1 -38.2 ;zero order phase angle for D1 def ph1_d1 45.3 ;first order phase angle for D1 ; def ph0_d2 90 ;zero order phase angle for D2 def ph1_d2 0 ;first order phase angle for D2 ; ; What dimensions to process (1=processing will be done, 0=no processing) ; def prc_d1 1 ;process D1 (data must already be loaded into the matrix file) def prc_d2 1 ;process D2 ; ; What dimensions to phase correct after FT (0=no phasing, 1=phasing will be performed) ; def phs_d1 1 ;phase D1 def phs_d2 1 ;phase D2 ; def gib_d1 0 ;Gibbs filter D1, 0=off, 1=on (divide 1st pt. by 2) def gib_d2 0 ;Gibbs filter D2, 0=off, 1=on (divide 1st pt. by 2) ; ; That's all ; eva rtd_d1 (&ctd_d1*2) eva ctd_d2 (&rtd_d2/2) eva rsz_d1 (&csz_d1*2) eva csz_d2 (&rsz_d2/2) def msz_d1 &csz_d1 def msz_d2 &csz_d2 cmx inq mat &mat_fl exist if &exist eq 1 then mat &mat_fl w els ty Building the matrix (&mat_fl)... bld &mat_fl 2 &msz_d1 &msz_d2 mat &mat_fl w eif if &prc_d1 eq 0 proc_d2 cl def datype 1 def datsiz &fidlen set 1 &wdw_d1 &wp1_d1 &wp2_d1 stb 1 def gibbs &gib_d1 ty Working on D1... def nexrow 64 for row 1 &rtd_d2 esc out if &out ne 0 quit rn &dat_fl def datype 1 def datsiz &ctd_d1 exr digphs &dcim &dfvs 1 def datsiz &fidlen &cnvcmd mwb 1 zf &csz_d1 ft if &phs_d1 eq 1 then def phase0 &ph0_d1 def phase1 &ph1_d1 ph eif red sto 0 &row if &row lt &nexrow gonxtd1 ty done D1 &row / &rtd_d2 $ eva nexrow (&nexrow+64) gonxtd1: next ty done D1 &rtd_d2 / &rtd_d2 proc_d2: if &prc_d2 eq 0 quit def datype 0 eva datsiz (&rtd_d2+1) set 1 &wdw_d2 &wp1_d2 &wp2_d2 stb 1 def gibbs &gib_d2 bun 2 def nexvec 64 ty Working on D2... for vec 1 &vector esc out if &out ne 0 quit lwb def datype 0 def datsiz &rtd_d2 shr 1 eva datsiz (&rtd_d2+1) mwb 1 zf &rsz_d2 rft if &phs_d2 eq 1 then def phase0 &ph0_d2 def phase1 &ph1_d2 ph eif red swb if &vec lt &nexvec gonxtd2 ty done D2 &vec / &vector $ eva nexvec (&nexvec+64) gonxtd2: next ty done D2 &vector / &vector bun 0 quit: end