Skip to content

nbGui: add ring/pole-figure sinogram plots to pbp_2_visualise - #618

Merged
jonwright merged 3 commits into
FABLE-3DXRD:masterfrom
jonwright:issue484
Sep 9, 2026
Merged

nbGui: add ring/pole-figure sinogram plots to pbp_2_visualise#618
jonwright merged 3 commits into
FABLE-3DXRD:masterfrom
jonwright:issue484

Conversation

@jonwright

Copy link
Copy Markdown
Member

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

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.
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by 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",

@jonwright jonwright Sep 6, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",

@jonwright jonwright Sep 6, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #2.    min_unique=50

delete


Reply via ReviewNB

@jonwright

Copy link
Copy Markdown
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>
@jonwright

Copy link
Copy Markdown
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>
@jonwright
jonwright merged commit 3840d84 into FABLE-3DXRD:master Sep 9, 2026
8 checks passed
@jonwright
jonwright deleted the issue484 branch September 9, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant