c**ft3d_hncof ; ; $Id: ft3d_hncof.mac,v 1.1 2000/03/22 17:48:14 abild Exp abild $ ; ; Felix processing macro for data acquired with hncof.fa ; ty ft3d_hncof ;define the processing parameters appropriate for your data ; ; File names ; def dat_fl hncof_031700.dat ;name of the data file (.dat) def mat_fl hncof_031700.mat ;name of the matrix file (.mat). Will be created if not already there. ; ; Number of points ; def ctd_d1 1024 ;complex points in D1 FID: Bruker TD/2 def ctd_d2 40 ;complex points in D2 FID: Usually L4 def ctd_d3 32 ;complex points in D3 FID: Usually L6 ; def csz_d1 2048 ;complex points in D1 FID after zero-filling, usually 2*ctd_d1 def csz_d2 128 ;complex points in D2 FID after zero-filling, usually 2*ctd_d2 def csz_d3 64 ;complex points in D3 FID after zero-filling, usually 2*ctd_d3 eva svszd1 (&csz_d1/2) ;complex points to save after FT of D1 (use to this with ; svofd1 to chop out a subsection of D1) def svofd1 0 ;number of points to discard at the left after FT in D1 ; def cnst0 0 ;value of cnst0 (number of missing first point(s) in D3 ; def dcim 16 ;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 FIDs after correction for digital filters etc. ; (you shouldn't have to change this): ; exr digphs &dcim &dfvs eva fidlen (&ctd_d1-&digdel) eva lpszd3 (&ctd_d3+&cnst0) ;complex points in D3 FID after correction for missing first point(s) ; ; ; 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 &ctd_d2 ;first parameter def wp2_d2 90 ;second parameter (blank if n/a) ; def wdw_d3 sb ;name of the window type for D3 def wp1_d3 &lpszd3 ;first parameter def wp2_d3 90 ;second parameter (blank if n/a) ; ; Phase parameters ; def ph0_d1 20.8 ;zero order phase angle for D1 def ph1_d1 0 ;first order phase angle for D1 ; def ph0_d2 0 ;zero order phase angle for D2 def ph1_d2 0 ;first order phase angle for D2 ; eva ph0_d3 (90+79.2) ;zero order phase angle for D3 eva ph1_d3 (-180-49.9) ;first order phase angle for d3 ; ; Which 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 def prc_d3 1 ;process D3 ; ; Which dimensions to phase correct after FT (0=no phasing, 1=phasing will be performed) ; def phs_d1 1 ;phase D1 def phs_d2 0 ;phase D2 def phs_d3 1 ;phase D3 ; ; 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 1 ;reverse d2 if 1 def rev_d3 0 ;reverse d3 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 1 ;Gibbs filter D2, 0=off, 1=on (divide 1st pt. by 2) def gib_d3 0 ;Gibbs filter D3, 0=off, 1=on (divide 1st pt. by 2) ; ; Set the sweep width in D1, D2 and D3 ; def sw_d1 12019.231 ;Sweep width in Hz in D1 (Bruker sw_h: uxgrep sw_h) def sw_d2 2136.752 ;Sweep width in Hz in D2; SW(N): 1/(2*in10) def sw_d3 1811.594 ;Sweep width in Hz in D3; SW(C): 1/(2*in0) ; ; 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 eva refpt3 (&csz_d3/2+1) ; Reference point D3 def refsh1 4.751 ; Reference shift D1 def refsh2 118.000 ; Reference shift D2 def refsh3 175.014 ; Reference shift D3 def sfreq1 600.13 ; Spectrometer frequency D1 def sfreq2 60.8106 ; Spectrometer frequency D2 def sfreq3 150.902 ; Spectrometer frequency D3 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 rtd_d3 (&ctd_d3*2) eva rsz_d1 (&csz_d1*2) eva rsz_d2 (&csz_d2*2) eva rsz_d3 (&csz_d3*2) def msz_d1 &svszd1 def msz_d2 &csz_d2 def msz_d3 &csz_d3 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 if &prc_d3 eq 1 then cal proc_d3 eif cal refmat go quit ; Subroutines here ;proc_d1 proc_d1: cl def datype 1 def datsiz &fidlen set 1 def swidth &sw_d1 &wdw_d1 &wp1_d1 &wp2_d1 stb 1 def gibbs &gib_d1 ty Working on D1... for plane 1 &rtd_d3 for row 1 &rtd_d2 esc out if &out ne 0 reallyquit cal ftvec_d1 red sto 0 &row &plane next ty done D1 &plane / &rtd_d3 $ next ty done D1 &plane / &rtd_d3 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 ty Working on D2... for plane 1 &rtd_d3 for col 1 &msz_d1 esc out if &out ne 0 reallyquit loa &col 0 &plane 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 sto &col 0 &plane next ty done D2 &plane / &rtd_d3 $ next ty done D2 &plane / &rtd_d3 ret ; proc_d3 proc_d3: def datype 1 def datsiz &lpszd3 set 1 def swidth &sw_d3 &wdw_d3 &wp1_d3 &wp2_d3 stb 1 def gibbs &gib_d3 bun 3 def nexvec 64 ty Working on D3... for vec 1 &vector esc out if &out ne 0 reallyquit lwb def datype 1 def datsiz &ctd_d3 if &rev_d3 eq 1 then cnj eif def datsiz &lpszd3 if &lpszd3 gt &ctd_d3 then if &cnst0 eq 1 then shr 1 lpf els eva coed3 (&ctd_d3/4) shr &cnst0 lpf &ctd_d3 &coed3 &coed3 &cnst0 eif eif mwb 1 zf &csz_d3 ft if &phs_d3 eq 1 then def phase0 &ph0_d3 def phase1 &ph1_d3 ph eif red swb if &vec ge &nexvec then ty done D3 &vec / &vector $ eva nexvec (&nexvec+64) eif next ty done D3 &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 mwb 1 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 3 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 or &d3size ne &msz_d3 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 3 &msz_d1 &msz_d2 &msz_d3 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 rmx 3 &sfreq3 &sw_d3 3 &refpt3 &refsh3 C 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