jjhelmus / nmrglue

A module for working with NMR data in Python
BSD 3-Clause "New" or "Revised" License
211 stars 86 forks source link

Tutorial in Colabs #122

Closed Darren01 closed 2 years ago

Darren01 commented 4 years ago

Missing File test.ft

I'm working my way through your tutorial in Colabs.

I'm at the section using-matplotlib-to-create-figures but when I try to implement the following,

import pylab dic,data = ng.pipe.read("test.ft") pylab.plot(data) [<matplotlib.lines.Line2D object at 0x8754fd0>] pylab.savefig("plot_1d.png")

I cannot find the test.ft file.

kaustubhmote commented 4 years ago

Hi @Darren01 , All the datasets associated with the tutorial/testing is available at Google Code Archive. If you download it and follow the instructions here for setting up the directories, you should be able to run this code.

However, this does seems like a rather long download/process to just test out reading and plotting. One thing you can do is replace test.ft with any NMR dataset that you might have. Just replace the ng.pipe.read with the command for the dataset type (ng.bruker.read, ng.jcamdx.read, etc). Worst case, you can copy the data from #112. If you have any problems, please seel free to comment back here.

kaustubhmote commented 4 years ago

You can also use this file: nmrglue/tests/pipe_proc_tests/1D_freq_real.dat, which is included in the github repository.

dic, data = ng.pipe.read("1D_freq_real.dat") should work.

Darren01 commented 4 years ago

Thanks for your help, @kaustubhmote . I am trying to work through the tutorial, but on colab. Here's what I have to date, https://colab.research.google.com/drive/1AJk9x4HQKGff6ufHNP6uMpi8PmW8onsK?usp=sharing I've used some of my own NMR data to create a the image, below but ...

image

... I was hoping to follow the tutorial directly but within colabs. In this way, I was hoping to show how a potential user could operate the software package within colabs.

All the best Darren.