closes #370
fix functionality of pet interactive examples
renamed files to clarify the order they should be run
uses iterno instead of iter
uses sliceno instead of slice
https://github.com/CCPPETMR/SIRF/pull/374
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
Still standing issue: running the whole script in spyder doesn't run the whole script.
Running the script cell-by-cell works.
Merging #374 into master will not change coverage.
The diff coverage isn/a
.
@@ Coverage Diff @@ ## master #374 +/- ## ======================================= Coverage 50.05% 50.05% ======================================= Files 2 2 Lines 1720 1720 ======================================= Hits 861 861 Misses 859 859
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 8bc66d1...b99be96. Read the comment docs.
any comments?
@evgueni-ovtchinnikov commented on this pull request.
i understand you commented out help()
to be able to run the whole script?
i would rather put a warning somewhere at the beginning "comment out help() to run the whole script"
(after all, these scripts were designed to run interactively one chunk at a time)
minor remark: our style conventions require slice_num
rather than sliceno
(cf. our developers guide)
@KrisThielemans requested changes on this pull request.
I have the same comments as @evgueni-ovtchinnikov
sliceno
to slice_num
etchelp
?In examples/Python/PET/interactive/01-display_and_projection.py:
> @@ -198,5 +198,5 @@ def make_cylindrical_FOV(image): #%% close all plots plt.close('all') - +print ("here")
delete
In examples/Python/PET/interactive/03-basic_reconstruction.py:
> @@ -69,13 +69,14 @@ #%% display of image reconstructed_array=reconstructed_image.as_array() -slice=reconstructed_array.shape[0]//3; -show_2D_array('reconstructed image after 5 sub-iterations',reconstructed_array[slice,:,:,]); +# slice=reconstructed_array.shape[0]//3; +sliceno = 9
I'd prefer to have it in terms of the shape
somehow, but fine to leave if that's too hard
one other thing: you didn't update the README...
@paskino commented on this pull request.
In examples/Python/PET/interactive/03-basic_reconstruction.py:
> @@ -69,13 +69,14 @@ #%% display of image reconstructed_array=reconstructed_image.as_array() -slice=reconstructed_array.shape[0]//3; -show_2D_array('reconstructed image after 5 sub-iterations',reconstructed_array[slice,:,:,]); +# slice=reconstructed_array.shape[0]//3; +sliceno = 9
I have the same comments as @evgueni-ovtchinnikov
- rename
sliceno
toslice_num
etc
OK
- why remove
help
?
I removed help
thinking that it may fix the problem that that was the reason spyder wouldn't run the whole script correctly. As that is not the case I'll put it back. However, the problem of spyder reaching the end without running correctly still remains.
According to the README the scripts should be run cell-by-cell.
Merged #374 into master.