SyneRBI / SIRF-Exercises

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

Jupyterhub: Path to real data in NEMA IQ example #123

Closed paskino closed 3 years ago

paskino commented 3 years ago

In the PET reconstruct real data notebook we rely on the user to run the script convertSiemensInterfileToSTIR.sh to convert the Siemens to a STIR readable interfile file header. Now, on the jupyterhub the cell that is supposed to run that does not work for multiple reasons.

I have therefore pre-run the script and the output is in the same directory of the data (in the read-only filesystem).

There’s a cell which I copied here that sets the paths of the various files.

#%% set filenames 
# input files
list_file = os.path.join(data_path, '20170809_NEMA_60min_UCL.l.hdr')
norm_file = 'norm.n.hdr'
attn_file = 'umap.v.hdr'
# output filename prefixes
sino_file = 'sino'
%ls

This cell is presupposing that the users have run the script themselves and the result is in the current working directory. This is not the case in jupyterhub. So what needs doing is either:

  1. give the full path of norm.n.hdr and umap.v.hdr (which are in the same data_path as the list_file)
  2. copy the files in the current working directory

In either case the notebook requires some modifications. Which is the preferred solution?

I vote for 1.

KrisThielemans commented 3 years ago

1 seems to be fine. It would need to work on the VM etc as well though. I'll be checking this notebook later today (I hope), but please fix it first.

paskino commented 3 years ago

I close this as almost duplicate of #120 Let's continue the conversation there