mailRe: Implement handles for nmrglue in relax


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Troels Emtekær Linnet on November 27, 2014 - 13:06:
Hi Edward and Jonathan.

Jonathan, I have used your nmrglue module before, and I really think it is
a piece of good work.!
Well done.

It makes it easy to manipulate NMR data in python.

In the test folder of nmrglue (13.9 MB), there are a collection of files,
which can be used for testing.

nmrglue stores the data in numpy array, so I would need to figure that out.

numpy has a save and load function.
http://docs.scipy.org/doc/numpy/reference/generated/numpy.save.html

I will have a look on it.

Best
Troels




Troels Emtekær Linnet

2014-11-27 12:16 GMT+01:00 Edward d'Auvergne <edward@xxxxxxxxxxxxx>:

Hi,

This sounds good.  And rather simple, the backend of the
spectrum.nmrglue_read user function could simply be the single line of
the tutorial
http://nmrglue.readthedocs.org/en/latest/tutorial.html#reading-nmr-files:

import nmrglue as ng
dic,data = ng.pipe.read("test.fid")

For the *.ft2 files, how big are they?  I wonder if you can downsample
the original *.fid files so that the *.ft2 files are within 10 to 100
kB (using the nmrPipe extract command, etc.).  Anyway, just add a
system test, and we can then discuss more of the design before
implementing the nmrglue interface.  From your aims, it sounds pretty
straightforward.  If the number of relax spectrum.nmrglue_* user
functions expand significantly to access more of the nmrglue
functionality, maybe we can create a dedicated nmrglue user function
class later on.  Anyway, we just have to make sure that relax
continues to operate smoothly when the scipy/matplotlib/nmrglue
packages are absent.

One problem will be storage of the nmrglue data.  This will probably
not fit into the relax data store, as it absolutely requires to_xml()
and from_xml() methods to allow the data to be saved and read again.
Any ideas?  We could create a special class in lib.spectrum.nmrglue
which uses the singleton design pattern
(https://en.wikipedia.org/wiki/Singleton_pattern), as is used
extensively in relax.  Just 'grep -i' for 'singleton'.  The data
storage would then be temporary.  Or, ideally, we could modify the
nmrglue data structures to be convertible to and from XML.  Some ideas
should be discussed with the nmrglue authors though (which is why I
have CCed Jonathan, so he knows we are developing a simple
relax-nmrglue interface).  At the moment, I don't know much about the
nmrglue designs.

For the user functions, do you know if nmrglue has an icon that we can
use for the menus and user function wizard pages in the GUI?

Cheers,

Edward



On 27 November 2014 at 11:54, Troels Emtekær Linnet <tlinnet@xxxxxxxxx>
wrote:
Hi Edward.

To:

test_suite/shared_data/dispersion/repeated_analysis/SOD1/cpmg_disp_sod1d90a_060521/cpmg_disp_sod1d90a_060521_normal.fid/ft2_data

I will add the corresponding .ft2 files. To limit size use, I will add
just
very few .ft2 files.

I will add wrapper functions which will:
- read a ft2 file
- read a range of ft2 files according to a glob of file names
- plot the spectrum

manipulate the numpy arrray, to certain functions.

Plotting in matplotlib.

Best
Troels




Troels Emtekær Linnet

2014-11-27 11:33 GMT+01:00 Edward d'Auvergne <edward@xxxxxxxxxxxxx>:

Hi Troels,

This is no problem.  Just create the branch.  But before adding code,
we should discuss the design.  This has two benefits - it will be much
simpler for you in the long run, and it would avoid any redesigns if
the first attempt doesn't fit into the relax infrastructure well.
Could you describe nmrglue, including links, and what you'd like to do
with it?  Would you like to interact with the program at runtime, or
simply read its output?  Would you like to create input files?

Cheers,

Edward



On 27 November 2014 at 11:01, Troels Emtekær Linnet <tlinnet@xxxxxxxxx>
wrote:
Dear Edward.

I am about to setup a new test branch for using nmrglue.

I would need to compare all intensities in a long range of spectra.

I will setup a new branch by:
http://wiki.nmr-relax.com/Git_branch_creation

I already have some test code, which is working.

I am a little unsure where this will be going.

But essentially, I would like to write some wrapper functions to
nmrglue,
which can be handsome.

Best
Troels Emtekær Linnet
_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@xxxxxxx

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel





Related Messages


Powered by MHonArc, Updated Thu Nov 27 14:20:19 2014