Closed firasm closed 11 years ago
AHA! found the bug....
something to do with the way LL scans store things in VisuFGElemComment
visu_pars1.VisuFGElemComment ## This is the LL visu_pars
Out[30]:
frame 1> <frame 2> <frame 3> <frame 4> <frame 5> <frame 6> <frame 7> <frame 8
> <frame 9> <frame 10> <frame 11> <frame 12> <frame 13> <frame 14> <frame 15>
<frame 16> <frame 17> <frame 18> <frame 19> <frame 20> <frame 21> <frame 22>
< frame 23> <frame 24> <frame 25
visu_pars.VisuFGElemComment ## This is a regular DCE scan
Traceback (most recent call last):
File "<ipython-input-31-6948b0b331e7>", line 1, in <module>
visu_pars.VisuFGElemComment
AttributeError: 'JCAMP_file' object has no attribute 'VisuFGElemComment'
further debugging:
ipdb> dimcomment ['', '', '', ['frame 1', 'frame 2', 'frame 3', 'frame 4', 'frame 5', 'frame 6', 'frame 7', 'frame 8 ', 'frame 9', 'frame 10', 'frame 11', 'frame 12', 'frame 13', 'frame 14', 'frame 15> <frame 16', 'frame 17', 'frame 18', 'frame 19', 'frame 20', 'frame 21', 'frame 22', ' frame 23', 'frame 24', 'frame 25']]
ipdb> numpy.array(dimcomment)[swp_axis] *\ ValueError: cannot set an array element with a sequence
ipdb> dimcomment ['', '', '']
ipdb> numpy.array(dimcomment)[swp_axis] array(['', '', ''], dtype='|S1')
So, the swapping is innocuous when the list is empty but fatal when the list is populated with frames.
P.S. I think this bug exists because i am passing in an adata file (T1 parameter map) that doesn't match with its corresponding pdata's visa_pars file due to visu_pars.VisuFGElemComment
Let me know how I should override this header for the adata
debugging and updating live
The returned error is:
Error can be produced by executing this code: