https://github.com/SyneRBI/SIRF-Exercises/pull/261
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@KrisThielemans commented on this pull request.
In notebooks/PET/reconstruct_measured_data.ipynb:
> "\n",
"# These files will sometimes have lines terminated with CR instead of CRLF, fix this\n",
"# This just means, if we see CR<character> and <character> isn't LF, replace it with CRLF<character>\n",
"!sed -i.bak \"s/\\r\\([^\\n]\\)/\\r\\n\\1/g\" norm.n.hdr\n",
- "!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",
why comment this out? It replaces CRLF with LR, which has nothing to do with all the problems you've seen.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@casperdcl commented on this pull request.
In notebooks/PET/reconstruct_measured_data.ipynb:
> "\n",
"# These files will sometimes have lines terminated with CR instead of CRLF, fix this\n",
"# This just means, if we see CR<character> and <character> isn't LF, replace it with CRLF<character>\n",
"!sed -i.bak \"s/\\r\\([^\\n]\\)/\\r\\n\\1/g\" norm.n.hdr\n",
- "!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",
also could we ln -s in lieu of cp?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@KrisThielemans commented on this pull request.
In notebooks/PET/reconstruct_measured_data.ipynb:
> "\n",
"# These files will sometimes have lines terminated with CR instead of CRLF, fix this\n",
"# This just means, if we see CR<character> and <character> isn't LF, replace it with CRLF<character>\n",
"!sed -i.bak \"s/\\r\\([^\\n]\\)/\\r\\n\\1/g\" norm.n.hdr\n",
- "!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",
would be fine on Unix-type. Not sure about other places. This file is small. I wouldn't bother testing.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@KrisThielemans commented on this pull request.
In notebooks/PET/reconstruct_measured_data.ipynb:
> "\n",
"# These files will sometimes have lines terminated with CR instead of CRLF, fix this\n",
"# This just means, if we see CR<character> and <character> isn't LF, replace it with CRLF<character>\n",
"!sed -i.bak \"s/\\r\\([^\\n]\\)/\\r\\n\\1/g\" norm.n.hdr\n",
- "!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",
@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.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@casperdcl pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@casperdcl commented on this pull request.
In notebooks/PET/reconstruct_measured_data.ipynb:
> "\n",
"# These files will sometimes have lines terminated with CR instead of CRLF, fix this\n",
"# This just means, if we see CR<character> and <character> isn't LF, replace it with CRLF<character>\n",
"!sed -i.bak \"s/\\r\\([^\\n]\\)/\\r\\n\\1/g\" norm.n.hdr\n",
- "!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",
pushed a commit... hopefully fine now.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@KrisThielemans commented on this pull request.
In notebooks/PET/reconstruct_measured_data.ipynb:
> "\n",
"# These files will sometimes have lines terminated with CR instead of CRLF, fix this\n",
"# This just means, if we see CR<character> and <character> isn't LF, replace it with CRLF<character>\n",
"!sed -i.bak \"s/\\r\\([^\\n]\\)/\\r\\n\\1/g\" norm.n.hdr\n",
- "!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",
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).
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@KrisThielemans approved this pull request.
These changes shouldn't be necessary with latest STIR, but I'll merge it anyway for older installations.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()