Repository navigation
show_2d/Dataset2d.show: take scalebar sampling and units from Dataset2d - #317
Merged
arthurmccray merged 1 commit intoNov 12, 2026
Merged
Conversation
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.
What problem this PR addreseses
show_2dwas not automatically and reliably picking up the calibration from adataset2dand putting that into a scale bar. This happened because it was converted to a plain array before display and the calibration was not passed. This is now fixed and passed to the scalebar params.Additionally, I added something called
display_units, which sets which units to display in. This need not be the ones listed in the calibration and appropriate unit conversions for real-space and reciprocal units are included. Everything from m to pm is supported, including Å.This is tested on a sequence of dm3 images of a range of magnifications that I was importing and turning into labelled displays in a simple automated script for a research collaborator in another school. And eventually worked very nicely.
What should the reviewer(s) do