nbGui: add ring/pole-figure sinogram plots to pbp_2_visualise - #618
Merged
Conversation
Relates to FABLE-3DXRD#484 (todo: plot polefigures before/after indexing), the top item on the FABLE-3DXRD#594 release checklist (plots from /data/id11/jon/ma6288/pbp_2_visualise.ipynb). Updates the existing pbp_2_visualise.ipynb with cells that: build calculated g-vectors from the best UBI per voxel for a chosen ring, compare calculated vs measured tth/eta/omega, and bin measured peaks by omega/dty per ring to inspect sinogram coverage/pole figures before making the TensorMap. Cell outputs and the embedded widget-state metadata are stripped to keep the diff reviewable.
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
jonwright
commented
Sep 6, 2026
| "\n", | ||
| "# python environment stuff\n", | ||
| "IMAGED11_PATH = None # means do not use git, otherwise \"ImageD11\" or \"ImageD11_version_xx\", etc\n", | ||
| "CHECKOUT_PATH = None # None means guess, or you can specify a folder for the checkout\n", |
Member
Author
There was a problem hiding this comment.
Line #9. dset_path = 'A2050_DN_W340_nscope_5pct_strained_full_slice_dataset.h5'
revert
Reply via ReviewNB
| "\n", | ||
| "# python environment stuff\n", | ||
| "IMAGED11_PATH = None # means do not use git, otherwise \"ImageD11\" or \"ImageD11_version_xx\", etc\n", | ||
| "CHECKOUT_PATH = None # None means guess, or you can specify a folder for the checkout\n", |
Member
Author
There was a problem hiding this comment.
Member
Author
|
To the LLM: this looks like a copy + paste with so attempt to clean up the code. It should run on the si_moves example. The little bits of python to compute the pole figures do into a module within the sinograms submodule somewhere (utils). Some nice comments (markdown cells) explain what is being done. If it is not clear to you, leave it for a human |
Address review on FABLE-3DXRD#618: revert the test-only dset_path/phase_str back to the Si_cube example, drop a stray duplicate min_unique, and move the forward-simulation math (ring hkls, calculated tth/eta/omega, dty) out of the notebook into ImageD11.sinograms.polefigures as documented, reusable functions. Fix a real bug where plotting both Friedel-pair solutions as two separate hist2d() calls silently hid the first under the second. Also fix pbp_1_indexing's y0 auto-guess, which computed y0_guess but never assigned it to y0. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Member
Author
|
OK - works on silicon now. Should be OK to merge. Also fixes some glitch in pbp_1 about guessing y0 |
Anticipates FABLE-3DXRD#625 (numpy.shape cleanup): use arr = arr.reshape(shape, copy=False) instead of arr.shape = shape, which numpy 2.5 deprecates. Otherwise this PR would reintroduce the pattern FABLE-3DXRD#625 is removing as soon as it merges. Verified byte-identical plot output before/after. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relates to #484 (todo: plot polefigures before/after indexing), the top item on the #594 release checklist (plots from /data/id11/jon/ma6288/pbp_2_visualise.ipynb).
Updates the existing pbp_2_visualise.ipynb with cells that: build calculated g-vectors from the best UBI per voxel for a chosen ring, compare calculated vs measured tth/eta/omega, and bin measured peaks by omega/dty per ring to inspect sinogram coverage/pole figures before making the TensorMap. Cell outputs and the embedded widget-state metadata are stripped to keep the diff reviewable.
REVIEW/TEST BEFORE MERGE