Subject: Re: [nmr_sparky] integration
From: Thomas Goddard
Date: Jun 3, 2010

Previous: 724 Next: 727


Hi Stefano,

That is right. The sampling done by the relaxbox.py code does not
use the spectrum grid point spacing but instead interpolates in a box
defined by PPM. I believe the Sparky interpolation is nearest grid
point, not linear interpolation. There are Python calls to get the
spectrum grid point spacing if you want that.

I see that the relaxbox.py code has an error. The parentheses are
wrong in the lines that compute the offset in the spectrum.

for i in range(0, bsi):
dx = isz * (i - .5*(bsi-1)/(bsi-1))
for j in range(0, bsj):
dy = jsz * (j - .5*(bsj-1)/(bsj-1))
box_sum += s.data_height((px+dx, py+dy))

should instead be

for i in range(0, bsi):
dx = isz * (i - .5*(bsi-1))/(bsi-1)
for j in range(0, bsj):
dy = jsz * (j - .5*(bsj-1))/(bsj-1)
box_sum += s.data_height((px+dx, py+dy))

Tom


Hello,
I think I now understand the meaning of the two parameters: the box size
defines the dimension of the box, and the number of box samples define
how many points within the so-defined box will be used for the sum. Correct?

# Parameters for sum over box mode. Spectrum values are taken at nearest
# spectrum grid point.
box_samples = (9, 9)
box_size_ppm = (0.2, 0.5) # PPM box size along w1, w2 axes.

Stefano

--
LA RICERCA C’È E SI VEDE:
5 per mille allUniversità di Bologna - C.F.: 80007010376
http://www.unibo.it/Vademecum5permille.htm

Questa informativa è inserita in automatico dal sistema al fine esclusivo della realizzazione dei fini istituzionali dell’ente.