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 add_widget for undefined roi #2767

Merged

Conversation

ericpre
Copy link
Member

@ericpre ericpre commented Jun 9, 2021

Improvement of #2341.

Progress of the PR

  • Add support for "undefined" ROI in add_widget
  • add tests,
  • ready for review.

Minimal example of the bug fix or the new feature

import hyperspy.api as hs

im = hs.datasets.example_signals.object_hologram()
im.plot()

roi = hs.roi.Line2DROI()
roi.add_widget(im)

Previously, only roi.interactive(s) would work.

@codecov
Copy link

codecov bot commented Jun 9, 2021

Codecov Report

Merging #2767 (94d87d2) into RELEASE_next_minor (384b4e6) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##           RELEASE_next_minor    #2767   +/-   ##
===================================================
  Coverage               78.00%   78.01%           
===================================================
  Files                     203      203           
  Lines                   30695    30702    +7     
  Branches                 6698     6704    +6     
===================================================
+ Hits                    23945    23952    +7     
  Misses                   4995     4995           
  Partials                 1755     1755           
Impacted Files Coverage Δ
hyperspy/drawing/_widgets/line2d.py 54.29% <100.00%> (ø)
hyperspy/roi.py 84.48% <100.00%> (+0.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 384b4e6...94d87d2. Read the comment docs.

@jlaehne jlaehne merged commit eb71e12 into hyperspy:RELEASE_next_minor Jun 30, 2021
@ericpre ericpre deleted the fix_add_widget_undefined_ROI branch July 1, 2021 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants