-
Notifications
You must be signed in to change notification settings - Fork 12
How To - TiffStackReader, custom Geometry, Normaliser #199
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: main
Are you sure you want to change the base?
Conversation
… and flat/dark field Normaliser
|
Potential issue: TIFFStackReader.ipynb downloads the sandstone dataset to its directory (how-tos/1_Read_and_visualise), CreateCustomGeometry.ipynb uses the already-downloaded dataset, but file path was not updated in the notebook. Where should this dataset be downloaded to in this repo, so I can adjust the file path variables accordingly? |
hrobarts
left a comment
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.
Hi Mariam, these are looking really great - I think they're all very clear. I couldn't add comments on the code for the TIFFStackReader and FlatDarkFieldNormaliser so putting some here:
- In the TIFFStackReader you could say it accepts .tiff and ,tif files
- In the FlatDarkFieldNormaliser you could use show2D([sandstone, sandstone_norm]) to show the plots next to each other, you could add titles as well. Maybe the same for the flat and dark plots
- I think the %store looks like a good way to get the previously processed data but we should discuss how that would work if we're going to use GHA to render these
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.
I think this simple geometry example will be really useful for people. I wonder if we should have a separate 2D cone beam, 2D parallel beam, 3D cone beam and 3D parallel beam example?
… into how_to_tiff Updating local
|
Hi @M-A-Demir, thanks for your hard work on this! I think all the code is there but there are some places where we could improve the explanations.
I will leave a few more specific comments in the notebooks |
| "cell_type": "markdown", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "The `AcquisitionGeometry` and loaded data are needed to use CIL's visualisation and reconstruction tools. \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.
Not sure this sentence makes sense
| "cell_type": "markdown", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "Using `show2D()`, we can view a central projection of the data:" |
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.
Might also be worth showing an FBP reconstruction, to demonstrate that the geometry is correct and thus gives a reasonable reconstruction.
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.
Thanks Margaret! I added the clarifications you suggested, as well as the reconstruction (& CoR adjustment) to the geometry notebook
…oks. Added extra section for reconstructing and adjusting CoR in Geometry notebook
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.
Sorry Mariam, I made a few suggested changes and then between vscode and github they all got deleted. Will try again another time
MargaretDuff
left a comment
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.
Thanks @M-A-Demir. The code is all there. I have made some suggestions to improve the readability!
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [ | ||
| "%store sandstone" |
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.
What does this do? Generally users will take notebooks verbatim and try and adapt them to their dataset so if this is a cell particular to the how-tos and a not general CIL recommendation then we should state that.
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [ | ||
| "%store -r sandstone\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.
Does this mean you have to run the previous how-to first. This needs to be made clear if so!
Co-authored-by: Margaret Duff <43645617+MargaretDuff@users.noreply.github.com>
Co-authored-by: Margaret Duff <43645617+MargaretDuff@users.noreply.github.com>
Co-authored-by: Margaret Duff <43645617+MargaretDuff@users.noreply.github.com>
Co-authored-by: Margaret Duff <43645617+MargaretDuff@users.noreply.github.com>
Co-authored-by: Margaret Duff <43645617+MargaretDuff@users.noreply.github.com>
Co-authored-by: Margaret Duff <43645617+MargaretDuff@users.noreply.github.com>
Co-authored-by: Margaret Duff <43645617+MargaretDuff@users.noreply.github.com>
… into how_to_tiff
Co-authored-by: Margaret Duff <43645617+MargaretDuff@users.noreply.github.com>
Co-authored-by: Margaret Duff <43645617+MargaretDuff@users.noreply.github.com>
Co-authored-by: Margaret Duff <43645617+MargaretDuff@users.noreply.github.com>
Co-authored-by: Margaret Duff <43645617+MargaretDuff@users.noreply.github.com>
Co-authored-by: Margaret Duff <43645617+MargaretDuff@users.noreply.github.com>
|
Hi Mariam, these are all looking great. I'd be happy to go ahead and merge the TiffStackReader and Normaliser notebooks. I think we should add a simulated example to the Normaliser in future but this works well as a real example. |
MargaretDuff
left a comment
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.
Looking good @M-A-Demir, have left a few style comments
| "# %store -r sandstone\n", | ||
| "# show2D(sandstone)" |
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.
Are these meant to be commented out?
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.
Yes, I have added clarification to the comment above this cell that these should be uncommented if you run and save data from the Geometry notebook
| "cell_type": "markdown", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "The `%store -r sandstone` command allows us to use the `sandstone` `AcquisitionData` we saved in the `1_Read_and_visualise/TIFFStackReader.ipynb` notebook. Please run the TIFFStackReader notebook (without deleting the `data/sandstone` folder), and save the `sandstone` variable before running the cell below." |
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.
| "The `%store -r sandstone` command allows us to use the `sandstone` `AcquisitionData` we saved in the `1_Read_and_visualise/TIFFStackReader.ipynb` notebook. Please run the TIFFStackReader notebook (without deleting the `data/sandstone` folder), and save the `sandstone` variable before running the cell below." | |
| "Note: The `%store -r sandstone` command allows us to use the `sandstone` `AcquisitionData` we saved in the `1_Read_and_visualise/TIFFStackReader.ipynb` notebook. Please run the TIFFStackReader notebook (without deleting the `data/sandstone` folder), and save the `sandstone` variable before running the cell below." |
Co-authored-by: Margaret Duff <43645617+MargaretDuff@users.noreply.github.com>
Co-authored-by: Margaret Duff <43645617+MargaretDuff@users.noreply.github.com>
Added clarification on commented %store line
Formatting in changed print statements caused notebook failure to load
Added TiffStackReader.ipynb how-to to the '1_Read_and_visualise' folder.
Added 2_Geometry/CreateCustomGeometry.ipynb
Added 3_Processors/FlatDarkFieldNormaliser.ipynb
Closes #170
Closes #173