-- example program to process spectra automatically -- requires iNMR 3.4 or later -- modify this program according to your instrument brand and the class of your compounds local nD, numFT, P nD, numFT = numdim() -- number of dimensions if numFT < nD then return -- frequency-domain spectra are already OK elseif nD == 1 then -- MONO-DIMENSIONAL P = getf "x" -- inspect the parameetrs if P.mass > 1 then weight( 1 ) -- exponential broadening for heteronuclear spectra else fill( P.size * 2 ) -- zero filling for proton spectra end wft( true, true ) -- weight and Fourier Transform aph( true ) -- automatic phase correction, metabolomic version aph( true ) -- repetition is useful is some difficult cases bline( 1, 100 ) -- baseline correction adj( ) -- changes the amplification so that the highest peak fits exactly into the window if P.mass == 1 then acut( ) -- automatic integration region( 1000, -1000 ) -- peak-picking cmd 'PICK' local S = solvent() -- referencing the scale by the solvent peak local ppm = -1 if S == 'CDCl3' then ppm = 7.26 elseif S == 'DMSO' then ppm = 2.50 elseif S == 'ACETON' then ppm = 2.05 end if ppm >= 0 then refer( ppm ) end -- otherwise, use refer() to reference against the TMS peak end -- ------------------------------------------------------------------------------------ -- elseif nD == 2 then -- BI-DIMENSIONAL wft( true, true ) -- weight and Fourier Transform with default parameters along f-2 nD, numFT = numdim() -- number of dimensions if numFT > 0 then wft( true, true, true ) -- weight and Fourier Transform with default parameters along f-1 end aph( ) -- automatic phase correction abc( ) -- automatic baseline correction adj( ) -- changes the amplification so that the highest peak fits exactly into the window -- ------------------------------------------------------------------------------------ -- end -- tridimensional spectra should be processed manually --exit_to_iNMR() -- the console is closed