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

Deprecate unused EBSD metadata, remove EBSD.rebin() overriding HyperSpy #428

Merged
merged 4 commits into from
Aug 31, 2021

Conversation

hakonanes
Copy link
Member

Description of the change

  • Add deprecation warnings to EBSD methods related to metadata, since the metadata is mostly unused internally and should be removed in v0.6
  • Remove the EBSD.rebin() overriding HyperSpy's Signal2D.rebin(), because it is unnecessary when the custom metadata is removed, and potentially breaking when the HyperSpy rebin() API changes (which it will in v1.7.0)

Progress of the PR

Minimal example of the bug fix or new feature

No external changes to EBSD.rebin() are made in this PR, and deprecation warnings are added

>>> import kikuchipy as kp
>>> s = kp.data.nickel_ebsd_large()
>>> s
<EBSD, title: patterns Scan 1, dimensions: (75, 55|60, 60)>
>>> s2 = s.rebin(scale=(1, 1, 2, 2))
<EBSD, title: patterns Scan 1, dimensions: (75, 55|30, 30)>
>>> s.set_experimental_parameters(xpc=1)
/home/hakon/kode/kikuchipy/kikuchipy/signals/ebsd.py:165: VisibleDeprecationWarning: Function `set_experimental_parameters()` is deprecated and will be removed in version 0.6.
  def set_experimental_parameters(
>>> s.set_phase_parameters(number=2)
/home/hakon/kode/kikuchipy/kikuchipy/signals/ebsd.py:296: VisibleDeprecationWarning: Function `set_phase_parameters()` is deprecated and will be removed in version 0.6.
  def set_phase_parameters(

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 doc/changelog.rst.
  • New contributors are added to .all-contributorsrc and the table is regenerated.

Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
@hakonanes hakonanes added the deprecation Deprecated functionality label Aug 31, 2021
@hakonanes hakonanes added this to the v0.5.0 milestone Aug 31, 2021
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
@hakonanes hakonanes merged commit 19bd354 into pyxem:develop Aug 31, 2021
@hakonanes hakonanes deleted the remove-rebin-override branch August 31, 2021 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation Deprecated functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant