Skip to content

Commit

Permalink
pipe_proc.py tp function correctly sets FDSIZE.
Browse files Browse the repository at this point in the history
Fixes issue #27
  • Loading branch information
jjhelmus committed Mar 4, 2015
1 parent 923f484 commit ba1eee9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions nmrglue/process/pipe_proc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1527,13 +1527,16 @@ def tp(dic, data, hyper=False, nohyper=False, auto=False, nohdr=False):
data = np.array(p.tp_hyper(data), dtype="complex64")
else:
data = p.tp(data)
if dic[fn2 + "QUADFLAG"] != 1 and nohyper is not True:
if dic[fn2 + "QUADFLAG"] != 1 and nohyper is False:
# unpack complex as needed
data = np.array(p.c2ri(data), dtype="complex64")

# update the dimentionality and order
dic["FDSLICECOUNT"] = data.shape[0]
if data.dtype == 'float32':
if (data.dtype == 'float32') and (nohyper is True):
# when nohyper is True and the new last dimension was complex
# prior to transposing then FDSIZE is set as if the dimension was
# converted to complex data, that is half the actual size.
dic["FDSIZE"] = data.shape[1] / 2
else:
dic["FDSIZE"] = data.shape[1]
Expand Down

0 comments on commit ba1eee9

Please sign in to comment.