-- multiple extract - requires iNMR 3.2.1 or later -- use this script to extract multiple rows from a 2-D spectrum -- the result is a stacked plot of the selected rows -- to select a row put an horizontal mark over it spectral = getf "x" right = spectral.start left = right + spectral.width spectral = getf "y" step = spectral.width / spectral.size -- distance between adjacent rows, in ppm maxppm = spectral.start + spectral.width -- max ppm value (at the bottom of the spectrum) M = { getmarks "h" } n = table.getn( M ) -- number of rows to extract if (n < 2) then print("not enough horizontal marks to perform a multiple extraction") return end for i = 1,n do -- rounding the ppm values local index = math.floor( (maxppm-M[i]) / step ) M[i] = maxppm - (index - 0.1) * step end region( left, right, M[n], M[1] - step ) press "z" -- zoom for i = 2,n do region( left, right, M[i] - step, M[i-1] ) press "c" -- cut end bidi "S" -- stacked plot