[CCPPETMR/SIRF] Fix PET interactive scripts (#374)

0 views
Skip to first unread message

Edoardo Pasca

unread,
Apr 29, 2019, 7:13:51 AM4/29/19
to CCPPETMR/SIRF, Subscribed

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


You can view, comment on, or merge this pull request online at:

  https://github.com/CCPPETMR/SIRF/pull/374

Commit Summary

  • closes #370

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Edoardo Pasca

unread,
Apr 29, 2019, 7:15:06 AM4/29/19
to CCPPETMR/SIRF, Subscribed

Still standing issue: running the whole script in spyder doesn't run the whole script.
Running the script cell-by-cell works.

codecov[bot]

unread,
Apr 29, 2019, 7:48:15 AM4/29/19
to CCPPETMR/SIRF, Subscribed

Codecov Report

Merging #374 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Edoardo Pasca

unread,
Apr 30, 2019, 10:12:13 AM4/30/19
to CCPPETMR/SIRF, Subscribed

any comments?

evgueni-ovtchinnikov

unread,
Apr 30, 2019, 12:02:40 PM4/30/19
to CCPPETMR/SIRF, Subscribed

@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)

Kris Thielemans

unread,
May 1, 2019, 6:28:11 AM5/1/19
to CCPPETMR/SIRF, Subscribed

@KrisThielemans requested changes on this pull request.

I have the same comments as @evgueni-ovtchinnikov

  • rename sliceno to slice_num etc
  • why remove help?

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

Kris Thielemans

unread,
May 1, 2019, 6:31:00 AM5/1/19
to CCPPETMR/SIRF, Subscribed

one other thing: you didn't update the README...

Edoardo Pasca

unread,
May 1, 2019, 11:34:53 AM5/1/19
to CCPPETMR/SIRF, Subscribed

@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 to slice_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.

Edoardo Pasca

unread,
May 1, 2019, 11:40:47 AM5/1/19
to CCPPETMR/SIRF, Push

@paskino pushed 1 commit.

  • e034396 change sliceno and reinstates help


You are receiving this because you are subscribed to this thread.

View it on GitHub or mute the thread.

Edoardo Pasca

unread,
May 1, 2019, 11:43:30 AM5/1/19
to CCPPETMR/SIRF, Push

@paskino pushed 1 commit.

  • fc56120 removed iterno and sliceno


You are receiving this because you are subscribed to this thread.

View it on GitHub or mute the thread.

Edoardo Pasca

unread,
May 1, 2019, 11:48:58 AM5/1/19
to CCPPETMR/SIRF, Push

@paskino pushed 1 commit.


You are receiving this because you are subscribed to this thread.

View it on GitHub or mute the thread.

Edoardo Pasca

unread,
May 1, 2019, 11:50:32 AM5/1/19
to CCPPETMR/SIRF, Subscribed

According to the README the scripts should be run cell-by-cell.

Edoardo Pasca

unread,
May 1, 2019, 11:51:00 AM5/1/19
to CCPPETMR/SIRF, Subscribed

Merged #374 into master.

Reply all
Reply to author
Forward
0 new messages