-
Notifications
You must be signed in to change notification settings - Fork 24
Update reconstruct_measured_data.ipynb for read-only source directory #261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| "!sed -i.bak \"s/\\r\\([^\\n]\\)/\\r\\n\\1/g\" umap.v.hdr\n", | ||
| "# due to https://github.com/UCL/STIR/issues/1601 we copy the data to the working directory which is the same as where the header lives\n", | ||
| "! cp $data_path/20170809_NEMA_UCL.n .\n", | ||
| "#!sed -i.bak \"s/\\r\\([^\\n]\\)/\\r\\n\\1/g\" umap.v.hdr\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why comment this out? It replaces CRLF with LR, which has nothing to do with all the problems you've seen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also could we ln -s in lieu of cp?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be fine on Unix-type. Not sure about other places. This file is small. I wouldn't bother testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paskino I think you wanted to comment out
!sed -i.bak2 -e \"s#\\(!name of data file:=\\)#\\\\1{data_path}/#\" umap.v.hdr
!sed -i.bak2 -e \"s#\\(!name of data file:=\\)#\\\\1{data_path}/#\" norm.n.hdr
I still need some convincing that this was your problem though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pushed a commit... hopefully fine now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not yet. we need to change the line below:
!sed -i.bak2 -e \"s#\\(!name of data file:=\\)#\\\\1{data_path}/#\" norm.n.hdr
Likely we don't need it all, i.e. there probably is no path in the norm.n.hdr (there isn't in my copy). Otherwise, we will need to remove the path (which is a more complicated regexp).
reconstruc_measured_datadoes not work if the data is not in the working directory #260