SyneRBI / SIRF

Main repository for the CCP SynerBI software
http://www.ccpsynerbi.ac.uk
Other
58 stars 29 forks source link

"set_keep_views_in_cache(True)" for SPECTUBMatrix results in zero image on reconstruction #1136

Open samdporter opened 1 year ago

samdporter commented 1 year ago

https://github.com/SyneRBI/SIRF/blob/9ef5044e8d939e27290f0876205f041cbdc60460/src/xSTIR/pSTIR/STIR.py#L830

Keep_all_views_in_cache = True results in zero image after reconstruction.

SPECTUBMatrix.set_up() is not exposed in SIRF. Could this be the issue?

See https://github.com/samdporter/SPECTissues/blob/main/minimal.py for demonstration.

Change "keep_views_in_cache" variable to True

evgueni-ovtchinnikov commented 1 year ago

@samdporter I have tried to run your demo script, and found that it silently crashes at the line

am.set_up(templ_sino, im)

with any value of keep_views_in_cache because of the weird silent crash in STIR's inline function ProjDataInfoCylindrical::get_azimuthal_angle_sampling().

I am using recent STIR commit 3b85e01cb2c66c0ec328fe708bfba1c42fe5afc5.

evgueni-ovtchinnikov commented 1 year ago

@samdporter @KrisThielemans on VM 3.3.0, calling ProjDataInfoCylindrical::get_azimuthal_angle_sampling() causes segfault, again no matter what value keep_views_in_cache has.

KrisThielemans commented 1 year ago

All very weird, especially as I don't have that on my VM (but it isn't 3.3.0...). Can you record here what you did?

evgueni-ovtchinnikov commented 1 year ago

@KrisThielemans I just put debug printing before and after get_azimuthal_angle_sampling() call in ProjMatrixByBinSPECTUB:: set_up and ran the same Python script as we did this morning

KrisThielemans commented 1 year ago