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 snapping #2721

Merged
merged 3 commits into from Apr 27, 2021
Merged

Fix snapping #2721

merged 3 commits into from Apr 27, 2021

Conversation

ericpre
Copy link
Member

@ericpre ericpre commented Apr 26, 2021

Fix regression introduced in #2686: snapping was call too early - before the widget values were set and it was snapping at the default values, typically 0.
Close #2720.

Progress of the PR

  • snap widget after the widget values have been set,
  • Add tests,
  • ready for review.

@codecov
Copy link

codecov bot commented Apr 26, 2021

Codecov Report

Merging #2721 (241c253) into RELEASE_next_patch (b77cc79) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@                  Coverage Diff                   @@
##           RELEASE_next_patch    #2721      +/-   ##
======================================================
+ Coverage               77.21%   77.24%   +0.02%     
======================================================
  Files                     202      202              
  Lines                   30035    30035              
  Branches                 6559     6559              
======================================================
+ Hits                    23193    23201       +8     
+ Misses                   5091     5086       -5     
+ Partials                 1751     1748       -3     
Impacted Files Coverage Δ
hyperspy/axes.py 86.34% <100.00%> (+0.26%) ⬆️
hyperspy/drawing/_widgets/line2d.py 54.29% <100.00%> (ø)
hyperspy/roi.py 82.07% <100.00%> (+0.49%) ⬆️
hyperspy/drawing/widget.py 71.81% <0.00%> (+0.58%) ⬆️

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 b77cc79...241c253. Read the comment docs.

@ericpre
Copy link
Member Author

ericpre commented Apr 27, 2021

The failure of the test suite are related to recent releases of dependencies and not to this PR.

@ericpre
Copy link
Member Author

ericpre commented Apr 27, 2021

Rebased to include the changes the test suite fixes from #2722.

@ericpre ericpre linked an issue Apr 27, 2021 that may be closed by this pull request
@jlaehne
Copy link
Contributor

jlaehne commented Apr 27, 2021

Verified that error in #2720 is indeed fixed.

@jlaehne jlaehne merged commit 869d077 into hyperspy:RELEASE_next_patch Apr 27, 2021
@ericpre ericpre deleted the fix_snapping branch May 20, 2021 19:01
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.

ROI error if axes_manager[0].offset != 0
2 participants