Hello,
At the Python command prompt you can do something like (for a 2D):
>>> spectrum = top.nmrProject.findFirstExperiment(name=‘HSQC’).findFirstDataSource()
>>> block_file = spectrum.block_file
>>> low = (0, 0)
>>> high = (3, 4)
>>> values = block_file.getValues(low, high)
This is in points, not ppm. This is happening in the C world and so the “low” tuple starts counting at 0, not 1. And the function gets the values up to but not including the “high” tuple. Thus here it gets 3*4=12 values. Obviously you’d want to get the values near your peak centre. The values come back as a 1D Python list. Here the first 3 values would be for the 0th second point, the second 3 values for the 1st second point, etc. (In Analysis v3 the equivalent comes back as a proper ND Numpy array.)
If you want to write a macro then the first line would just be replaced with
spectrum = argServer.getSpectrum()
and then the rest is the same.
Wayne
> On 3 Apr 2016, at 02:24, Henry Orton <[log in to unmask]> wrote:
>
> Hi,
>
> I am looking to measure relaxation and would like to extract the raw data intensity from my peak list locations, instead of the maximum intensity of the fitted function at the peak (usually a parabola), as I am finding the fitted function height gives a poor calculation for relaxation relative to the raw peak intensity maximum. Is there a way to extract the raw intensity in CCPN at a peak location?
>
> Thank you,
> Henry
|