SyneRBI / SIRF-Exercises

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

a_fully_sampled #98

Closed DANAJK closed 3 years ago

DANAJK commented 3 years ago

1) Spelling mistake in first cell, 'k-psace' should be 'k-space'.

2) Instructions about starting the gadgetron should say that if you are using Jupyter from a Docker service container, gadgetron is already running in the background and does not need starting.

3) I get the following error:

RuntimeErrorTraceback (most recent call last)
<ipython-input-6-69d70de704e1> in <module>
     12 
     13 #%% GO TO MR FOLDER
---> 14 acrphantom_data_path = exercises_data_path('MR', 'PTB_ACRPhantom_GRAPPA')
     15 os.chdir(acrphantom_data_path)
     16 

/devel/SIRF-Exercises/lib/sirf_exercises/__init__.py in exercises_data_path(*data_type)
     31 
     32     if data_path is None or not os.path.exists(data_path):
---> 33         raise RuntimeError(
     34             "Exercises data weren't found. Please run download_data.sh in the "
     35             "scripts directory")

RuntimeError: Exercises data weren't found. Please run download_data.sh in the scripts directory

It wasn't obvious what to do. First I opened download_data.sh in Jupyter (it is possible to run bash scripts in Jupyter, but in this case, it didn't seem to have that possibility). Second I opened a terminal from Jupyter and here are some of the commands I ran:

(base) sirf:\w$ pwd
/devel/SIRF-Exercises
/bin/sh: 1: __git_ps1: not found
(base) sirf:\w$ cd scripts
/bin/sh: 1: __git_ps1: not found
(base) sirf:\w$ ls
download_data.sh  download_MR_data_old_notebooks.sh  download_MR_data.sh  download_PET_data.sh
/bin/sh: 1: __git_ps1: not found
(base) sirf:\w$ ./download_data.sh
Destination is "/devel/SIRF-Exercises/data"
Download location is "/devel/SIRF-Exercises/data"
creating data_path.py in /devel/SIRF-Exercises/lib/sirf_exercises/data_path.py
All done!
/bin/sh: 1: __git_ps1: not found

which despite the annoying prompt messages, looks OK. I do see a lib folder with stuff in, but no /devel/SIRF-Exercises/data folder and when I re-run the cell in a_fully_sampled, I get the same error as before.

I see other instructions elsewhere that download_data should have various flags passed, but it's not obvious what to do.

DANAJK commented 3 years ago

To follow up.

I tried running download_data.sh from a terminal on my Mac and still the data didn't seem to appear. So I tried download_MR_data.sh and some data did appear, but not what is needed for this notebook and the script stopped with an error because md5sum isn't on my Mac path.

I found the data on Zenodo here https://zenodo.org/record/2633785/files/PTB_ACRPhantom_GRAPPA.zip, put it in a /devel/data folder and changed the notebook line to: acrphantom_data_path = os.path.join('/devel', 'PTB_ACRPhantom_GRAPPA') and it worked, but then I realised this line is missing the data folder, but turns out a PTB_ACRPhantom_GRAPPA' was in my /devel anyway, which is why it worked.

johannesmayer commented 3 years ago

Thanks for pointing out this stuff I will correct it ... Regarding the data you have to apparently run the script as bash download_data.sh -m, the -m standing flag for MR. I'll correct that as well in the instructions