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

Add NotImplementedError to RGB VirtualBSEImage rescale/normalize #174

Merged
merged 2 commits into from May 19, 2020

Conversation

hakonanes
Copy link
Member

Signed-off-by: Håkon Wiik Ånes hwaanes@gmail.com

Description

Raise NotImplementedError when trying to call rescale_intensity() and normalize_intensity() on a VirtualBSEImage object with a HyperSpy RGB data type.

Also improve some doc wording.

Checklist

Minimal example of the bug fix or new feature

>>> import kikuchipy as kp
>>> import numpy as np
>>> s = kp.signals.EBSD(np.zeros((10, 10, 10, 10)))
>>> vbse_gen = kp.generators.VirtualBSEGenerator(s)
>>> rgb = vbse_gen.get_rgb_image(r=(0, 0), g=(0, 1), b=(0, 2))
>>> rgb.rescale_intensity()
[...]
    raise NotImplementedError(
NotImplementedError: Use RGB channel normalization when creating the image instead.

For reviewers

  • Check that the PR title is short, concise, and will make sense 1 year
    later.
  • Check that new functions are imported in corresponding __init__.py.
  • Check that new features, API changes, and deprecations are mentioned in
    the unreleased section in doc/changelog.rst.

Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
@hakonanes hakonanes added bug Something isn't working documentation This relates to the documentation labels May 19, 2020
@hakonanes hakonanes added this to the v0.2.0 milestone May 19, 2020
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
@coveralls
Copy link

coveralls commented May 19, 2020

Coverage Status

Coverage remained the same at 100.0% when pulling 2c131f9 on hakonanes:improve-doc-wording into 2fbf2ff on kikuchipy:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling b52a7c9 on hakonanes:improve-doc-wording into 2fbf2ff on kikuchipy:master.

@hakonanes hakonanes merged commit a5bdb84 into pyxem:master May 19, 2020
@hakonanes hakonanes deleted the improve-doc-wording branch May 19, 2020 10:59
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants