Gentoo Archives: gentoo-commits

From: "Justin Lecher (jlec)" <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-chemistry/nmrglue/files: nmrglue-0.5-nohyper.patch
Date: Wed, 04 Mar 2015 08:17:20
Message-Id: 20150304081714.BAE1C13025@oystercatcher.gentoo.org
1 jlec 15/03/04 08:17:14
2
3 Added: nmrglue-0.5-nohyper.patch
4 Log:
5 Backport fix for agilent data conversion
6
7 (Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)
8
9 Revision Changes Path
10 1.1 sci-chemistry/nmrglue/files/nmrglue-0.5-nohyper.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/nmrglue/files/nmrglue-0.5-nohyper.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/nmrglue/files/nmrglue-0.5-nohyper.patch?rev=1.1&content-type=text/plain
14
15 Index: nmrglue-0.5-nohyper.patch
16 ===================================================================
17 From ba1eee9e71623110511545c058afe2a92e139aa5 Mon Sep 17 00:00:00 2001
18 From: Jonathan Helmus <jjhelmus@×××××.com>
19 Date: Tue, 3 Mar 2015 19:47:05 -0600
20 Subject: [PATCH] pipe_proc.py tp function correctly sets FDSIZE.
21
22 Fixes issue #27
23 ---
24 nmrglue/process/pipe_proc.py | 7 +++++--
25 1 file changed, 5 insertions(+), 2 deletions(-)
26
27 diff --git a/nmrglue/process/pipe_proc.py b/nmrglue/process/pipe_proc.py
28 index 79b6303..8c1271c 100644
29 --- a/nmrglue/process/pipe_proc.py
30 +++ b/nmrglue/process/pipe_proc.py
31 @@ -1527,13 +1527,16 @@ def tp(dic, data, hyper=False, nohyper=False, auto=False, nohdr=False):
32 data = np.array(p.tp_hyper(data), dtype="complex64")
33 else:
34 data = p.tp(data)
35 - if dic[fn2 + "QUADFLAG"] != 1 and nohyper is not True:
36 + if dic[fn2 + "QUADFLAG"] != 1 and nohyper is False:
37 # unpack complex as needed
38 data = np.array(p.c2ri(data), dtype="complex64")
39
40 # update the dimentionality and order
41 dic["FDSLICECOUNT"] = data.shape[0]
42 - if data.dtype == 'float32':
43 + if (data.dtype == 'float32') and (nohyper is True):
44 + # when nohyper is True and the new last dimension was complex
45 + # prior to transposing then FDSIZE is set as if the dimension was
46 + # converted to complex data, that is half the actual size.
47 dic["FDSIZE"] = data.shape[1] / 2
48 else:
49 dic["FDSIZE"] = data.shape[1]