Skip to content
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

Update use of markers to HyperSpy v2 #695

Merged
merged 14 commits into from
Nov 7, 2024

Conversation

hakonanes
Copy link
Member

@hakonanes hakonanes commented Oct 29, 2024

Description of the change

The goal of this PR is to update our markers to use the new API in HyperSpy v2.

Our API should remain the same will remain mostly the same. Look-up of markers added to an EBSD signal changed in HyperSpy v2, though. Other changes:

This work was started in #651 but was never completed.

Progress of the PR

Minimal example of the bug fix or new feature

>>> import kikuchipy as kp
>>> s = kp.data.nickel_ebsd_large()
>>> vbse_imager = kp.imaging.VirtualBSEImager(s)
>>> p = vbse_imager.plot_grid()
>>> p
<EBSD, title: patterns Scan 1, dimensions: (|60, 60)>
>>> p.metadata.Markers
├── HorizontalLines = <HorizontalLines (HorizontalLines), length: 6>
├── Texts = <Texts (Texts), length: 25>
└── VerticalLines = <VerticalLines (VerticalLines), length: 6>
bilde

For reviewers

  • The PR title is short, concise, and will make sense 1 year later.
  • New functions are imported in corresponding __init__.py.
  • New features, API changes, and deprecations are mentioned in the unreleased
    section in CHANGELOG.rst.
  • New contributors are added to kikuchipy/__init__.py and .zenodo.json.

@hakonanes hakonanes added bug Something isn't working documentation This relates to the documentation maintenance This relates to package maintenance labels Oct 29, 2024
@hakonanes hakonanes added this to the v0.11.0 milestone Oct 29, 2024
@hakonanes hakonanes marked this pull request as draft October 29, 2024 19:56
@hakonanes hakonanes marked this pull request as ready for review November 4, 2024 21:54
@hakonanes hakonanes mentioned this pull request Nov 4, 2024
4 tasks
@CSSFrancis
Copy link
Member

@hakonanes I can try to take a bit of a closer look but I guess I don't understand why you have so many small text collections rather than one big text collection? It is faster to have one I think.

@hakonanes
Copy link
Member Author

The old top comment's code snippet didn't reflect the signal markers; it does now.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@hakonanes hakonanes merged commit b7f4dc8 into pyxem:hyperspy2-support Nov 7, 2024
11 checks passed
@hakonanes hakonanes deleted the hs2-markers-compat branch November 7, 2024 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation This relates to the documentation maintenance This relates to package maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants