8000 Hyperspy 2.0.0 Changes by CSSFrancis · Pull Request #969 · pyxem/pyxem · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Hyperspy 2.0.0 Changes #969

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

Merged
merged 28 commits into from
Nov 16, 2023
Merged

Conversation

CSSFrancis
Copy link
Member
@CSSFrancis CSSFrancis commented Nov 10, 2023

name: Adjusting to Hyperspy 2.0.0 Changes
about: This makes pyxem compatible with hyperspy 2.0.0


Checklist

  • Fix Parallel option to map functions
  • Fix instances of peak and linesegment markers
  • Refactor ellipse fitting tools and add an example
  • Make all tests pass
  • Update CHANGELOG.rst

What does this PR do? Please describe and/or link to an open issue.
It might be a good idea to start by merging this after 0.16.0 is released and then try to clean up some of the changes.

@coveralls
Copy link
coveralls commented Nov 13, 2023

Coverage Status

coverage: 96.054% (-0.01%) from 96.067%
when pulling d68c0cc on CSSFrancis:hyperspy_2.0.0_update
into 3bf0bf5 on pyxem:main.

@CSSFrancis CSSFrancis mentioned this pull request Nov 14, 2023
4 tasks
@CSSFrancis
Copy link
Member Author

Failures are due to zenodo...

@CSSFrancis CSSFrancis mentioned this pull request Nov 14, 2023 8000
9 tasks
@CSSFrancis CSSFrancis force-pushed the hyperspy_2.0.0_update branch 2 times, most recently from 8d7c97c to 65c0291 Compare November 14, 2023 16:44
@CSSFrancis
Copy link
Member Author

@ericpre or @hakonanes or @magnunor any chance one of you can look at this?

The ellipse tools need to be cleaned up but I would rather do that in a different PR. In any case I think things are much cleaner than they were.

@CSSFrancis CSSFrancis requested review from magnunor and pc494 November 14, 2023 17:37
This was referenced Nov 14, 2023
@ericpre
Copy link
Contributor
ericpre commented Nov 14, 2023

I will have a look at it tomorrow.

@CSSFrancis CSSFrancis force-pushed the hyperspy_2.0.0_update branch from 74cf197 to 320bad2 Compare November 15, 2023 18:17
Copy link
Contributor
@ericpre ericpre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interestingly, I was expecting more changes to be required but clearly this is not the case. This look pretty good, most of my comments could handle here or in a follow up PR as they are improvement suggestion on simplifying user workflow and reducing redundancy.

Comment on lines +47 to +53
center, affine, params, pos, inlier = pxm.utils.ransac_ellipse_tools.determine_ellipse(
s, use_ransac=True, return_params=True
)

el, in_points, out_points = pxm.utils.ransac_ellipse_tools.ellipse_to_markers(
ellipse_array=params, points=pos, inlier=inlier
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the user, would it be more simple to have methods of the Diffraction2D signal, which would used these functions?
This sounds very verbose while user needs are:

  1. measure ellipticity (return affine transformation and ellipse markers)
  2. check measurement visually (use ellipse markers)
  3. correct ellipticity (use affine transformation)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! It's on the list of things to do 😅 There are lots of extra classes/ functionality which should be functions of signals.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added it to the list of things to do in #973

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When using the find_peaks method interactively, the markers are not displaying! This is most likely something that need to be fixed in hyperspy.

@CSSFrancis
Copy link
Member Author

pre-commit.ci autofix

@CSSFrancis
Copy link
Member Author

@ericpre I might merge this and then move to #972 to clean up some of the other stuff.

@ericpre
Copy link
Contributor
ericpre commented Nov 16, 2023

Yes, sounds good to me!

@CSSFrancis CSSFrancis merged commit 48c83c6 into pyxem:main Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0