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

Fix minor error in code example in visualization doc #121

Merged
merged 1 commit into from
Jan 8, 2020

Conversation

hakonanes
Copy link
Member

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

Description

Fixes code example in documentation where plotting of multiple scans side-by-side. The simulated patterns from EMsoft are reshaped from a 3D array into a 4D array of same size as the experimental patterns, however, I forgot that HyperSpy flips the (x, y) coordinates with respect to NumPy when using s.axes_manager.shape.

Change:

# Old
s_sim = kp.signals.EBSD(patterns.reshape(s.axes_manager.shape))
# New
s_sim = kp.signals.EBSD(patterns.reshape(s.data.shape))

Type of change

  • Bug-fix (non-breaking change which fixes an issue)

References

How has this been tested?

Final checklist:

  • My PR is the minimum possible work for the desired functionality
    - [ ] I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
    - [ ] I have added tests that prove my fix is effective or that my feature works

Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
@hakonanes hakonanes added the documentation This relates to the documentation label Jan 8, 2020
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 76fd1af on hakonanes:fix-plot-multiple-scans-doc into 9d1269c on kikuchipy:master.

@hakonanes hakonanes merged commit ce61975 into pyxem:master Jan 8, 2020
@hakonanes hakonanes deleted the fix-plot-multiple-scans-doc branch January 8, 2020 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This relates to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants