SyneRBI / SIRF-Exercises

SIRF Training and demonstration material
http://www.ccpsynerbi.ac.uk
Apache License 2.0
18 stars 21 forks source link

OSEM_reconstruction notebook Error #119

Closed paskino closed 3 years ago

paskino commented 3 years ago

I run the notebook and found

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/opt/SIRF-SuperBuild/INSTALL/python/sirf/STIR.py in show(self, sino, tof, title)
    994             try:
--> 995                 ns = len(sino)
    996             except:

TypeError: object of type 'numpy.int64' has no len()

During handling of the above exception, another exception occurred:

error                                     Traceback (most recent call last)
<ipython-input-9-18aa0e18dc5e> in <module>
      1 #%% Display bitmaps of a middle sinogram
----> 2 acquired_data.show(im_slice,title='Forward projection')

/opt/SIRF-SuperBuild/INSTALL/python/sirf/STIR.py in show(self, sino, tof, title)
    995                 ns = len(sino)
    996             except:
--> 997                 raise error('wrong sinograms list')
    998         if title is None:
    999             title = 'Selected sinograms'

error: ??? 'wrong sinograms list'
KrisThielemans commented 3 years ago

should have been fixed with https://github.com/SyneRBI/SIRF/pull/964. SIRF a bit too old?

paskino commented 3 years ago

git log in SIRF source reports

commit 4f9f55b791f8e4b3800018131631698495db4127 (HEAD, tag: v3.1.0-rc.1)
Author: Evgueni Ovtchinnikov <evgueni.ovtchinnikov@stfc.ac.uk>
Date:   Fri Jun 18 16:41:23 2021 +0100

    [ci skip] updated User and Developer guides

from sirf import __version__
print (__version__)
>>> 3.1.0
paskino commented 3 years ago

The error message is totally unclear, it should state what expected and what received.

KrisThielemans commented 3 years ago

yes, which is why I fixed it after SIRF 3.1.0-rc.1.

paskino commented 3 years ago

I just checked what is installed and it is indeed not what it should be according to git log.

paskino commented 3 years ago

Oh yes. The tagged commit is too old. I'll add the newest tag to the SuperBuild or tag with rc-2?

KrisThielemans commented 3 years ago

newest hash. There's 2 (even more problematic) issues in SIRF sadly.

paskino commented 3 years ago

I close this as bug is fixed in current SIRF master.