Coder Social home page Coder Social logo

nmrglue's Introduction

nmrglue

What is nmrglue?

nmrglue is a module for working with NMR data in Python. When used with the numpy, scipy, and matplotlib packages nmrglue provides a robust interpreted environment for processing, analyzing, and inspecting NMR data.

What can nmrglue do?

nmrglue has the ability to read, write and convert between a number of common NMR file formats including Varian, Bruker, NMRPipe, and Sparky files. The files, which are represented in python as dictionaries of spectral parameters and Numpy array objects, can be easily examined, modified and processed as desired.

nmrglue provides a number of common functions for processing NMR data such as apodization, spectral shifting, Fourier and other transformations, baseline smoothing and flattening, and linear prediction. In addition new processing schemes can be implemented easily using the nmrglue provided functions and the multitude of numerical routines provided by the Numpy and Scipy packages.

When used in conjunction with the matplotlib (or other) python plotting library nmrglue can be used to create publication quality figures of NMR spectrum or examine data interactively.

nmrglue can be used to analyze NMR data, with routines to perform peak picking, multidimensional lineshape fitting (peak fitting), and peak integration. New analysis methods can be rapidly developed and tested in Python or by integrating Fortran and C/C++ code.

To get started, see our online documentation: http://nmrglue.readthedocs.org/en/latest/index.html

Citing nmrglue

If you find nmrglue useful in your research please cite the package as:

J.J. Helmus, C.P. Jaroniec, Nmrglue: An open source Python package for the analysis of multidimensional NMR data, J. Biomol. NMR 2013, 55, 355-367, http://dx.doi.org/10.1007/s10858-013-9718-x.

nmrglue's People

Contributors

andreasdoll avatar atomman avatar carlosbornes avatar chatcannon avatar darren01 avatar dcambie avatar dimitripapadopoulos avatar erikkjellgren avatar fernandezc avatar freiburgermsu avatar gryk avatar j-brady avatar jjhelmus avatar jlvarjo avatar kaustubhmote avatar kfritzsc avatar kivicode avatar krairy avatar kyleabeauchamp avatar lcageman avatar lifeishard avatar makki547 avatar mattfenwick avatar mccarthy677 avatar mfitzp avatar rgommers avatar robbyblum avatar smsaladi avatar tjragan avatar weisscharlesj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nmrglue's Issues

ng.fileio.pipe.read_table broken in Python 3

Hi,

I've been playing with this for a while now, but have no idea how to fix it. Using python 3, read_table results in the following when trying to read a 'test.tab'

  File "/usr/local/miniconda/py35/lib/python3.5/site-packages/nmrglue/fileio/pipe.py", line 70, in read_table
    raise IOError("%s has no/more than one VARS line" % (filename))
OSError: test.tab has no/more than one VARS line

I tracked down line 70 and find that the variable cl is empty. The line:

        if line[:len(k)] == k:

finds no matches (comparing binary and string or something). I adjusted this section to this:

for bline in f:
    line = bline.decode()
    for k in specials:
        if line[:len(k)] == k:
            cl.append(line)
            break
    else:
        dl.append(line)
f.close()

and it works better, seems to be making matches, but I get another error later:

  File "/usr/local/miniconda/py35/lib/python3.5/site-packages/nmrglue/fileio/pipe.py", line 86, in read_table
    rec = np.recfromtxt(s, dtype=dtd, comments='XXXXXXXXXXX')
  File "/usr/local/miniconda/py35/lib/python3.5/site-packages/numpy/lib/npyio.py", line 1951, in recfromtxt
    output = genfromtxt(fname, **kwargs)
  File "/usr/local/miniconda/py35/lib/python3.5/site-packages/numpy/lib/npyio.py", line 1482, in genfromtxt
    first_values = split_line(first_line)
  File "/usr/local/miniconda/py35/lib/python3.5/site-packages/numpy/lib/_iotools.py", line 219, in _delimited_splitter
    line = line.split(self.comments)[0]
TypeError: Can't convert 'bytes' object to str implicitly

From what I can tell, the 'np.recfromtxt' is having trouble with the new StringIO format, and I'm not sure how to correct that part.

Reading Magritek Jcamp

Hi,

I have a jcamp file from magritek, looks to be similar to bruker.

I can read and plot using this script but the ppm axis isn't right, any help would be appreciated.

There is also a processed *.1d file produced but I can't read this into nmrglue at all.

Thanks, Daz

import matplotlib.pyplot as plt
import numpy as np
import nmrglue as ng

# read in the data
fname = "nmr_fid.dx"
dic, raw_data = ng.jcampdx.read(fname)

# create complex array
npoints = int(dic["$TD"][0])
data = np.empty((npoints, ), dtype='complex128')
data.real = raw_data[0][:]
data.imag = raw_data[1][:]

# process
data = ng.proc_base.zf_size(data, npoints)
data = ng.proc_base.fft(data)
data = ng.proc_base.di(data)



# determine the ppm scale
udic = ng.jcampdx.guess_udic(dic, data)
udic[0]['car'] = 0.0
uc = ng.fileiobase.uc_from_udic(udic)
ppm_scale = uc.ppm_scale()

# plot
fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(data)
plt.show()

nmr_fid.zip

Question

Hi,
I have many 1H NMR files from a bruker machine, and I am looking for specific compounds.
Is it possible to use nmrglue to search through files for specific peaks? For example: search for a triplet at 4.01 in 20 different 1H spectra and tell in which spectrum this exists?

Thanks,
Guy

bruker pdata: serWarning: Failed to determine udic parameters for dim: 0

(Submitting this as an issue since I don't see a user mailing list or anything like that)

I'm playing with the basic tutorial code trying to plot a topspin 1H spectrum and I'm having hard time figuring nmrglue out. What I'd like to get is this: figure_topspin

The best I managed so far is the attached figure_nmrglue, with a

nmrglue-0.6_dev-py2.7.egg/nmrglue/fileio/bruker.py:84: UserWarning: Failed to determine udic parameters for dim: 0

thrown in the process (I'm calling ng.bruker.guess_udic( dic, data ) in order to construct a ng.fileiobase.uc_from_udic( udic ) so I can uc.ppm_scale() the plot). Am I doing everything wrong or is ppm scaling not working?

Thanks in advance

TopSpin 4.0/Avance Neo Compatibility

Hello,

With the release of TopSpin 4.0 and the Avance Neo, Bruker made a change to their data storage format. Data taken in TS4 is now saved as double precision floats (float64) instead of integers (int32). I believe that TS4 is only compatible with Avance Neo spectrometers, so this doesn't matter to very many people yet, but it will probably start to matter going forward (and it affects me already, hence posting this issue). So, the data reading functions in nmrglue.fileio.bruker should probably be updated to allow different data types to be read in (and probably also written out). I'd submit a pull request, but all I've done so far is hacked in a solution (changed "i4" to "f8" in nmrglue.fileio.bruker.get_data), which doesn't seem up to the programming standards of this project!

As for how to make a flexible change, there is now a parameter in acqus that notes what format the fid/ser file is in: 0 means int (the old style), 2 means double. So, I guess the read function should look at that to see what data type it needs to load?

---Robby Blum

Peak Fitting of Grossly Overlapped peaks in SSNMR

Hello,

I am trying to use the the ng.linesh functionality to fit peaks of SSNMR spectra that are sharp narrow Lorenztian with in a broad peak. the peak piking function does not result in a reasonable list of peaks because bot the narrow peak and the broad peak have the same center value. There because I know I want to fit to just two peaks I attempted to bypass the find peak step to specify the input in to the fit function. However it is not very clear from the example the correct formatting that would allow for this to happen. This is because the example is dependent on passing information from another embedded function.

I tried the defining the following for a simple two gauss fit

lineshapes=['g', 'g']
params=[[intens1, mean1,fwhm1],[intens2,mean2,fwhm2]
amps=[amp1,amp2]
(because all value must be positive)
bounds=[[[(0,None),(0,None),(0,None)],[(0,None),(0,None),(0,None)]]]
ampbounds=[amp1max,amp2max]
centers=[center1, center2]
error_flag = True
ng.linesh.fit_NDregion=(data, lineshapes, params, amps, bounds, ampbounds, centers, error_flag)

I get the following error


ValueError Traceback (most recent call last)
in ()
7 error_flag = True
8
----> 9 params_best, amp_best, iers = ng.linesh.fit_NDregion(data, lineshapes, params, amps, bounds, ampbounds, centers, error_flag)

/usr/local/lib/python2.7/site-packages/nmrglue/analysis/linesh.pyc in fit_NDregion(region, lineshapes, params, amps, bounds, ampbounds, wmask, error_flag, **kw)
423 if len(guess) != ndim:
424 err = "Incorrect number of params for peak %i"
--> 425 raise ValueError(err % (i))
426
427 for j, dim_guess in enumerate(guess): # dimension loop

ValueError: Incorrect number of params for peak 0

Which I assume I am not comprehended the gaussian function employed by this fitting function.
I looked at the documentation for the gaussian function being employed and it does just need an guess intensity, a mean, and a fwhm.

I do not know how to proceed because the peaks are grossly overlapping. Any suggestions.

I was also wondering if there were plans to run Simpson through python and not just convert the data.

Best,

Velencia

manual_ps syntax?

Newbie here (to python and nmrglue). I'm trying to do manual, interactive phasing. I have a jupyter notebook running python3 and working. I have ipywidgets installed. If I do:

ng.process.proc_autophase.manual_ps(data)

I get an error stack ending in AttributeError: Unknown property axisbg but I do get a static plot. When I try:

ng.process.proc_autophase.manual_ps(data[,notebook = True])

based on https://nmrglue.readthedocs.io/en/latest/reference/proc_autophase.html, I get

    ng.process.proc_autophase.manual_ps(data[,notebook = True])
                                             ^
SyntaxError: invalid syntax

I've tried several variations, none of which satisfy the beast. As a newbie I'm not sure what else to document or attach, please be gentle. Any guidance appreciated.

EDIT: The code for the function on the master branch appears to use this syntax:

ng.process.proc_autophase.manual_ps(data,notebook = True)

but this gives the following complaint:

----> 1 ng.process.proc_autophase.manual_ps(data,notebook = True)

TypeError: manual_ps() got an unexpected keyword argument 'notebook'

I'm sure I must be doing something wrong, but I'm stuck. Thanks.

nmrglue.fileio.bruker.read has parameter read_prog but doc states read_pprog

The Bruker read function accepts a parameter read_prog that determines whether the pulseprogram file is loaded:

def read(dir=".", bin_file=None, acqus_files=None, pprog_file=None,
         shape=None, cplex=None, big=None, read_prog=True, read_acqus=True):

..however according to the docs (and for consistency) this should be read_pprog:

read_pprog : bool, optional
    True to read pulse program, False prevents reading.

window function

Hello, I think I found a bug at least in the exponential window function.I did not check the others functions.
What I understood about exponential window function is that the last point of the fid should be multiply by the exp(-lb), so if the value of the last point is 1, and lb=5 after the application of exponential window function it value should be 0.006737946999085467
Then for the other points, the coefficient will depend on the number of point and on the point which is considered.
So the coefficient change for each points, for the point i, it will be i*lb/(number of points)
In the Bruker manual "procref" page 80 they also multiply by a "pi/2SWH" but I suppose it is to be consistent with the units.
Also the invert of the exponential should be more change also

Here is the way I programmed it :

def em_cor(data,lb = 0.0, inv = False):
    print 'shape', data.shape[-1]
    apod = np.exp(- (np.arange(data.shape[-1])+1) * (lb/data.shape[-1])).astype(data.dtype)
    if inv:
        apod = apod[::-1]
    return apod * data

I hope my explanation and the code above convinced you, that there is a problem with the window function.
I hope the other functions do not suffer such troubles
I found this bug because the signal to noise was decreasing along the spectrum (1D). And I was processing a fake fid with only 1 (a ones_like(fid)).
Hope this will help.
Thank a lot for the project.
Regards,
Bruno

Trying to convert Bruker 'True' or 'False' values to floats.

In the nmrglue/fileio/bruker.py file, the following code seems to be buggy:

"""
def parse_jcamp_value(text):
"""
Parse value text from Bruker JCAMP-DX file returning the value.
"""
if "<" in text:
return text[1:-1] # remove < and >
elif "." in text or "e" in text or 'inf' in text:
return float(text)
else:
return int(text)
"""

From running the full test suite with print statements for the 'text' argument, I can see that sometimes 'True' or 'False' strings are passed into this function. However with the "'e' in text'" check, this function identifies this as a float. This causes a ValueError. However the calling function read_jcamp(), via parse_jcamp_line(), has the dangerous catch all error "except:" statement. So this bad conversion is lost and a warning that the line cannot be parsed is given. An example line from the test data which fails here is:

$LOCSHFT= False

A solution would be to search for the text 'True' or 'False' in an elif statement just before this, and then use "return bool(text)".

Reading metadata

Hi
I am trying to read bruker data and I need to extract info such as sample name and experiment name. looking at dic generated by bruker.read() and bruker.read_pdata() I could not find such information.
Any suggestion how I can extract these metadata?
Bests
Mehran

Dubious nmrglue Integration examples.

The two examples showing how to do integration in nmrglue don't actually do integration. They simply sum the data around the peak. The dx part is important...

In 1D spectrum (with equally spaced bins) if you sum sections of the data and compare those values the result is very 'integration like' and correct. The idea however is still incorrect. Practically speaking, this approach is problimatic If you start comparing data between multiple data sets (think zero-filing problems). It also makes error analysis more difficult. To fix the problem you simply have to actually integrate: multiply the sum with the bin width:

Example

import numpy as np
โ€‹

def gauss(x, x0, s=1):
    """Normalized Gaussian."""
    return 1/(s * np.sqrt(2*np.pi)) * np.exp(-0.5 * ((x-x0)/s)**2)
โ€‹
space = 0.2
x = np.arange(-10, 10, space)
y = gauss(x, 0)
โ€‹
space1 = 0.1
x1 = np.arange(-10, 10, space1)
y1 = gauss(x1, 0)
โ€‹
print('Sum: ',  y.sum(), y1.sum())
print('Integral: ', y.sum() * space, y1.sum() * space1)

Output.
('Sum: ', 5.0000000000000178, 10.000000000000036)
('Integral: ', 1.0000000000000036, 1.0000000000000036)

I would have just fixed the examples and submitted a pull request but wanted to consider two things:

  1. What is 'process.proc_base.integ' being used for? Now it is just an aliases for np.cumsum(data, axis=-1).
  2. I think there should be a function to do integration in nmrglue. It is something that most users will need. At minimum I think the function needs x (or some proxy), and y data and two x limits. Something like this would work...
def integral_ppm(data, unit_conv, lower, upper):
    """
    Integral of data within lower and upper limits defined in ppm.
    """
    Parameters
    ----------
    data : ndarray
       Array of NMR data.
    data : unit_converter
    lower: float
        lower limit of integration range in ppm
    upper: float
        upper limit of integration range in ppm
    Returns
    -------
    integral : float

Ideas?

Intergers not floats should be used for indexing and slicing arrays

In various places in nmrglue a float type is used to slice or index a NumPy array. This was allowed in many versions of NumPy but in NumPy 1.12 this behavior is not allowed, integers must be used for indexing and slicing.

One concrete example of this is trying to read a simple NMRPipe file:

>>> import nmrglue as ng
>>> dic, data = ng.pipe.read('test.fid')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/nmrglue/fileio/pipe.py", line 531, in read
    return read_2D(filename)
  File "/usr/local/lib/python2.7/dist-packages/nmrglue/fileio/pipe.py", line 625, in read_2D
    data = unappend_data(data)
  File "/usr/local/lib/python2.7/dist-packages/nmrglue/fileio/pipe.py", line 1497, in unappend_data
    return np.array(data[..., :h] + data[..., h:] * 1.j, dtype="complex64")
TypeError: slice indices must be integers or None or have an __index__ method

ng.pipe.make_uc() type error

I am using python 3.7.6 and tried both the nmrglue 0.7 and nmrglue 0.8.dev

I am running to a typeerror when I tried to use ng.pipe.make_uc().

Here is my code:

dic, data = ng.pipe.read("./test.ft")
uc2=ng.pipe.make_uc(dic, data)
fig = plt.figure()
ax = fig.add_subplot(111)

ax.plot(uc2.ppm_scale()[::-1], data[::-1], 'k-')

This gives me the following error message:

TypeError Traceback (most recent call last)
/usr/local/lib/python3.7/site-packages/numpy/core/function_base.py in linspace(start, stop, num, endpoint, retstep, dtype, axis)
116 try:
--> 117 num = operator.index(num)
118 except TypeError:

TypeError: 'float' object cannot be interpreted as an integer

During handling of the above exception, another exception occurred:

TypeError Traceback (most recent call last)
in
4 ax = fig.add_subplot(111)
5
----> 6 ax.plot(uc2.ppm_scale()[::-1], data[::-1], 'k-')

/usr/local/lib/python3.7/site-packages/nmrglue/fileio/fileiobase.py in ppm_scale(self)
274 """
275 x0, x1 = self.ppm_limits()
--> 276 return np.linspace(x0, x1, self._size)
277
278 def hz_limits(self):

<array_function internals> in linspace(*args, **kwargs)

/usr/local/lib/python3.7/site-packages/numpy/core/function_base.py in linspace(start, stop, num, endpoint, retstep, dtype, axis)
119 raise TypeError(
120 "object of type {} cannot be safely interpreted as an integer."
--> 121 .format(type(num)))
122
123 if num < 0:

TypeError: object of type <class 'float'> cannot be safely interpreted as an integer.

I also tried the following code and it works:

read in the data from a NMRPipe file

dic, data = ng.pipe.read("./test.ft")

create a unit conversion object for the axis

udic = ng.pipe.guess_udic(dic, data)
uc = ng.fileio.fileiobase.uc_from_udic(udic)

fig = plt.figure()
ax = fig.add_subplot(111)

ax.plot(uc.ppm_scale()[::-1], data[::-1], 'k-')

Sorry, but still: "Integers not floats should be used for indexing and slicing arrays"

Although announced to be solved, with numpy 1.9.2, I recently installed via "git clone https://github.com/jjhelmus/nmrglue" (from source).

dic, data = ng.bruker.read_pdata('../Data/3/pdata/1')
print data.shape
print data
thres = data.std() * 2
peakList = ng.analysis.peakpick.pick( data, pthres = thres )

(1024, 2048)
[[ 14099.25 15660.5 15820.25 ..., 441.5 13453.5 17852.25]
[ 22354.75 24070.25 16389. ..., 2944. -547.75 7666. ]
[ 17501.5 21159. 3769.25 ..., 866.5 -10845.5 -4526. ]
...,
[ 1695.5 -15082.25 -16300.75 ..., 1921. 17331. 22866.25]
[ -6796.25 -16138.25 -11376.75 ..., 4678.75 24169.25 22745.75]
[ -512.5 -2591.5 1098.5 ..., 2588.5 24818.75 23191. ]]
Traceback (most recent call last):
File "findPeaks.py", line 9, in
peakList = ng.analysis.peakpick.pick( data, pthres = thres )
File "/usr/lib/python2.7/site-packages/nmrglue/analysis/peakpick.py", line 215, in pick
ls_classes)
File "/usr/lib/python2.7/site-packages/nmrglue/analysis/peakpick.py", line 383, in guess_params_slice
r = extract_1d(region, rlocation, axis)
File "/usr/lib/python2.7/site-packages/nmrglue/analysis/peakpick.py", line 398, in extract_1d
return np.atleast_1d(np.squeeze(data[s]))
TypeError: slice indices must be integers or None or have an index method

nmrglue/process/pipe_proc.di() in v0.5 acts always on first dim

Follow script gives different result between 0.4 and 0.5

in 0.4 I end about with 750x300 where as in 0.5 I end up with 375x300 points.

import nmrglue as ng

# read in the Agilent data
dic, data = ng.varian.read()

# create the converter object and initilize with Agilent data
C = ng.convert.converter()
C.from_varian(dic, data)

# create NMRPipe data and then write it out
ng.pipe.write("test.fid", *C.to_pipe(), overwrite=True)

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

# process the direct dimension
dic, data = ng.pipe_proc.sp(dic, data, off=0.45, end=0.98, pow=2, c=0.5)
#dic, data = ng.pipe_proc.zf(dic, data, size=4096)
dic, data = ng.pipe_proc.ft(dic, data, auto=False)
dic, data = ng.pipe_proc.ps(dic, data, p0=-87.0, p1=0.0)
dic, data = ng.pipe_proc.di(dic, data)

ng.pipe.write("1d_pipe.ft2", dic, data, overwrite=True)

# process the indirect dimension
dic, data = ng.pipe_proc.tp(dic, data)
dic, data = ng.pipe_proc.sp(dic, data, off=0.45, end=0.98, pow=1, c=1.0)
#dic, data = ng.pipe_proc.zf(dic, data, size=512)
dic, data = ng.pipe_proc.ft(dic, data, auto=True)
dic, data = ng.pipe_proc.ps(dic, data, p0=-90.0, p1=180.0)
dic, data = ng.pipe_proc.di(dic, data)
dic, data = ng.pipe_proc.tp(dic, data)

ng.pipe.write("2d_pipe.ft2", dic, data, overwrite=True)

The following fid.com works fine

var2pipe -in ./fid \
 -noaswap  \
  -xN              1500  -yN               600  \
  -xT               750  -yT               300  \
  -xMODE        Complex  -yMODE        Complex  \
  -xSW        12019.231  -ySW         2250.000  \
  -xOBS         799.857  -yOBS          81.058  \
  -xCAR           4.773  -yCAR         119.023  \
  -xLAB              HN  -yLAB             N15  \
  -ndim               2  -aq2D          States  \
  -out ./test.fid -verb -ov

Test datasets: Alternative needed for the Google-Code archive

I am planning to push a PR (currently my master branch) that writes processed Bruker data back into a format that Topspin can read. This is a fairly big addition and I have included some basic tests to make sure everything works OK. For the new tests to work, I will need to push some additional test datasets (processed topspin data) and some changes to the conversion scripts.

Is there an alternative way of doing this and making them available to the CI, since Google-Code is no longer functional?

Determining peak splitting during peak picking?

I am new to NMRglue and I love how intuitive the package is but I can't seem to find how to obtain peak splitting. Is there a known way to find proton peaks that are singlets, doublet, triplets, etc.

nmrglue convert function seems to produce unwanted distortions

Hello everybody,

I recently started my PhD in NMR and discovered nmrglue just a week ago. I was really happy to understand that it envisioned a function, ng.convert.converter(), which allows to translate spectra in different file formats. Because I work with Bruker spectrometer and enjoy analysis with Sparky quite a lot, I am very interested in converting Bruker spectra into .ucsf files.

Now, while the script (below) works, it produces very annoying distortions (along the proton dimension only, apparently) which make the resulting .ucsf spectrum unusable.

The script is:

import nmrglue as ng

sdic, sdata = ng.bruker.read_pdata('my lovely spectrum in bruker format')
u = ng.bruker.guess_udic(sdic, sdata)

C = ng.convert.converter()
C.from_bruker(sdic, sdata, u)
pdic, pdata = C.to_sparky()

ng.sparky.write("my lovely spectrum in sparky format.ucsf", *C.to_sparky(), overwrite = True)

For further reference, I attach two figures of the same spectrum in Sparky format. "distorted" is produced via the above script, while "correct" is yielded through a different script.

distorted
correct

Apologies if the issue was already tackled somewhere else, I could not find any helpful resource in this respect.

Thanks in advance!

Thermo/PicoSpin 80 JDX read

hello one and all,

I'm trying to read JDX files from a thermo fisher, aka, picoSpin, Model 80 Series II H-NMR into python. any ideas on how to do that? below is the ascii dump of acetonitrile.jdx file. thank you in advance and have a great day.

Lucas

##TITLE= onePulse-2019-12-17 17:58:22
##JCAMP-DX= 6.0
##DATA TYPE= NMR FID
##DATA CLASS= NTUPLES
##ORIGIN= picoSpin
##OWNER= My Name
##LONG DATE= 2019/12/17 17:58:22+0000
##.OBSERVE FREQUENCY=82.0177140462
##.OBSERVE NUCLEUS= ^1H
##.ACQUISITION MODE=SIMULTANEOUS
##.DELAY= (12, 12)
##SPECTROMETER/DATA SYSTEM=picoSpin-45
##$PS_CREATORINSTITUTION=Thermo Fisher Scientific
##$PS_DESCRIPTION=One pulse NMR script where the pulse is followed by a receiver
recovery delay before acquiring the specified number of acquisition points. If
the number of scans > 1 the script attempts to wait for the recycle delay before
the next pulse. If 'align-avg. data' is set, the data sent to the plot window
will be the average of the data acquired so far. The data is averaged only
after being spectrally aligned using a FT-based method. The quality of the
alignment goes up with the number of 'zero filling' which should be a power of
two for speed.
##$PS_CREATOR=
##$PS_TITLE= onePulse
##$PS_HARDWARE= 80
##$PS_VERSION= 1.3
##$PS_CREATOREMAIL= [email protected]
##$PS_MODIFICATIONDATE=2000/01/01 00:08:12
##$PS_SHORTNAME= one pulse
##$PS_CREATIONDATE= 2011/03/03
##$PS_SEQGRAPHIC= pulse_acquisition.svg
##$PS_JCAMP AVG.= True
##$PS_JCAMP IND.= False
##$PS_ZERO FILLING= 8192
##$PS_ALIGN-AVG. DATA=True
##$PS_AUTO PHASE= True
##$PS_PHASE CORRECTION=-8.1 degrees
##$PS_EXP. APODIZATION=0 Hz
##$PS_TX FREQUENCY= 82.0177140462 MHz
##$PS_AUTO TX= True
##$PS_AUTO TX OFFSET=200 Hz
##$PS_REQUESTED SCANS=10
##$PS_COMPLETED SCANS=10
##$PS_PULSE LENGTH= 45 us
##$PS_ACQUISITION POINTS=3072
##$PS_AUTO RCVR TIMING=True
##$PS_RECOVERY DELAY=5.0 us
##$PS_RECYCLE DELAY=8 s
##$PS_BANDWIDTH= 4 kHz
##$PS_POST FILTER ATTENUATION=auto
##$PS_MAX TIME TO PLOT=1000 ms
##$PS_MIN FREQ. TO PLOT=-2000 Hz
##$PS_MAX FREQ. TO PLOT=2000 Hz
##$PS_MAX PLOT POINTS=4096
##$PS_LIVE PLOT= True
##.SHIFT REFERENCE= INTERNAL,unknown,1536,0.000
##NPOINTS= 3072
##NTUPLES= NMR FID
##VAR_NAME= TIME, FID/REAL, FID/IMAG, PAGE NUMBER
##SYMBOL= X, R, I, N
##VAR_TYPE= INDEPENDENT, DEPENDENT, DEPENDENT, PAGE
##VAR_FORM= AFFN, ASDF, ASDF, AFFN
##VAR_DIM= 3072, 3072, 3072, 2
##UNITS= SECONDS, ARBITRARY UNITS, ARBITRARY UNITS,
##FIRST= 0, 659519, 349220, 1
##LAST= 0.76775, -7638, 16381, 2
##MIN= 0, -679760, -674629, 1
##MAX= 0.76775, 663884, 687197, 2
##FACTOR= 1, 1, 1, 1
##PAGE= N=1
##DATA TABLE= (X++(R..R)), XYDATA $$ real data
0F59519D47624B97772G4754a31144c37886e04524f25765f79760f68940e93342d61630b81741
0.003250000067g4406A33605C31518D95947F08571F63884F50579E75590D44263B72083G3329
0.006000000052a31813c23966d83206e89358f47173f31650e62129d31604b64852g1479A29101
0.008750000037C15937D69560E77437F31897F18763E49184D24229B63292G4696a26783c05427
0.01150000002d59042e65157f19326f07441e41691d25122b61510h1245A16428B93271D45358
0.01425000001E49497F08563E96317E37449D18356B65318H4036a00781b78642d29264e28877
0.01700000092e87825e82236e22680d14259b66140i0481I3288B60619D09509E09564E69763
0.01975000091E68078E15552D07721B68841I8871g9490b48785c94900e03747e59167e63599
0.02250000089e11053d10746b72241a02824G5507B41012C93088D98532E64706E67729E14536
0.02525000088D14020B77899A05026f8376b45703c93171e03801e66474e71811e19659d17250
0.02800000086b74436a07063G3643B48402C96617E04985E67005E70555E16725D15220B70481
0.03075000085A01201g8488b50829d00478e05295e61182e59337e06608d02421b60142i0673
0.03350000083H9157B52179C96981D97608E52781E48399D95917C93956B47590G7065i5346
0.03624999896b60228c96252d96354e44065e39442d77574c75660b30255f3902A06909B68362
0.0390000008C99892D99242E36404E30443D70827C61797B17210E3224a14917b72980d01473
0.04174999893d91474e32332e21962d56366c50444b02929d3973A22694B77350D02086D82138
0.04450000077E18323E03947D37820C34195A92312C6313a22725b71945c86999d68541e01832
0.0472499989d84512d18007c13109a79924b8119A24263B65459C72745D53394D80601D64216
0.05000000075D02105B99772A72297B4147a20887b55262c60353d37675d63001d50411c89650
0.05274999887b92282a69040b2596A19383B50890C56373D29443D60837D45148C85040B90356
0.05550000072A70184B6884a12607b45721c50864d24674d53858d44224c83840b87366a69024
0.05824999884c0342A12038B45885C47985D18970D47670D36352C78281B84174A64385C1023
0.06100000069a10198b38642c40290d13669d41676d26028c74355b81791a62839b6871A08107
0.06374999881B37358C38375D05600D36900D20257C62214B76782A57693B4786a16199b37170
0.06650000066c40219d07443d34283d22018c63243b71849a51115a6841A20499B46602C47014
0.0692500025D10940D37846D19390C59804B63983A43888A0397a29432b53447c53845d15548
0.0719999969d39409d17464c55634b57331a35993D314A36592B57165C55267D15985D31695
0.07474999875D09052C41919B45175A21224a1848a47468b63078c53438d09331d22790c92712
0.0775000006c25369b26595a05496B3440A51721B62687C48294C95766D06956C75928C10218
0.08025000244B11424I2910c1473a57275b63253c41702c90115c95509c65677b98743b00393
0.08299999684h4317C8230A57416B59913C39374C84871C86774C54597B86293A90097G9193
0.08574999869d5021a57377b59698c35238c74915c78817c44561b78865a86917g4828D5610
0.08850000054A59549B58608C25112C62633C67881C35368B67966A76541F8708d1942a53842
0.09125000238b48783c14038c55076c55959c25258b57892a70667f5739D5992A49746B40430
0.09399999678C10783C43428C45746C18389B54591A68845F6975d4451a47479b37218c05533
0.09674999863c36812c43658c14513b54239a66749f2243D1097A46464B38327C05467C41236
0.09950000048C45457C10496B56022A67419F6958d4911a47541b40793c05217c48410c48697
0.1022500023c17860b52446a65274f0196D6468A55458B42521C08890C44852C44827C12363
0.1049999967B47848A58407E6478e4772a55257b48152c07080c40053c40360c05111b42114
0.1077499986a51434d5885F1469A61180B44477C07034C37620C32398B97222B28849A41825
0.1105000004C7392f6485a68992b50994c08226c36628c30108b88434b23056a32416c1648
0.1132500023G4802A75791B52482C10787C33651C25385B82651B14303A23619B1884h2014
0.1159999967a78941b57550c07288c30915c14726b74879b04013a14912a3728H7996A81147
0.1187499985B56754C04918C19904C07858B63478A91051A04147D065i1044a81182b48764
0.1215000004b92777c08155b93528b50554a77505i4152D31I6770A78502B44625B84020B98878
0.124499999B81576B36582A72350H6867f143i4489a75903b37263b79409b90742b75377b29656
0.1274999976a69139h6770B127H8892A71644B35566B78356B86819B71463B29580A69225H2498
0.1305000037d059i3519a69458b31063b71961b86195b68499b26238a63363h5737D527H8931
0.1334999949A68597B28395B69929B79107B64437B23776A57141H0581b389i0097a65741
0.1362500042b29164b63825b75227b59910b17571a53051g8834F628H9748A65963B25303
0.1389999986B58967B73748B57759B15476A53430G7717d657i2325a69295b26949b61660
0.141749993b76622b58268b18927a52950g3714A1131I8072A73481B31132B69688B74297
0.1445000023B59832B14716A51183F8509a9066a03970a78149b36343b67763b75043b55979
0.1472499967b08286a45351f3188B4062A10702A82899B35219B66372B71860B46392A99902
0.150000006A34135E2636c1838a12059a80257b33440b61273b62224b37244a90923a24236
0.1527500004d3523C8620A20025A82959B34844B58520B57168B29899A80090A13349C8906
0.1554999948d3201a19592a85806b31377b52695b50272b21443a74809a09291c3342D8312
0.1582500041A22819A85223B27993B49210B47722B17059A71052A02397B7486d9715a23824
0.1609999985a82433b25843b43717b38114b09778a59991i5090b4964E3204A25267A78850
0.1637499928B16321B35888B27654B05582A53812I1741B2681e1194a17636a75438b11012
0.1665000021b30128b22478a97111a46066h7461b0309E2505A16553A70233B08378B25188
0.1692499965B16433A92077A44622H6820A7845e2437a16500a67482b02844b19475b21069
0.1720000058a90937a43900i0297b0269E0890A14373A67355B05979B24156B20885A92125
0.1747500002A47219I0054B0702e0885a14451a65573b06820b23742b17366a90657a45324
0.1774999946h3431a9388E3955A16029A71761B06437B21825B14816A85627A38875G8593A4170
0.1805000007e7564a18638a69302b04781b19288b09725a82980a35797g4083e880E8689A22269
0.1835000068A71347B06300B15896B09044A76399A30663G1385F112f3549a24169a75377
0.1862500012b07956b19908b07347a74990a26609f4112B815F9068A29507A80268B07631
0.1889999956B15723B02228A71953A18287E6120h743g3896a32941a77299b06369b11388
0.1917500049b00659a62973a14360e2128A3435G7270A35207A76618A99586B07650A91595
0.1944999993A57364A05516D5580a5329g9941a32719a72244a97685a97052a81947a46517
0.1972499937i8853c9555A9973H2063A29953A71646A89298A93954A75603A39241I6471C5720
0.2002499998b2259h0040a29111a67128a83767a91130a69981a40355i2543c7387B2480G8821
0.2032500058A28538A62733A85021A84690A67847A36294H7731C4152b1639g9635a28969
0.2060000002a61161a78218a79785a64900a34928h5553c3203B3026G8955A23899A56783
0.2087499946A76044A76654A62700A27279H4786C2949b3431g5888a21720a50837a71301
0.2115000039a76001a61010a23728h5105b9797B4761G4749A21874A51306A72620A70451
0.2142499983A57776A24772H2990C0851b8025g7460a20634a55162a71561a72459a56399
0.2169999927a28454g9541c0943B7643G9181A27438A59840A77726A76154A57422A25773G7043
0.2199999988B4876b9978h4335a29683a58463a75779a74276a55300a18783g8648b1208C2366
0.2230000049H6920A28277A61260A73492A68520A50486A15797F8650A7503c7119h8812a27129
0.2259999961a55500a69871a63868a41172a06200f4733a1588D2133I1132A30271A57322
0.2287500054A67846A59549A40133A04729E5679D289d5326i6065a33260a55843a63997a57511
0.2317499965a38506i6244e3578a186D8384I3871A30547A53358A62457A55238A27295I2266
0.2347500026E0951A710d9073i3443a29711a50118a58693a50238a26081h8006d5670E04E1940
0.2380000055I1755A27978A45713A50465A41635A18549H5696D3907c063d8481h9219a21746
0.2409999967a38412a44966a35843a15150g9525c7527E695E0441H9314A18650A37718A46874
0.2440000027A31594A18578G9121C8014a863e0163h9886a17070a37571a39993a36720a14590
0.2469999939g7105d2534C578D4027H4489A19183A35459A38127A33722A12142G9580D0705
0.25c468d6985h6755a15701a34393a44154a31231a13261g7751c4406F174D6268H5671A15000
0.2535000145A34661A34764A30961A05027G6841C8080g797e2580h7979a14401a32242a38729
0.2565000057a29134a06691g6805c6289A2860E0712H8680A17343A31512A38385A25135A05090
0.2594999969F8089B9159a0961e4928h8099a21110a35846a38880a24050a00616f8629b8391
0.2624999881A7015E6966I6648A18072A36936A36584A24952I7502F5072B4301b0260e8672
0.2655000091i2437a24836a33140a33762a19543i6263f0328a9179B3362F2224I8433A16447
0.2685000002A32657A27728A11613H9221E4088A4638b6906f7274i1022a14735a28912a20632
0.2714999914a12059h3329d9340a1698B9223F5259I3045A15771A24063A18951A06700G7529
0.2745000124D8286G642b6911f3896i2885a11447a20600a19257a06261g5593d6123f636B8952
0.2777499855F2692I1506A10677A20090A15416I6814G5952D3787H669b7254f1571h8219
0.2807500064a06415a14850a10782i6441g5107d2475f333B9851E7755H5034A03656A15148
0.2837499976A08230I6228F9130D2136G982b7715e6263h6343a03457a10487a09900i3148
0.2867499888f9839d0893f953B4977E9485H3474A05334A12873A08716I3201F7324D2932H260
0.2899999917b8844e9855h6762a01479a10453a07069i2867g3526d2578f381C0191F1260H7665
0.2932499945A05920A11840A08623I6483F9650C6523C050c3094f2390h8071a04155a12035
0.2962499857a06413i3984f5967c3392F73C3897F7901H8835A05754A13570A04495I0458F5742
0.2994999886C1725c118c6209f9196h9733a04766a10563a00945h6997f1525b9877B901C9668
0.3027499914F7417I3096A03436A08529I8341H3482E9400B5343h944d1598g2138i1622a03416
0.3059999943a06214a00868g9986e5936b5485H308D4587F9803I2588A03672A05336I3419
0.3089999855G7191D8751A9601a3696d5162f9338i0589i9416a01194i0524g5527d7511a8564
0.3122499883A4281D4705F9580H8503I3712I8984H5392G2160D0678A6372a3451d4444g0316
0.3154999912h5443i5160i7382h3807f8729d6629a4576A2293D4051F7850H4104I4717I5926
0.318749994H4723F5938D1157A6749a5158d1246f4732h5411i3483i1736h2789f9581d6073
0.3219999969a8172A5141C9156F6007H3880I4123I3430H2420F9398D4693A9585a1954c9844
0.3252499998f5394h1222i1818i4135h4462f2446d2451a7423A4054D1897F4880H1621H8266
0.3285000026I2575G9425F6208C7364A7743a6078d3394f7777h2518h9649i1682h1408f3469
0.3317500055d1597a2394A5088D5111F7352H1504I2257I1580G8745F4578C9814I613a7023
0.3350000083d8652f9715h3893i2523i0381h1701f1575c5600g684B1413D9271G0024H5684
0.3382500112I3622I1265G7798F0873C2482E618b1070d7311f9473h8757i1741h8853g7302
0.3415000141e6555c3859b656B6709E0267G1093H3791H8570H3349G1629E1988B6409A559
0.3447499871b9251e0271g2744h5082h8805h0816f9570d9152b4420B238C0766E2886G1018
0.34799999H2661H7119H0982F7533D7433B1492e759b7836e1342f8419h0387h3107h1166f6442
0.3515000045d7576b3415B850B8161E3835G2307G8065H4674G5793F2719D6218B2061e038
0.3547500074c0211d8849f5822g8794g7131g5466f0686d2304a9175F838B5427E1815F7614
0.3580000103G7305G8512G1721F3319D1767A7632e129b8848d8469f5945g5692g7316g5604
0.3612500131f1017d1389b1080D076B9279D7647F5181G9147G9996G2912F4244D0119B1271
0.3644999862e038c1361e1222f9507g9581g9019g3694f4289d1480a9063D506B8812E2319
0.367749989F9428G8538H0457G3746F0322C7575A8626g806c1956e2588g1580g8261g9652
0.3709999919g3190e5618c7389a4764A0083C1338E3948F9010G6853G9922G0046E9310C6863
0.3742499948A4844a0082c3839e6019g1268g7945g5038g0277e7171c7375a0984A3889C8053
0.3774999976E7620F9137H1121G6800F9927E4625C4132A2117a5775c8372e4538g1458g9799
0.3807500005g6008f7340e0963b9678i242A6837D0558F1121G0959G5595G6272F2612E2000
0.3840000033B8383E137a8120d2053e7255g1488g3199g0796f0803d8735b4773a520A8382
0.3872500062D3867E7732F7904G3547F7479F1553D2526B3992A628b0610d3831f0709f5255
0.3905000091g5400f7268e8724d5247b3091A00A8236C8890E6379F6183G1902F7634E8037
0.3937500119D5174B3780A820b0691c8046e5425f2393g2613f7401e8846c9867b1971c184
0.3970000148B0172C8252E3677F4529F8108F4827E7156D3656B2441F53a9125c8228e2493
0.4002499878f6168f9249f4722e3172d0170b0442A925A9631D2099E4238F4395G0584F4565
0.4034999907E3620C8723B3076c24b3906d0010e3929f3278f6419f5986e4565c6218a9893C021
0.4070000052B1042D2942E5046F5273F8396F7093E0923D0807A6195a357b6985d3561f0579
0.4102500081f7946g0922f4666e7848c8630a8014C440B4289D3174E7063F8544F9823F1253
0.413500011E4144C5282A1069f152b8882d5697e6352f9798f8724f0046e0727c1649a1015G997
0.4169999957B5144D7549E9060F7614F6093E9913D5334C3222A2116a0567c1207d8261e9847
0.4202499986f5589f4915f0523d6711c1354i344A1147C3941D7018F1354F3273F2062E8090
0.4235000014D2252B3599F117a2420c1192e0990e9762f6935f0079e0370d4256b6705h047
0.4267500043A4197C2439D8408E5928F3930F0890E3827D1815B4462G242a1963c3987d7800
0.4300000072e6171e8126e8605e0337d1401b1037e653A3443C0500D5743E2764F2446E8638
0.43325001E2303D1484B4071A358a4919c2330d3285e7620e7823e7490e0303d0056b4087f452
0.4367499948A2316C3626D6030E4236E7788E8318D9835C7674B1175D237a3363b9183d8717
0.4399999976e2562f0532e8816e0185c8440b4370a536A4441C1846D5931E5931E6751E5582
0.4432500005D9079C6613B0181D360a8479c3242d6221e6072e7727e8468d5625c4052a7373
0.4465000033C294A8228C2480D5883E5822E8136E5355E1359C2455B0618C63a9855d0335d7270
0.4499999881e9961f0527e7050d5191c5629a6048a900A9755C7148E0041E7131F0727E5872
0.4532499909D6660C1987A7661c213b0546c7179e1549e6303e9698e6253d7686c3234a4096
0.4564999938C876B2902C7500E1761E5578E6774E1908D3220B9666A0170g531b5292c9880
0.4597499967e1742e6041e3219e1917c9188b5639h307H788B3453D1056D8617E5723E7146
0.4629999995D8388C8775B4255H664a0627b7216d0331d9235e3927e3839d9311c6768b5332
0.4662500024h980H129B4389C7838E1037E3658E4431D6781C5495B5400H955a0085b5296d2286
0.4697499871e0655e3803e1327d4660c6742b3870e024G438B6294C6991D6007E1874E5017
0.47299999D6999C4548B1078F952a1997b7158c8037d5678d9623d9686d4460c6370b4705g162
0.4765000045H888B5577C7677D5739D8971D8243D4893C4423B1831E816i551b5708c6083d7773
0.4799999893d7423e0774d1328c5526b1396f283A3744B7081C7364D8735E5205E2255D4543
0.4832499921C6543A9924E148a1849b5865d0756d8721e2463e0231d5999c1405a9264c856
0.486499995A7544B9258D0963D9522E4592D7987D1867C3518A7720A282a0573b9542d2325
0.4897499979e1539e3316d7771d4044c0195a4874A120A8397B8427D0880E4891D9116D8700
0.4930000007D1968C1924A4415I37a6663c1531d4821d9366e2344d7279c9752b7600a4863C579
0.4964999855A7008C1922D3758E1482D8745D7714C6248B7672A1755f625b0776c2821d1807
0.4997499883e0080e1915d5637c7867b5567a1561C780A7290C1651D0434D9040D7907D5930
0.503000021C5837B2293A1222e065b2373b9333c8163d8328d3559d4728c5218b3275f693E757
0.5065000057B0979C2345D1203D4942D3566D3966C3567B3753A0899h233a7135c3990d1829
0.5097500086d3937d7647d0751c4201b1513i456D811A7520C2584D1606D8628D4506D3555
0.5130000114C3161B4079E806e087a7486c5505c8831d3599d3218c8878c2560b1367g396E353
0.5164999962A9576C0325D0894D4530D5108D0903C2362B1642G477g087b4220c1226d3871
0.519749999d2768d7880d1026c2668b0723g330H179B2041C3122C8345D9602D4499D3787C2606
0.5232499838B1461E927g789b4214c8811c9060d6756d8383c8849c2612a9398e869H465B3882
0.5267500281C6083D5192D7749D3725D1085B8943A9770D953a0348b3309c5766d4091d7460
0.5299999714d3701d1087c1751a7174a444A2728B5576C5760D1407D6352D3200C5921B6823
0.5332499743A3477g50a5552b5855c7710d0509d8959d2662c5930b4704a3186G08A4192B8761
0.5367500186C7005D4827D5536D2861C5846B5524A5404c706a5352b7665c6125c9370d4857
0.5400000215c9320c3078b5678a0677d24A4618B7400C7715C9891D3129C9703C2441B4533
0.5432500243A3160b028a4590b6211c5378c9349d3940d0587c1863b4565g975D214A7615B5834
0.5467500091C4750D1627D0221C7607C4543A8362A1162c19a4703b4676c4685d0453c7439
0.5500000119c8054b9130a8864a1394C261A5602B6976C2669D2286C8999C7998B9015B4645
0.5532500148G215a693a5636b7039c4105d0874c8725c8306c0985b0464h685a403A3070B9251
0.5567499995C7050C9375D3590C6619C2755B2577A1976f832a5837b7258c4934d3306d1606
0.5600000024d0522c2459a8065a1369H865A6796C1792C4873D1335D0770C9455C2454A7958
0.5632500052H934d188a7129b7924c5226d3876d0625c7477b8760b1090e564H233A8783C1003
0.56674999C7323D2098C9191C6506B8072A9013G15a0298b0978b9838d1641c7952d2177c4355
0.5702499747b7205a4416e493A0636A9342B9370C5184D0525C8643C5583B6742A1445G23a0455
0.5737500191b1888b8419c6954c4659c8936c1327b4379a2193F15A0721B1411C1928C5543
0.5770000219D0392D2597C2165B2201A0778c230i597b3665c3465c6198c9522c9257c0766
0.5802500248b4433a3019D54A0195B3193B9688C7167C6321C6121C0911B1266A4334a223h590
0.5837500095b2438b9457c9457c5830c4796c1280a6941a4776c632I662B1367C4437C2854
0.5870000124C9104C7068B7827B2282A2124a158a1047a9589c2037c4131c8329c5326b9735
0.5902500153a8628a1828C628A2306B2810C0909C2265D0110C2555B6684A9524I602E30a3711
0.59375b2597c4544c6908c4734c2739c0129a9037h708B8A5363B1089C0186C9350C3727C4937
0.5975000262B8476B1732A1014b192a0016b4650c1534c6289c6698c1441b9153a8999i142g75
0.601000011A4757B2250C2808C7706C8673C6598C1248A9534E962e202a4890b7162c1019c5637
0.6044999957d0949c3684b6241b0586d979D294A4458B6278C2822C6623C4327C4373B5952
0.6077499986A6456I022f926a5786b3877c3651c2755c3752c2821b6480a7802a758G450A7464
0.6112499833B8891C3911C5640C5060C2084B3471A5034D759e162a8270b7233c1945c7764
0.6144999862c4781c2681b1834a6365i534F898A6709B5338B8835C4058C4546B9971B3603
0.617749989A0679D653f841a8495b4952c3008c5553c0516b9442a8191a1967a393I848B0521
0.6212499738B1475C0795C1973C1430B7652B2772A1671G118i354b1317b4208c0659c5962
0.6244999766c1201b7634b1792a3227c673H680A7395B5753C0029C1142C2136B9166A9519
0.6277499795A3468A101h484a7804b1697c1564c2834b9687b8161a9927a0058A531G524A9880
0.6312500238B5959B8363C3236C0209B6970A9585A3048D614h409a8621b5026c0842b7172
0.6345000267c0308b5696a4907a2895E52A0458B0978B3458B9237C1878C0226B6986B1903
0.6377500296A0295A154a1873a9518b8273c1117c6607b8530b8320a6854i159C810A3403B3798
0.6412500143B5388B8889C1515B8184B3857A9457I904h91a0915b0993b4183c2695c1221b9415
0.644749999b1435a7673d750C521A1929B2948B8803B6801C0021C0214B3985A5406D819b861
0.6482499838a6181b1172b9871b9881c2094b8049b2830a5300b921B420A4787B1921B8675
0.6514999866C0761C1019B8179B3490A3015B844b970a4720a9603b7424c0426b7658b9507
0.6547499895a9849a2259c089C637A3910A9905B7299B8317B7371B5147B2108A1346C592d622
0.6582499743a0722a9713b4840b9939b9858b5684a8914a4283b793C948A0697A9717B4729
0.6614999771B7396C0536B3852A8800A4295C282e315a4576b0884b3009b7463b7883b8510
0.66474998b1088a3070c423D456A2152A7035B2608B7454B7789B6985A8692A4851E590g394
0.6682500243a2927a9881b5780b7401b7507b5677a6182a3003b20C498A5652A8091B5753B8285
0.6717500091B7602B2951A7841A4166G492e543a4527b2065b4490b9175b3375b2891b1075f566
0.6752499938g23G793A4891B1094B4633B7890B6362B0141A6813A0961F601f166a6600a9597
0.6787499785b5710b3948b5426b1931a4429i190b38G210A7231A9191B5367B6801B6429A8670
0.6822500229A5438E924D055f854a7086b4207b3854b2705b5292b3433a4617g077b654A0973
0.6857500076A6336B4577B5288B9589B5575A7141A6672E919a027h808a7468b1133b6368b5708
0.6892499924b4546b1698a6968e788B204A0869A6234B7117B5987B7008B3173A9221A1388D641
0.6927499771i92a1848a6081b1700b1613b4646b1437a8956a3600c701B752I042A5276A8360
0.6962500215B3854B6105B4021A7551A1631G292e825a0560a4299b2656b4767b4358b0713
0.6995000243a6183a2375e864C499A1405A7010B1316B4502B2012B4038A8467I230F691c457
0.7030000091h795a3600a9019b1383b1656b0030a8551i824c699A692H787A4521B3035B5100
0.7064999938B0806A9616A9454A1896G856a260g176a5171b2460b0130b3373b2164a7879a1964
0.7099999785d462A418A1277A7436B5181B2985B2960A9059A7243A3795E678b241i434a6560
0.7135000229b0371b0670b2777a7352a7116a0873c290F641A1371A3154B2065B5125B5037
0.7167500257B5404A6428H791D880d602a0307a8301b1403b4005b3015b3220a4498i934c148
0.7202500105C374A1082A4034B5323B3770B3486A8316A7500G970A838g474a1705a8678b3898
0.7237499952b7123b1300a9449a3233i083B054E373A3804A7325B2379B0941B0967A6401A4725
0.72724998D250B95i634a1784a9550b0491b0366a9476a8449a4197d830a290F038A2347A6360
0.7310000062A6277B3599B2906A6538A2485I243A059f918a2131a8053a9247b3872a9519a7232
0.7344999909a1730h324c426D798A4974A3427B0200A9697A9877A7737I819C125c166i247
0.7379999757a1585b0975a5520b0771a7540a5445a2258d614B589H570H598A8226B0708B3491
0.74150002A8681A7445A2466D111A330f361a1650a7628a8963a8240b0013a3540a0773d052
0.7450000048A832A2092A3620A4159A6438A8750A8370A8731H982I127a405h930a4094a5026
0.7484999895a8712b0737a9766a6543a0650e848D20I669A2987A6843B1983B0647A9386A7875
0.7519999743A1824D407c526h697a6008a8403b2967b0603b0015a4670a2111c742E71A0446
0.7555000186A4266A6796A7013B0456A8714A4115I383D618e98g500a5453a7998a7912b0375
0.7590000033a6931a3912g670c964D196H722A1866A4908B0892B1697A6387A1889F662A062
0.7624999881c666i161a2458a9751a8746a9005a8489a1597i659b569E273I868A2672A9507
0.7659999728B1707B1746A4934A2049G767A038e539g638
##PAGE= N=2
##DATA TABLE= (X++(I..I)), XYDATA $$ imaginary data
0C49220E07556F31817F87197F74773F00456D65042B82657G9523a34904c36435e02929f17848
0.003250000067f74629f60545e86519d48238b77482f9903A33956C27330D86083E99819F52959
0.006000000052F40044E65507D37745B67308G2050a29850c16556d71096e85241f36431f25645
0.008750000037e55652d26488b61681g0424A27923C09353D62956E73411F22897F13459E47447
0.01150000002D27316B66000G3259a19286b96953d53835e62327f13508f05402e39088d20880
0.01425000001b66656h2361A07896B83835D34631E43629E93873E92332E28332D15099B67004
0.01700000092H8478i2691b70466d15261e24230e74360e76563e19644d13967b65426i1769
0.01975000091H4759B57487D01133E05364E65895E62575E12742D07945B70989A01367g5118
0.02250000089b46975c89010e00166e56334e65523e08537d12056b74551a01085G0459B43667
0.02525000088C88357E00976E64744E68600E16348D19061B76786A07748g2969b47752c93512
0.02800000086e04832e66147e74520e22046d21226b75092a03176G7694B45667C95586E06195
0.03075000085E67023E65579E14196D12198B63931I4223h2353b54489d01016e00275e56197
0.03350000083e55247d99276c99046b50258h4441I2214B57002C99990D94347E48329E41169
0.03624999896D88006C79804B40041G3260a01751b63452c98737d97231e40913e34218d75063
0.0390000008c66255b26507f0212A11124B70118D01642D97619E36240E24002D62288C54904
0.04174999893B11623D8371a20281b71250c98452d89203e27255e11688d48113c40050a98216
0.04450000077d0159A27030B70817C93669D76799E10229D97078D26280C23399A82985C2371
0.0472499989a25575b67837c82491d57180d89091d70439d09777c06568a72349b7317A24261
0.05000000075B58308C71434D42357D71143D52454C93059B95886A66327B6282a20030b54293
0.05274999887c58853d28129d59138d45145c85345b90360a66176b6594A17159B47609C53960
0.05550000072D23921D56052D42954C85559B88284A68347B8968a12015b46430c49319d22090
0.05824999884d52613d37181c86577b90296a68892b4032A08221B39298C44770D14979D45964
0.06100000069D32905C76238B85306A62534B9317a11649b39780c38701d07895d40675d26449
0.06374999881c68969b78763a58181b8737A10180B38411C37257D05619D35334D23839C62197
0.06650000066B74321A52688A7148a17091b41132c42001d09594d35666d18817c63150b66106
0.0692500025a49100a0829A25656B49791C48399D15001D39084D21249C57155B60399A38563
0.0719999969B177a39374b58624c55629d12582d39248d14105c48568b52010a27577A0049
0.07474999875A39842B60630C56509D06436D27344D04910C34035B35694A11325b0544a50695
0.0775000006b62422c52506d05555d13756c85901c19784b19626i8996C1536A55067B63140
0.08025000244C47517C91878D02766C71930C00461B05172H9133c8237a58520b64134c42231
0.08299999684c88434c94152c60625b91207a94989h1402D2130A57956B65661C33895C80505
0.08574999869C83175C50960B85124A89877G5530d3227a58073b61358c30871c70303c73499
0.08850000054c45528b74170a80964g1228D4310A59710B52306C25881C60222C61902C30503
0.09125000238B66499A75963F9401d5062a49375b45749c11297c52679c52169c19426b59661
0.09399999678a70976f6546D4685A49758B40144C04118C39679C44679C13040B54317A64561
0.09674999863F4357d4006a43312b38025c01881c40917c44642c13839b51646a67192f2363
0.09950000048D2081A47289B37138C09429C44713C45951C15940B53046A65262F2029d6923
0.1022500023a51285b43653c07710c43765c48395c13070b49080a62631f0340E2489A54933
0.1049999967B43970C06354C42513C39823C08848B41523A55038E3672e6727a57692b46132
0.1077499986c07763c37266c34133c02317b36118a46680d4551F4459A66261B44036C05256
0.1105000004C38037C29354B92077B27195A39582C4793g3664a69279b54461c06582c36375
0.1132500023c28916b85669b18212a29504b3627G8512A74361B56723C11134C32239C25162
0.1159999967B79725B11314A17382A7501h6451a80525b58382c07529c26062c11298b67540
0.1187499985b00168a05535g975H9087A79256B51366B97697C16474B97481B57322A86037
0.1215000004I8071A784i3565a79976b46807b88277c04839b85299b41392a73969i2435F17
0.124499999I5466A75534B43313B79730B94031B76074B37440A68294H5455c341i1455a73817
0.1274999976b37515b76960b90381b72264b30730a64234h3035B634I3094A71134B34662
0.1302500069B75068B86971B72655B29306A63693H5614a871i1209a69813b26445b70020
0.1330000013b79785b64339b23231a62482h5153D174I0435A69357B27292B64049B74433
0.1357499957B60323B18958A56250G7814i476i2037a67156b25131b62845b74592b58474
0.138500005b16659a53154g6969D247I1399A68644B23877B61412B72735B55928B13702A54175
0.1414999962G5527i628i3907a71939b28867b64763b79200b56950b14902a50678f9283A5952
0.1445000023A02420A69507B34557B67896B73949B58345B11023A44423F4845b4076a05021
0.1472499967a81246b33440b65620b72925b53601b03930a38765e5224B5944A10668A81624
0.150000006B33896B62950B65210B44023A93030A32941D7961c8870a16302a82562b34744
0.1527500004b57787b62103b35418a88122a19185c8752C8556A16599A83607B31620B55740
0.1554999948B53775B27539A78190A12076C4722d9537a24288a86259b33025b50067b48750
0.1582500041b17122a70315a03577b8211E0645A22215A86735B28437B45722B42266B12676
0.1609999985A66596I7725B6441e3469a23547a81343b21432b43564b38087b07045a60321
0.1637499928i4150a9751E2065A18467A74013B16518B33868B25463A96942A52410I1249A7443
0.1667499989e2252a19431a69398b10361b24442b20750a95768a47441h5908a6818E1013
0.1694999933A16461A70564B04838B19307B16625A91990A46031H6001A7674d9600a13025
0.1722500026a65903b03679b25518b15641a91786a46443h5771a7320D9428A13550A67916
0.174999997B07932B23971B17084A90611A45302H5272A6981d9571a15901a67594b06320
0.1777500063b25521b13677a89788a47530h1427a5882E4307A18178A73721B05115B22195
0.1805000007B12298A85757A33849H0802F133e7112a19269a68978b03041b18162b14010
0.1832499951a80113a34055g2668d002F2956A24040A73963B08124B16946B04898A75294
0.1860000044A28416G1038C994f9459a26596a77463b07023b17000b06167a73076a26489f1967
0.1889999956D177G2038A33253A82009B05574B17031B00402A67390A14842E6592a1674g6428
0.1920000017a34149a78469b00441b10162a94514a60436a10934e0290A5742G8946A31065
0.1947499961A72523A99751B00061A85304A52856A00189D5041b0230g9551a33139a71036
0.1975000054a92011a95682a79099a43199i9324c9226B2848H0233A29639A66194A86146
0.2002499998A90548A70802A40486H8803C2637b4498g4649a31659a67945a82645a84898
0.2029999942a68315a39681h6431c8737B4061G8520A26799A59797A87159A79249A67543
0.2057500035A33955H7672C7167b3230h0702a22725a60294a74763a82613a63990a33043h5243
0.2087499946c0858B1910G2773A22033A55052A73107A73801A60713A26462H6253C2445b4634
0.2117500007g5852a20263a54234a71858a72937a58869a25218h3435c3753B1261G5729A20462
0.2147500068A54198A73122A72892A57387A25185H0431B9678b5337g9891a24516a55955
0.2175000012a72724a73240a58856a26823h0405b5790B7055H3494A27373A60435A74986
0.2202499956A72094A53856A24253G8324B2425c1986h6530a25303a62210a75815a72653
0.2230000049a53057a14393f9418a7145C4203H9379A28200A57701A70023A66050A44707
0.2257499993A11211F8566A3058d0477h8561a30544a57261a64164a63253a41927a05699e9120
0.2287500054e790D3850I2986A30759A55056A65481A57280A38375A00188E7709C216d5550
0.2317499965i4059a33770a56464a65249a53651a32831i5540d8660C34E0229I0691A30873
0.2347500026A51375A59983A47204A25124I1438D7308d037d9300i3133a24079a48450a53350
0.2377499938a44869a21292h6826d3432B073E2036I2682A23553A42004A48245A38787A18064
0.2407499999H0573C7031c858e0084h5913a19421a37967a40753a36127a13577g9858c7236
0.243750006C923D7968H8659A13998A37003A43975A33379A10082G9159D0879e582d7668h5402
0.2469999939a18136a37029a44459a33264a12812g9600d1289B249D9447H8607A15565A37238
0.25A43786A31901A12570H0389C6316d616d9484h8693a16148a35327a39968a31842a08287
0.2532500029g8843c7220C619D8058H6267A17413A31226A37401A30849A08159G6293C6973
0.256249994f692d9593h6506a18005a37066a39085a27411a08033g1329c1186I481E5745H6619
0.2594999969A19737A33690A38911A22581A06342G0033B8621a5981e6473i5796a18491a35495
0.2624999881a38413a25174a02663f6091b4992A9891E8944I4190A20629A36144A36411A20839
0.2655000091I5356F0634B0495a9853f0484i7547a20197a33099a31668a12314i1872e4361
0.2685000002a5677B5338F4899I5023A19169A28324A26282A07142H4367D6375A2612b5851
0.2714999914f4968i5957a13673a26432a23849a06048h4073d6268i919B9583F3289I6361
0.2745000124A14299A20142A15673A05508G7378D9529I829b9053f3412i1797a15830a20173
0.2775000036a13856a02332g4390d5934e888B7930F5849H9895A07664A18819A12055I8732
0.2804999948G5193D4467F479b5282f0687i0050a05025a13502a10550i4675g4167d3264d973
0.2837499976B7048E8674H9052A04540A14365A10206I5986G5991D2673A0566b8248e9149
0.2867499888h8287a07095a09460a07428i5302g3592d3783e783B8625F3584H5093A05065
0.2897500098A14540A08138I3639G0636D0952D322b8427f2086h9195a04584a10593a08062
0.292750001i4474g1808c7647a0587C3326F1062H9678A06419A12127A07068I3296G0967C7214
0.2960000038E402c1143f6967h8615a05995a10792a05992i4409f4713c4151F64C4800F3977
0.2992500067H9274A06187A11390A01569H5982F6134C2405e611c8689f7786h9346a05590
0.3022499979a07727i9995h6149f0424b7183G374D0872F8226I0611A05218A08110I9828H1841
0.3055000007E7041B2209g021d4584f9895i4299a02455a04641i7855g9908e1798b2764A4723
0.3087500036D5450F8876I2766A03530A02200I4063G7939D9897A9203a3028d2755f8647h9525
0.3120000064i9399i6978h6317g3626d6475a8746A3096D3790F9707H5613I6873I3551H7099
0.3152500093G0528D6886A3942a6448d1337f8501h2950i6280i1571h7382f7695d5064a4533
0.3185000122A1929D5703F4188H6191I2011I6237H3427F6658D1320A5871a3435d2103f7257
0.3217499852h7634i1681i1443h6550f9987d2450a6738A7239D2829F5120H3749I2385I2572
0.3249999881H4594F7812D2728A5724a4587d1276f6932g9355i1704i2019h2322f6765d0622
0.3282499909a4812A6844D2412F5222H4036I0149I3271H1519F5882D0497A3249a6287d5876
0.3314999938f5104h2051i1191i1424h0624f0445c7125a3004A9228D5572F9889H6899I2648
0.3347499967I0224G9900F1407C5031I980a9266d9916g5659h5696i1375i1587h1297f0127
0.3379999995c7859g231B0359D8995G0697H6597I1741H8900G5516E6396C4083D298b6940
0.3412500024e2123f9179h5600i2533h7901g7323d9361b9708E22B6312E4131G1145H3622
0.3445000052H8456H5282F8333E3241B5589I67b7363e2615g3631h2592h7201h3490f7620
0.3477500081d8914b2831A140C0166E5223G1193G9614H6563H1319F7110D6406B0720c144
0.351000011b7544e2590g2052h0622h0345g6309f2368d7043b2939C043C2953E2006F9898
0.3542500138G8198H1218G5604F1147D4401A9093d078b9484e0850f6548g7665g6875g2448
0.3574999869f1057d2155b0330F277B8950E2159F7324G7476G8886G4976F1952D2408A9707
0.3607499897e351b9579e1647f6966g6652h0548g3645e6562d3683b0347E913B8027E2418
0.3639999926F7289G7789H2997G8303F1505D3370A8790g353c0479e1763f4020g7176g9165
0.3672499955g5419f1073c8660a7369G366B7201E3078F7500G8285H1340G0204E7096D1638
0.3704999983A7299h702c1712e3486f8900g8886g8741g2334f1458c5640a3966A3220C8087
0.3737500012E1405G3021G8492G9531F9407E6736C3440A1372a4283c6599e5938f9979g9999
0.3770000041g5751g1633e6430c5658g867A5426C9126E9477G1295G7686G7090G1265D9334
0.3802500069C2083G553a6842c8599f0062g2195g8947g7176f4396e1292b9978f791A8382
0.3835000098C8114E6424F9438G2917G4703F5558D6175B5486F805b0093c9248e7829f9355
0.3867500126g5537g0261f1006d3268b4110a977B0989C9565E6715G0423F8943G0231E7326
0.3899999857D4901B1643e12b3413c6094e8483f3752g0863f5027e9113d0407b0356a819B0806
0.3935000002D0493E8065F6989G1753F6504E5475D3112B0426A690b2986d0197e4266f4427
0.3967500031f8593f7346e6057d0858b2401B90B2147C7254E4810F6322F8686F3975E8964
0.400000006D1433B0775D584b0156d1062e5868f4776f5094f6160e5611c7878b2325c732B1709
0.4034999907D1539E5330F6967F7703F3759E1396D1719A8843I51b2985c8813e5650f8320
0.4067499936f7983f3035e3863d3802a8783C06B3656D1510E6571F9059F7481F5079E8174
0.4099999964C9866B0608e736b0219d6728e5612f5467g0575f5686e1211c4255a4778F007
0.4132499993B5840D6641F1954F7864F7849F3101E0470C3832A2103e923b6278d2032f0918
0.4165000021f6343f6089f2651d5639c2133a0558I263C0671D3982F0039F6062F5268E7952
0.419750005D6537C0068A0408a0079b9846d6880e9536f3320f8656e8308d5818c0104a1461
0.4230000079A1965B7517D8669E9653F5112F0281E7270D2748B8414C639a1293c0674e0124
0.4262500107e7069f2804f2436e2305d3521b3493f882A3398C3208D5602E9171F5078F1055
0.4295000136E2298D2206B5358G229a4950c0000d4870e5877e7679e6942e0775c8915b0771
0.4327499866f849A5347C0764D6383E2347E8673E8983E3333C7700B2572E771a3528c0849
0.4359999895d7182e6863f1704e7299e1811c6807b5250b541A5188C2762D6786E8078F0692
0.4392499924E9267E0766C7506B5266C017a5109c2184d5870e4508e9264e9651d9213c8002
0.4424999952b5478c787A5917C2678D8919E7472E8699E4706E2131C9415A8219D026a5269
0.4457499981c1909d7114e3969f1296e6653d7282c9007a9211A826A6746C4885D8862E8125
0.449000001F1151E6224D6508C2204B0661b320b4105c6225d8313e8371f0775e5596d6838
0.4522500038c5268a3078A231B0338C5806D8296E8411F2371E7233D6198C3584A5757e003
0.4555000067b2220c9644e1045e9912e4692e4300d4542b9713a2800E803B1414C5556E0650
0.4587500095E5290E7791E3748D1109B5906A2310g763b2938d2538d5943e7353e1789e1413
0.4620000124d0672b3978a1701H499B4536C8892D8974E4876E2928D7945C7075B3560H005g667
0.4654999971b6605c7534d9737e2008e2381d7865c6621b5218g090A0017B6058C8519D8712
0.46875E2379E1527D6238C6071B3503G758g728b5037c9414d9601e4494d8196d7280c6496
0.4722500145b2708g955A2121B2543C7348D7874D9949E2966D7201C4801B4012E240a0988
0.4754999876b5688c6688d6380e1656d8800d2854c4900b2606g187I062B3452C8043D8238
0.4787499905D8761E3392D3781C5581B1835A777i840b7952c3130d9447e3034e2654d4556
0.4819999933c4521b1900e400A3538B8473D1723D8877E3270E1687D4880C5715A8595E583
0.4852499962a1843b6298c8748d9605e0488d8795d2176c2978b1834e65A0393C0384D1894
0.488499999E0237E1503E0391D4399B9157A6949b294a5009b8397d1961d9835e4838e0133
0.4917500019d3102c2498a7678b482A3629C0643D4835D8956E4495D4315C7634B9853A4048
0.4950000048c291a9427c3496d4602d9823e0819d8671c9394b5915a1337C079A9884C2604
0.4982500076D3654D5837E0199D7748C9088B5504A1877e513a8965c2384d3834d7961d8734
0.5015000105d3603c5597b4499i009F047A9207C3469D1242D7975E1584D4911C5917B3867G793
0.5049999952f024a9918c0619d1239d7194d7383d4592c3158b1691i943C183B1339C0249D2419
0.50849998D9266D6561D4003C3157B1966H436d400a9424b8539c9850d4395d5740d1251c3712
0.5120000243b5047h877G209A9870C5876D0930D9227D2811D1448C3510B1800E776e236b0861
0.5155000091c2479d2644d4115d6866d1171c4670a9735h892G035A9258C4181D1513D7291
0.5187500119D5401D2414C0513A9239G716e658b1905c1919d3891d5099d1982c8766c1799
0.5220000148b1199i936F241B3284C4171D2229D7868D5501D0767C3810B1251D393a3736a9239
0.5254999995c7217d3172d8474d4152d2365c1495a9156d846H028B5903C5797D2100D4594
0.5287500024D4427C6245C0177A8387d78h923b0967c6741d2109d4262d4371c9893b4539a5257
0.5322499871a74I549C1684C4786D1588D9174D4654C7851B5402A3682a494a4260b4804c7210
0.5357499719d2021d5572d0635c4369b6148a2016A533A2878B9879C7550D4688D1811C9703
0.5389999747C3830B7585A0739a824a3262b5869c4543d3153d2789d0509c2775b5533a0853
0.5422499776A852A4193B7160C6572D0365D2193C8401C1487B2223G949f52a4372b9229c5946
0.5457500219d2493c9515c9267c1170b1882a1374D422A7512B6854C3944C8021C8907C7091
0.5490000248C3583B3192A0162b929a7009b8507c1983d0233d0776c9438c1046b1154g657C843
0.5525000095A9253B7400C6601C8809D1386C9428C2288A9997A0800d080a6386b6739c6015
0.5557500124c8255d1489d0612c0188a9789a3102D294A6069C0705C8738D2206D0505C8091
0.5590000153B7191B1832H104e206a8577c4421c7706d1047d0445c6514c0886a6881f845D267
0.5625A6758B9851C4819D4903D0768C4176C1621A8748H793i632a6811c0462c7502c9996c7422
0.5662500262c4102c0985a5876c615H130B2087B9630C9039D2420C8003C8800B8513A9044D302
0.569750011i209b0403c0369c6570d1948d2034c4857b6253a4540b955A0641A9721B9484C7355
0.5732499957C7911C9117C2994B6224A3786E90h595b3436b8528c9265c9836c9437c4621b4488
0.5767499804a0003a854A1806B0527C1968C7222C8386C8892B9949B2386A1903a873a0246
0.5799999833b2344c2406c5584c6121c4296c2683b2590a1125b044A2587B2039C3429C8273
0.5832499862C5498C3630B9368A9596A2404A814a0162b1836b9574c7133c8210c5975c3149
0.586499989a9917i492a572I455B0677B9294C6613C5699C4445C1506A8660A3414b483a3201
0.5899999738b3650b8651c4563c5900c5827b6873b2877i923A962A1407B1414C0435C7651
0.5932499766C9236C6106B6064B0192A0284A053a1361b3546c2448c5901c5896c6742b8311
0.5964999795a9477h351A406A2550B5082B8368C6510C7121C4685B6845A9323A0154b91a3814
0.6000000238b3478c1377c5131c7229c3517b8688a9939a2489B954A6743B2622C0559C5901
0.6032500267C6815C4701B7924B0565I548a544a0920b4164c2572c7149c7875c2634b6160
0.6065000296a8863g854D584A8083B2951C4494C5748C4896C1883B4043B0257C896f982a9029
0.6100000143b4545b9413c6718c4910c1445b6157a7431e934G443A8408B7758C0908C3711
0.6132500172C5809B9469B1806A4329F396f372a9503b8158c2701c3122c3884c0903b0589
0.61650002a3057b513G226B0676B5724C0832C3992C0959B6564B3454A4668B887f911a8250
0.6200000048b2261c2331c4408c4232b5891b2346a1163h00H502A8296B5877B8254C0350B9948
0.6234999895B9681B1494A2063A030g916a7694b8342c0357c5193b9774b9098b0434a2454A9
0.6269999743G101A4748B4585C4680B9983C3063B9231A6344A0871B034i474a5347b5507b9765
0.6305000186b8662c1578c1304b0570a0412a085F288A6805B4651C0175C3070B9671B5265
0.6337500215A9903A0519A313i874a5584b9811c2606c1919c0540b7850a7023a1025F25F607
0.6372500062B1497B4983C2379C3247C0323B6324A5619A1306c958a0468b1118b7626c4513
0.6405000091c2202c0352b7117a7678a0583B14A1783B0144B5845B9879C0938C1794B4956
0.6437500119A5548H643a277a3282b1415b5684c0510c2189b8577b6227a7316h955C313H600
0.6472499967A8448B5303C0636C0024B7066B0682A5276D748f019a4310b3547b7154c0609
0.6504999995c0236b2705a9954a3176f591E232A1503B0438B8469B6885C1983B3718B0373
0.6537500024A0794B205d186a1537b3971b3785b8128c0941b6944a9039a2927c987E455A4370
0.6572499871B1684B1686B8892B6094B9559A7935A4416B410d644a4243b1983b5526b6105
0.66049999b7735b5891a9008a1491d048D428A4163A6064B5620B8871B7173B2573B1061A5310
0.6639999747G094h489a3738b0458b2388b6174b6185b5392a9029a1451a637A295A3228B1857
0.6675000191B2867B8860B9539B5007B0243I238E900h037a2844b0214b5039b7168b9832b4413
0.6710000038a8905a0317b196G270A4134B0921B5262B6676B8722B1160A6852A3094C546g028
0.6744999886a4466a9313b6087b9538b7989b4066a7911a0308a002H282A5826A8637B6292
0.6777499914B7868B6368B3790A9395G716E80i045a4330b2672b8274b6197b6575b1733a8897
0.6812499762a0557G31I352A2944B2558B4128B9339B4894B3904A5608H591a5a1212a5451
0.6847500205b2297b6153b7154b4027a8461a4508f949C023I722A8415B2471B5012B5060B3530
0.6882500052B0590A1792F203a120h094a5029b2936a9512b6266b5241a7775a6986e057B460
0.69174999A0905A6536B0394B6857B6086B2567A8403A2273E143e116a2110a7410b2130b2937
0.6952499747b4179b0594a8948a3154h386D876A1290A6374A9205B5974B3511B3542A5899
0.6984999776A2666D308c22i268a6561a9603b3246b2875b0869a5022a3022f364D409A1426
0.7020000219A5138A8808B3331B3120B1951A9130A2349D941a342i779a6394b1323b4315b5340
0.7055000067b3130a7296a0935c224B754A0047A6181A8159B5986B1021B2179A4055I844D502
0.7089999914c158a1190a6118b0069b5059b5643a9801a7290a0724a534A866A0587A5072B0708
0.7124999762B2330B5170A9900A5233A1074E227e473a1218a6529b0995b2247b2550b0818
0.715749979a6722a2486c873E111I933B1085B2812B2708B2987B0405A4635I316A046b952
0.7192500234a2732a6756b1835b1827b2341a7291a8596h406a960G917A2234A9965A9717B4688
0.7227500081B1878A9216A3896G655h66d603a2116b0433b1805b2508b3340a9145a3498f419
0.7262499928a073D916G305B0808A9203B6445B1198A9018A1056D184A179d764a0326a9391
0.7297499776a7316b2389b0077a6892a4564e522C122F203A0958A8104B0942B1632A8984A9039
0.7332500219A4747F246a369f600a3678a7431a5981b0646a8750a5789a2345d444A180D083
0.7367500067A2357A7101B1169A6971A8736A9861A4493D093h31f296a2634a6372a8779b0701
0.7402499914a7785a6046a3487e569A157G690A3550A8458B0516B1539A9249A6095A2088G107
0.7437499762c397e271a1675a6227a9919b0861a9934a7890a3028f817A712C741A2978A6332
0.7472500205B2066A9696A7803A4052A4502H14c42h583g172a9694b0464a9653b0883a6366
0.7507500052a2391b987B027F760A2593A5772A7104A9452A4956A5913I550C062a577i712
0.75424999a2758a7452a8832a9523a9352a6792i064c060C121A1176A3772A8517A8980B1481
0.7577499747A6344A4367A0269B757d754f388a7742a9666b0630b0512a8634a2948i188g86
0.7612500191C066A1203A5263A8721B0160A9078A6444A0863F485B003d987i123a3065a6162
0.7647500038b2588b0919a4979a6013g174b118E414G846A1236A7741A9639A7261A6381
##END TUPLES= NMR FID
##END=

Reading and vizualizing .rda nmr spectroscopy files

Hi,
I am writing my thesis and I have to analyze the spectrum from Siemens apparatus in .rda format. I would love to use nmrglue for analysis, because I really like the methods of this module.
Unfortunately, I have a problem loading my specters. Is there a method in nmrglue that will allow me to load my .rda data and it will be ready for further analysis and visualization?
I really need leftshift and line broadening in my spectra, because they are slightly shifted relative to each other, and I would like to present them on a common graph.
I am asking for help very much.
I have already tried to load the spectrum as follows:

dic, data = ng.pipe.read_2D(".\whoiii3\whoiii_30_2.rda")
print(data.shape)
print(data.dtype)

but it gives me answer like that:

C:\Users\Aleksandra\AppData\Local\Programs\Python\Python37\lib\site-packages\nmrglue\fileio\pipe.py:1478: UserWarning: (4103,)cannot be shaped into(0, 0)
warn(str(data.shape) + "cannot be shaped into" + str(shape))
(4103,)
float32

and such results are not possible for further analysis.

thank you in advance for your help :)

Problem with line fit

Hi all,

I am getting the following error when trying to fit a spectrum:

Traceback (most recent call last):
File "/Users/nicola/GoogleDrive/Python/NMR/peak_picking.py", line 48, in
ng.analysis.linesh.fit_spectrum(data, lineshapes, params, amps, bounds, ampbounds, centers, rIDs, box_width, error_flag=True)
File "/sw/lib/python2.7/site-packages/nmrglue/analysis/linesh.py", line 277, in fit_spectrum
campbounds, wmask, error_flag, *_kw)
File "/sw/lib/python2.7/site-packages/nmrglue/analysis/linesh.py", line 521, in fit_NDregion
r = f_NDregion(region, ls_classes, p0, p_bounds, n_peaks, wmask, *_kw)
File "/sw/lib/python2.7/site-packages/nmrglue/analysis/linesh.py", line 807, in f_NDregion
p_best = leastsqbound(err_NDregion, p0, bounds=p_bounds, args=args, *_kw)
File "/sw/lib/python2.7/site-packages/nmrglue/analysis/leastsqbound.py", line 253, in leastsqbound
m = _check_func('leastsq', 'func', func, x0, args, n)[0]
File "/sw/lib/python2.7/site-packages/scipy/optimize/minpack.py", line 20, in check_func
res = atleast_1d(thefunc(
((x0[:numinputs],) + args)))
File "/sw/lib/python2.7/site-packages/nmrglue/analysis/linesh.py", line 771, in err_NDregion
sim_region = s_NDregion(list(p), shape, ls_classes, n_peaks)
File "/sw/lib/python2.7/site-packages/nmrglue/analysis/linesh.py", line 725, in s_NDregion
r = s_single_NDregion([A] + curr_p, shape, ls_classes)
File "/sw/lib/python2.7/site-packages/nmrglue/analysis/linesh.py", line 763, in s_single_NDregion
r = np.kron(r, ls) # vector direct product flattened
File "/sw/lib/python2.7/site-packages/numpy/lib/shape_base.py", line 782, in kron
result = concatenate(result, axis=axis)
ValueError: need at least one array to concatenate

Here is the script I am using:

import nmrglue as ng
import numpy as np
import sys

dic, data = ng.pipe.read(sys.argv[1])
noise = data.std()

peaks = ng.analysis.peakpick.pick(data, pthres=3*noise, est_params=True, cluster=True)

lineshapes = ['pv', 'pv']

params_x = [(x, lw, 0.5) for x, lw in zip(peaks['X_AXIS'], peaks['X_LW'])]
params_y = [(y, lw, 0.5) for y, lw in zip(peaks['Y_AXIS'], peaks['Y_LW'])]
params = [[par_x, par_y] for par_x, par_y in zip(params_x, params_y)]

amps = peaks['VOL']
bounds = [[((None, None), (0.0, None), (0.0, 1.0)), ((None, None), (0.0, None), (0.0, 1.0))] for peak in peaks]
ampbounds = [(None, None) for peak in peaks]
centers = [(x, y) for x, y in zip(peaks['X_AXIS'], peaks['Y_AXIS'])]
rIDs = peaks['cID']

box_width = (np.mean(peaks['X_LW']), np.mean(peaks['Y_LW']))

ng.analysis.linesh.fit_spectrum(data, lineshapes, params, amps, bounds, ampbounds, centers, rIDs, box_width, error_flag=True)

Am I missing something?

Thanks,
Nicola

Files not available

Hello,

This package is very useful! Going through your tutorials and examples, all the links to example files (on googlecode) seem to be broken. Are these hosted elsewhere where I can obtain them from?

Thanks!

GRPDLY and remove_digital_filter

I've been using nmrglue to read Bruker data and even when I use remove_digital_filter, I get a lot of wiggles throughout the spectrum. I don't have this issue when the acqus file has a GRPDLY value above zero.

Looking at the remove_digital_filter code, when GRPDLY is < 0, the DECIM and DSPFSV values are used to find a value in the bruker_dsp_table look up table.

I've found that if I manually set the GRPDLY parameter to the look up table integer value (e.g. table value is 72.75, I set GRPDLY to 72), the resulting spectra looks much better.

I've tested this on the Processing-1D-Bruker-Data example with good results. For the example, there was no GRPDLY, only DSPFSV [12] and DECIM [32]. From the look up table the return value is 72.125. I added a GRPDLY value of 72 to the acqus file and ran the code from the example page: process_and_plot_nmrlgue.py. The only exception was I had to change the phase correction to p0=-50.0,
instead of p0=-88.0.

Here is the spectrum with original settings from the example page:
example_orig

Here is the spectrum using GRPDLY=72:
example_with_grpdly

I'm relatively new to NMR, so I don't know if this approach is valid, all I know is the spectrum looks better.

Is this something that should be changed in nmrglue?

Python 3 compatibility

I'm in the process of migrating an application to Python 3 and there are a few errors in the nmrglue code. Are you planning on Python 3 compatibility and/or would you welcome a fork?

It should be possible to maintain both 2.6/3.0 compatibility in the same source.

Thanks

UnicodeDecodeError when opening up UCSF files

Trying to open up a 3D spectrum (UCSF)

>>> import nmrglue as ng
>>> dic,data = ng.pipe.read("data/HNCO.ucsf")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\kaneo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\nmrglue\fileio\pipe.py", line 525, in read
    dic = fdata2dic(fdata)
  File "C:\Users\kaneo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\nmrglue\fileio\pipe.py", line 1540, in fdata2dic
    dic["FDSRCNAME"] = _unpack_str('16s', fdata[286:290])
  File "C:\Users\kaneo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\nmrglue\fileio\pipe.py", line 1533, in _unpack_str
    return struct.unpack(fmt, d)[0].decode().strip('\x00')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc8 in position 0: invalid continuation byte

Any ideas how to fix this?

Strip transformed Bruker data is interpreted incorrectly.

If bruker.read_pdata is used to read spectrum that have been striped transformed the unit_conversion object is incorrect (assuming the unit_conversion object(s) are made by calling bruker.guess_udic and fileiobase.uc_from_udic).

The bruker parameters to fix this problem are correctly read by bruker.read_procs_file and are in the dic generated by bruker.read_pdata. There are two parameters for each dimension: STSR and STSI. they can be accessed with dic['procs']['STSR'] and dic['procs']['STSI'] respectively for the first dimension. The other dimensions can be accessed by substituting "procs" with "proc2s", "proc3s" or "proc4s". If the data is not strip transformed STSI is 0 and STSR is equal to the length for the data array in that dimension.

It would be easy-ish to fix this problem with a special case check in the 'unit_conversion` class but the unit_conversion class is not initiated with dic but rather udic. It seams silly to modify the definition of a udic for this special case. One could also 'spoof' the acquisition parameters i.e. return a modified sweep width if STSI or STSR is set but these seams like a bad idea.

The fix for the problem right now is to not strip transform the data, i.e. in TopSpin set STSR and STSI to 0.

If you are wondering why you would want use strip transformed data: On older spectrometers with analog filters it is common to collect a much (!) larger spectrum width in the direct dimension then necessary. It saves space and time to only FT and plot some of the data.

Discrepancies between make_uc functions in pipe.py and pipe_proc.py

Hello,
Currently ng.pipe.make_uc() always centers the carrier, while ng.pipe_proc.make_uc() never does. Is there a specific reason for this?

Also, since carrier centering is needed only when nmrPipe EXT function is performed, centering should be performed only in that case. Maybe by adding:

if dic[fn + "X1"]  != 0. or dic[fn + "XN"]  != 0.:
    car = car + sw / size * (dic[fn + "CENTER"] - 1. - size / 2.)

In pipe.py also, I noticed that guess_udic function swaps the sizes of the dimensions in 2D spectra if the FDDIMORDER is not in ascending order. Looking at the code, it seems that changing udic[i]["size"] = data.shape[i] to udic[i]["size"] = data.shape[(data.ndim - 1) - i] solves it. But I don't fully understand this part of the code.

Thanks as always.
Ahmed.

Set up readthedocs?

Because we have sphinx documentation, it could be nice to set up an online version via readthedocs. I think that could help increase usage.

I've done this with several packages now and have been generally happy with what you get for a minimal time investment. I'm happy to answer any questions / help with this.

Scaling of data using bruker.read_pdata

I have noticed that when I read in a spectrum using bruker.read_pdata the resulting spectrum has a different scaling compared to the raw data viewed in Topspin (or imported into matlab)

I'm on version 0.5-dev.

Two spectra imported with bruker.read_pdata
image

Raw data viewed in Topspin
image

notice the different scale for the peak (ca 100k in topspin) and >200k when imported with nmrglue.

code:
for i,j in enumerate(expno):

pathEnd='/%d/pdata/%d' % (j,1)
pathFinal=path+pathEnd
dic, data = ng.bruker.read_pdata(pathFinal)
SF=dic['procs']['SF']
SW_p=dic['procs']['SW_p']
SI=dic['procs']['SI']
OFFSET=dic['procs']['OFFSET']
ppm_scale=np.linspace(OFFSET,OFFSET-SW_p/SF,SI)
length = data.shape[0]

## Read data into array
if i==0:
    spec = np.empty(shape=(length,np.size(expno)))
    ax = np.empty(shape=(length,np.size(expno)))
spec[:,i]=data
ax[:,i]=ppm_scale

read function in bruker.py -- floats in shape shows depreciation warning

Hello,
Since I am yet to learn git ill post this here. I get the following warning when reading a bruker 1d dataset.

nmrglue/fileio/bruker.py:1170: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  return dic, data.reshape(shape)

This is fixed by converting to ints (like in guess_shape) after division.

bruker.py:360

before

gshape = tuple(t)

after

gshape = tuple([int(flt) for flt in t])

nmrglue V0.6 Bruker fails to read

I'm trying to read in a bruker folder ng.bruker.read(filename) but keep getting the error:
" dic,data = ng.bruker.read(filename)
File "C:\Users\username\AppData\Local\Programs\Python\Python36-32\lib\site-packages\nmrglue\fileio\bruker.py", line 327, in read
null, data = read_binary(f, shape=shape, cplex=cplex, big=big)
File "C:\Users\username\AppData\Local\Programs\Python\Python36-32\lib\site-packages\nmrglue\fileio\bruker.py", line 996, in read_binary
return dic, data.reshape(shape)
TypeError: 'float' object cannot be interpreted as an integer "

But using ng.bruker.read_lowmem(filename) to read the folder works just fine.

TOPSPIN 4 Incompatible to read processed files

Bruker has recently updated there processed file format so when you try to use nmr glue to read a processed file it reds incorrectly the 2rr, and 1r files. I am not sure what changes in the new topspin.

Bruker ppm calculation (unit conversion)

It doesn't look like the unit conversion is supported on Bruker format fids, is this correct? When I attempt to use it I get an error that ndims is not in the Bruker dic.

For reference I am able to generate the Bruker ppm scale using the following calculation:

offset = (float(dic['acqus']['SW']) / 2) - (float(dic['acqus']['O1']) / float(dic['acqus']['BF1']))
start = float(dic['acqus']['SW']) - offset
end = -offset
step = float(dic['acqus']['SW']) / zero_fill_size

ppms = np.arange(start, end, -step)[:zero_fill_size]

Where zero_fill_size is the size of the spectra.

Autophase not found?

Hello,

Perhaps it has been resolved, although I have not found where or how, but the autophase command that according to the docs should have been under ng.proc_autophase.autops does not exist. Has it been moved, disabled, or otherwise abandoned for better options?

bruker spectra show repetetive funny peaks

Hello,

I experienced a funny bug, when spectra where large. I saw funny repetetive peaks.
It can be solved, when line 906 in burker.py is changed. Here, the (submatrices) reordering function is applied twice.

by the way, I'm a big fan of nmrglue ;)

Sorry, it might be line 1080 instead.

Bruker ppm scale slightly shifted

I noticed that when I process the same data the same way with Bruker TopSpin and with nmrglue the frequency scale is slightly shifted (by 1.5 points). I understand the reason for that and could easily fix this in the code. But there is the issue whether to fix only add_axis_to_udic in bruker or to fix also the unit_conversion class since this is connected to the issue of how the carrier frequency car is defined.
Let's consider even sized data first. The way nmrglue treats car is to define it as the position of the zero-frequency component (the first point) of the FFT output. The way Bruker parameters are used to create a unit_conversion object implies that the difference SFO1-SF is the same as car. But in contrast to nmrglue, Bruker TopSpin defines it not as the position of the first FFT point but as the lower edge of the spectral window which is shifted by half a frequency step lower. On top of that, the way TopSpin and numpy shift FFT arrays is different since TopSpin shifts the first point of the FFT output to the index size/2-1 while np.fft.fftshift shifts it to the index size/2. This leads to the fact that the frequency scale by itsself is shifted by 0.5 frequency steps and (because the shifted FFT data are displaced by 1 index) the frequency value for same FFT data point (e.g. a peak) is shifted by 1.5 frequency steps between TopSpin and nmrglue.
Can anyone else confirm this issue and the explanation? And can anyone answer whether data from other software packages (e.g. NMRPipe) have the same issue? It would help to decide how is the best way to fix it.

np.round after cast to int?

I think this ought to be np.round(np.array(centers)).astype('int')

bcenters = np.round(np.array(centers).astype('int'))

[4] seems to be as intended. [5] does not

In [3]: centers = np.linspace(0, 1, 10)

In [4]: np.round(np.array(centers)).astype('int')
Out[4]: array([0, 0, 0, 0, 0, 1, 1, 1, 1, 1])

In [5]: np.round(np.array(centers).astype('int'))
Out[5]: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 1])

Reading bruker fid file TypeError

When I tried to read raw fid file I got this weird type error


TypeError Traceback (most recent call last)
in
----> 1 dic,data = ng.bruker.read(dir='./Lee_NMR/S_20190122_00439/1/', bin_file='fid')

c:\users\zwqy\appdata\local\programs\python\python38\lib\site-packages\nmrglue\fileio\bruker.py in read(dir, bin_file, acqus_files, pprog_file, shape, cplex, big, read_pulseprogram, read_acqus)
325 standard files.
326 read_procs : bool, optional
--> 327 True to read procs files(s), False prevents reading.
328
329 Returns

c:\users\zwqy\appdata\local\programs\python\python38\lib\site-packages\nmrglue\fileio\bruker.py in read_binary(filename, shape, cplex, big)
994
995 # extract data type from dictionary
--> 996 try:
997 dtypa = int(dic["acqus"]["DTYPA"])
998 except KeyError:

TypeError: 'float' object cannot be interpreted as an integer

No clue what's going on here

question re proc_lp.lp_1d

I've got something very similar to a 1-D FID in a numpy float32 array, and I was trying to use the proc_lp.lp_1d function to perform a forward linear prediction on the data. When I run the function, I get the following error attached in the image. As you can see, I also tried casting the array to a 'complex64' and that didn't fix the problem either. How do I get around this error?
image

Using peak picking with PPM scale

Please allow me to start off with an apology. As there isn't a "subreddit" like place that I can post general questions, which I am mostly used to. I seem to be having an issue with getting the peak picking function to behave in the PPM Scale.

My code currently reads as:

dic, data = ng.bruker.read_pdata('..../1/pdata/1/')

sw =6395.862
obs = 400.1324
car= 2400.78

uc = ng.fileiobase.unit_conversion(data.size,True,sw,obs,car)
frq = uc.ppm_scale()

# Peak Picking
peaks = ng.peakpick.pick(data,28000)# Currently, works when everything is in Hz. 
npeaks = len(peaks) 

#Attempts at converting the peak list? (i have no idea if this is the correct way to go about it.)
#uc2 = ng.fileiobase.unit_conversion(peaks.size,True,sw,obs,car)
#pkfrq = uc2.ppm_scale()

# plot
fig = plt.figure(figsize=(20,10))
ax = fig.add_subplot(111)

ax.plot(frq,data, 'k-')
ax.invert_xaxis() #This makes it read like a standard spectra
ax.plot(peaks['X_AXIS'],data[peaks['X_AXIS'].astype('int')], 'ro') #This plots the picked peaks on the spectra
ax.axhline(y=28000, color='k', ls='--')#This shows the cutoff for the peak picking
ax.set_xlabel('PPM')

plt.show()

When I do this, I get:

figure_1

However, when I actually attempt the section of code for
`uc2 = ng.fileiobase.unit_conversion(data.size,True,sw,obs,car)

pkfrq = uc2.ppm_scale()`

And change:
ax.plot(pkfrq,peaks['X_AXIS'],pkfrq,data[peaks['X_AXIS'].astype('int')], 'ro')

I get
figure_2

Any tips as to what I seem to be missing here? <cmd+s>My initial thoughts are that it is incorrectly scaling the peak list that it is generating. I thought it might be because the overall size is only set to scale the length of the farthest peak, which is less than the collected Hz. This would explain why it seems to be "skewed" in relation to the actual positioning of the peaks. So, as a remedy I attempted to change the "pkfrq" to the "frq" conversion factor that seemed to work to plot the spectrum. However, I keep getting errors saying x and y must have same first dimension. How is it that this conversion works with with plotting the spectra, but not the picked peaks?

Any advice would be greatly appreciated. I seem to be uncovering a thousand questions as I go along with this, but I am getting closer to being able to automate. Perhaps I am overcomplicating things.

As a help, perhaps someone could supplement the Bruker processing codes that are used in examples? I've been trying to put together small elements that are scattered through all the examples, and have conquered may of my initial issues.

Edit

After struggling through this all day, I've discovered a few things that I think have pointed me in the correct direction, but I still have not resolved it. For one, I now know that I cannot scale the picked peaks the same way that I scaled the data. Because the data is originally plotted by "collection points" or "size" of the spectrum, and not by Hz or ppm, this is why the uc function is needed for the data. Before, I wasn't sure what it was using as an X axis before using the uc.

However, I have not been able to get the peaks plotted onto the ppm spectrum, or (in my case) more importantly, convert the resulting peak list into ppm. Although I have successfully converted it to a pandas dataframe for easy reading.

Processing 1D Bruker Data, example not working.

Hi,

When I try to run the example from http://nmrglue.readthedocs.io/en/latest/examples/proc_bruker_1d.html, it get the following error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-1-3cf04936a564> in <module>()
      4 
      5 # read in the bruker formatted data
----> 6 dic, data = ng.bruker.read('expnmr_00001_1')
      7 
      8 # remove the digital filter

~/miniconda3/lib/python3.6/site-packages/nmrglue/fileio/bruker.py in read(dir, bin_file, acqus_files, 
pprog_file, shape, cplex, big, read_pulseprogram, read_acqus)
    325     # read the binary file
    326     f = os.path.join(dir, bin_file)
--> 327     null, data = read_binary(f, shape=shape, cplex=cplex, big=big)
    328     return dic, data
    329 

~/miniconda3/lib/python3.6/site-packages/nmrglue/fileio/bruker.py in read_binary(filename, shape, 
cplex, big)
    994     # reshape if possible
    995     try:
--> 996         return dic, data.reshape(shape)
   997 
   998     except ValueError:

TypeError: 'float' object cannot be interpreted as an integer

I installed nmrglue through conda by: conda install -c bioconda nmrglue and I am using Python3.6.

Calculate PPM values using reference frequency when available.

Currently nmrglue's unit_conversion object calculates ppm values using the observational/operating frequency, spectral width, and carrier frequency. The correct method for calculating PPM values uses the frequency of a reference compound. An option to provide this value (or extract it from file dictionaries when available) and use it in PPM calculation should be added to the unit_conversion object.

Don't use a magic `0.6` in `proc_base.gm`

Although NMRPipe defines it as you have done, the gm window doesn't have to contain a magic number. The 0.6 that appears is actually 1.0 / (2 * sqrt( log(2) ) ) which is numerically 0.60056120....

This appears because the gaussian window (or the gaussian part in the case of gm) is defined such that the bandwidth or 'gaussian broadening', is the full width at half height of the transform of the window.

As defined in your proc_base.gm documentation, we are defining a gaussian window that looks basically like exp(-g**2) with g = a * pi * g2 * t where a is a constant to be determined and t is the time.

We know that the fourier transform of a gaussian
exp(-(q t)**2)
is another gaussian proportional to
exp(-(pi * f / q)**2)

So for our window we expect the transform of the window to be exp(-(pi * f / (a * pi * g2))). Letting f = g2 / 2 (since the full width runs from -g2 to g2) and setting the transform of the window equal to 0.5 gives: 0.5 = exp(-(1/(2 * a))**2). Solving this for a gives a = 1 / (2 * sqrt( log(2) ) ) as I gave above.

It would be nice to include the correct form of this constant in both the documentation and in the code as well as note explaining the how the g2 parameter is defined. AFAIK this is the standard definition of gaussian broadening for NMR, but I'm not sure that I've ever actually seen it documented anywhere.

I suppose exact agreement with NMRPipe might be one of your design goals in which case, I'd still suggest documenting the 0.6 and stating that it is used to match NMRPipe.

I can work up a patch if you'd like.

write 2D Bruker processed data

Hello and thank you for all your work.
I have a problem to save a 2D Bruker processed data file. Here is my code, used under Linux CentOS 7.7 with Python Anaconda 3.7, Spyder 3.3.6 and nmrglue 0.7.
Could you please help me to solve this ?
Thank you by advance.

In [1]: import nmrglue as ng
     ...: ng.__version__
Out[1]: '0.7'
In [2]: data_dir = '2D/1/pdata/1'
     ...: dic, data = ng.bruker.read(data_dir)
     ...: ng.bruker.write_pdata(data_dir, dic, data, overwrite=True)
Traceback (most recent call last):

  File "<ipython-input-17-f7a36b4de334>", line 3, in <module>
    ng.bruker.write_pdata(data_dir, dic, data, overwrite=True)

  File "/opt/anaconda3/lib/python3.7/site-packages/nmrglue/fileio/bruker.py", line 891, in write_pdata
    data = reorder_submatrix(data, shape, submatrix_shape, reverse=True)

  File "/opt/anaconda3/lib/python3.7/site-packages/nmrglue/fileio/bruker.py", line 1462, in reorder_submatrix
    return rdata.reshape(shape)

**ValueError: cannot reshape array of size 0 into shape (64,512)**

Problem with proc_autophase.autops(data, "acme")

Dear Jonathan,

i tried your example for the automatic phase correction algorithms. However the automatic phasing with the acme function

#! /usr/bin/env python

import nmrglue as ng
import matplotlib.pyplot as plt

# read in the bruker formatted data
dic, data = ng.bruker.read('expnmr_00001_1')

# remove the digital filter
data = ng.bruker.remove_digital_filter(dic, data)

# process the spectrum
data = ng.proc_base.zf_size(data, 32768)    # zero fill to 32768 points
data = ng.proc_base.fft(data)               # Fourier transform
data = ng.proc_autophase.autops(data, "acme")      # phase correction

does not work due to the following error message:
Warning: Maximum number of function evaluations has been exceeded.

The peak_minima does work fine. So, regardless of this bug in the acme function: Thanks a lot for this package.

Regards

Jakob

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.