From spectral point to spectral ppm

59 views
Skip to first unread message

Troels Emtekær Linnet

unread,
Apr 18, 2013, 11:01:24 AM4/18/13
to nmrglue...@googlegroups.com
Hi.

I am looking for a easy way to calculate a ppm point from spectral point.

Similar to:
uc_1_H = ng.pipe.make_uc(dic, data, dim=1)

ppmX = ng.pipe.make_uc(dic, ptsX, dim=1)

but instead of a data array, one just provide the spectral point.

Best
Troels


Troels Emtekær Linnet
Ved kløvermarken 9, 1.th
2300 København S
Mobil:
+45 60210234

Jonathan Helmus

unread,
Apr 18, 2013, 11:23:01 AM4/18/13
to nmrglue...@googlegroups.com
The pipe.make_uc function just finds the appropriate parameters to passes these to the fileiobase.unit_conversion functions.  If you can find/supply these values yourself you can make your own unit conversion object [1] at will.

If you look at the source of the pipe.make_uc function [2] you can see that a similar function could be written which look the number of points and number of dimensions in place of the data.  If you are going to parse the NMRPipe parameter dictionary yourself check out the note starting on line 179 about how NMRPipe defines the carrier and center of of the spectrum.

[1] http://jjhelmus.github.io/nmrglue/current/reference/generated/nmrglue.fileio.fileiobase.unit_conversion.html
[2] https://github.com/jjhelmus/nmrglue/blob/master/nmrglue/fileio/pipe.py#L138

Cheers,

    - Jonathan
--
You received this message because you are subscribed to the Google Groups "nmrglue-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nmrglue-discu...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Troels Emtekær Linnet

unread,
Apr 18, 2013, 2:41:23 PM4/18/13
to nmrglue...@googlegroups.com
Hi Jonathan.

Well, you actually already had it. :-)

uc_1_H = ng.pipe.make_uc(dic, data, dim=1)

ppmX=uc_1_H.ppm(ptsX)

I made a wiki, to load in a SPARKY peak list, and integrate over the peaks, and plot it.


Best


Troels Emtekær Linnet
Ved kløvermarken 9, 1.th
2300 København S
Mobil:
+45 60210234


2013/4/18 Jonathan Helmus <jjhe...@gmail.com>
Reply all
Reply to author
Forward
0 new messages