c**ft2d_hn15noe, for pp hn15noe.fa, NOE and Reference spectra ; ; $Id: ft2d_hn15noe.mac,v 1.1 2000/05/12 16:22:59 abild Exp abild $ ; ty ft2d_hn15noe ; ; Define the processing parameters appropriate for your data ; ; File names, may be provided as arguments to this macro ; (first argument: data file, second argument: matrix file) ; or simply defined below if &_args eq 2 then def dat_fl &_arg1 def mat_fl &_arg2 els def dat_fl hn15noe_050700_14noe ;name of the data file (.dat) def mat_fl hn15noe_050700_14noe ;name of the matrix file (.mat). Will be created if not already there. eif ; def ctd_d1 2048 ;complex points in D1 FID: Bruker TD/2 def ctd_d2 216 ;complex points in D2 FID: Bruker "1 TD"/2 or L4 ; def csz_d1 4096 ;complex points in D1 FID after zero-filling, usually 2*ctd_d1 def csz_d2 512 ;complex points in D2 FID after zero-filling, usually 2*ctd_d2 eva svszd1 (&csz_d1) ;complex points to save after FT of D1 (use this with ; svofd1 to chop out a subsection of D1 after FT) def svofd1 0 ;number of points to discard at the left after FT in D1 ; 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 ; ; Here we figure out the length of the FID after correction for digital filters ; (you shouldn't have to change this): ; exr digphs &dcim &dfvs eva fidlen (&ctd_d1-&digdel) ; ; Set the window functions and corresponding parameters ; def wdw_d1 gm ;name of the window type for D1 def wp1_d1 -8.0 ;first parameter def wp2_d1 0.15 ;second parameter (blank if n/a) ; def wdw_d2 gm ;name of the window type for D2 def wp1_d2 -5.0 ;first parameter def wp2_d2 0.10 ;second parameter (blank if n/a) ; ; Phase parameters ; def ph0_d1 49.3 ;zero order phase angle for D1 def ph1_d1 0 ;first order phase angle for D1 ; def ph0_d2 90 ;zero order phase angle for D2 def ph1_d2 -180 ;first order phase angle for D2 ; ; Which dimensions to process (1=processing will be done, 0=no processing) ; def prc_d1 1 ;process D1 def prc_d2 1 ;process D2 ; ; Which 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 ; ; If a particular dimension has a reversed ch. sh. axis, set rev_d? to 1 ; def rev_d1 0 ;reverse d1 if 1 def rev_d2 0 ;reverse d2 if 1 ; ; Which dimensions to do the Gibbs trick on ; 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) ; ; Set the sweep width in D1 and D2 ; def sw_d1 15015.0150 ;Sweep width in Hz in D1 (Bruker sw_h: uxgrep sw_h) def sw_d2 3048.780 ;Sweep width in Hz in D2 (1/(in0*2)) ; ; More referencing information. Here we use the carrier position as ; the reference point (replace the content of the parentheses in refpt1 and ; refpnt2 with your reference points if you do it by signal): ; eva refpt1 (&csz_d1/2+1-&svofd1) ; Reference point D1 eva refpt2 (&csz_d2/2+1) ; Reference point D2 def refsh1 4.6390 ; Reference shift D1 def refsh2 117.944 ; Reference shift D2 def sfreq1 750.13 ; Spectrometer frequency D1 def sfreq2 76.010 ; Spectrometer frequency D2 eva redsw1 (&sw_d1*&svszd1/&csz_d1) ; Reduced sweep width in D1 ; ; Set "chifit" to 1 if you want help on input parameters for CHIFIT. ; This will bypass all processing etc. ; def chifit 0 ; ; That's all ; eva rtd_d1 (&ctd_d1*2) eva rtd_d2 (&ctd_d2*2) eva rsz_d1 (&csz_d1*2) eva rsz_d2 (&csz_d2*2) def msz_d1 &svszd1 def msz_d2 &csz_d2 if &chifit eq 1 then cal chifit_out go quit eif cal bldmat if &prc_d1 eq 1 then cal proc_d1 eif if &prc_d2 eq 1 then cal proc_d2 eif ;cal refmat go quit ; Subroutines here ;proc_d1 proc_d1: cl def gibbs &gib_d1 ty Working on D1... def nexrow 64 def rownr 1 for row 1 &ctd_d2 esc out if &out ne 0 reallyquit cal ftvec_d1 stb 1 stb 2 cal ftvec_d1 adb 1 mul -1 adb 2 ldb 2 exc red sto 0 &rownr eva rownr (&rownr+1) def datype 1 def datsiz &csz_d1 ldb 1 red sto 0 &rownr eva rownr (&rownr+1) if &row ge &nexrow then ty done D1 &row / &ctd_d2 $ eva nexrow (&nexrow+64) eif next ty done D1 &row / &ctd_d2 ret ; proc_d2 proc_d2: def datype 1 def datsiz &ctd_d2 set 1 def swidth &sw_d2 &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 reallyquit lwb def datype 1 def datsiz &ctd_d2 if &rev_d2 eq 1 then cnj eif mwb 1 zf &csz_d2 ft if &phs_d2 eq 1 then def phase0 &ph0_d2 def phase1 &ph1_d2 ph eif red swb if &vec ge &nexvec then ty done D2 &vec / &vector $ eva nexvec (&nexvec+64) eif next ty done D2 &vec / &vector bun 0 ret ; ftvec_d1 ftvec_d1: rn &dat_fl def datype 1 exr digphs &dcim &dfvs 1 def datsiz &fidlen if &rev_d1 eq 1 then cnj eif def swidth &sw_d1 &wdw_d1 &wp1_d1 &wp2_d1 zf &csz_d1 ft if &phs_d1 eq 1 then def phase0 &ph0_d1 def phase1 &ph1_d1 ph eif if &svofd1 gt 0 then shl &svofd1 eif def datsiz &svszd1 ret ;bldmat bldmat: cmx inq mat &mat_fl exist if &exist eq 1 then mat &mat_fl w if &dimen ne 2 then ty The matrix &mat_fl exists but has the wrong dimensionality go reallyquit eif if &d1size ne &msz_d1 or &d2size ne &msz_d2 then ty The matrix &mat_fl exists but has the wrong size go reallyquit eif els ty Building the matrix (&mat_fl)... bld &mat_fl 2 &msz_d1 &msz_d2 mat &mat_fl w eif ret ; refmat refmat: rmx 1 &sfreq1 &redsw1 3 &refpt1 &refsh1 H rmx 2 &sfreq2 &sw_d2 3 &refpt2 &refsh2 N ret ; chifit_out chifit_out: eva cpd1 (&fidlen*&svszd1/&csz_d1) ty Chifit input parameters: ty dimensions = 2 ty data_points = (&svszd1, &csz_d2) ty complex_points = (&cpd1, &ctd_d2) if &wdw_d1 eqs ss then ty WF_DIM1 = SineSqrBell, &wp2_d1 eif if &wdw_d1 eqs sb then ty WF_DIM1 = SineBell, &wp2_d1 eif if &wdw_d1 eqs gm then ty WF_DIM1 = LorentzGauss, &wp1_d1, &redsw1, &wp2_d1 eif if &wdw_d2 eqs ss then ty WF_DIM2 = SineSqrBell, &wp2_d2 eif if &wdw_d2 eqs sb then ty WF_DIM2 = SineBell, &wp2_d2 eif if &wdw_d2 eqs gm then ty WF_DIM2 = LorentzGauss, &wp1_d2, &sw_d2, &wp2_d2 eif ret quit: ret reallyquit: end