-
Notifications
You must be signed in to change notification settings - Fork 205
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 support for "sig"
and "nav"
to index axes_manager
#3385
Add support for "sig"
and "nav"
to index axes_manager
#3385
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## RELEASE_next_minor #3385 +/- ##
======================================================
+ Coverage 80.63% 80.65% +0.01%
======================================================
Files 146 146
Lines 21918 21929 +11
Branches 5174 5178 +4
======================================================
+ Hits 17674 17687 +13
+ Misses 3027 3026 -1
+ Partials 1217 1216 -1 ☔ View full report in Codecov by Sentry. |
The failure on CI is related to sympy 1.13.0rc1 - see sympy/sympy#26663 and potential fix in sympy/sympy#26678. |
@ericpre, I saw the mention in the PR over at SymPy: I'm curious, do you know what |
5f7f406
to
28e5a8c
Compare
Thanks @bjodah, I will try to make a minimum example representation of the failure here in the coming days. From a quick look at the log, it most likely have to do with the computation of derivative of these expression: hyperspy/hyperspy/_components/voigt.py Lines 97 to 99 in 95c194c
and
|
2c0a081
to
b584c87
Compare
xref #814. |
The test failure with sympy 1.13.0rc1 is fixed in #3388. |
@ericpre I can look at this on Tuesday! I'm very excited for this one :) +1 to following this up with something like what had been previously proposed. s.axes_manager["nav"].scale=.2
s.axes_manager["nav"](scale=0.2, units="nm", offsets=0.2) The second one looks kind of weird, although still correct and you could do On another note there are so many more ways to index axes than I previously realized. It would be nice to have an example of how to use things like the imaginary number indexing indexing with the axis name etc in order to set things like the scale. Maybe just a basic example showing how to sum data along different axes. |
See #2756 for the setter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
b584c87
to
2f1ca14
Compare
2f1ca14
to
bf3e9cb
Compare
We should probably add a section on accessing the axes and their properties in the documentation on the Axes handling page right before "setting axis properties". |
Co-authored-by: Jonas Lähnemann <jonas@pdi-berlin.de>
Yes, the documentation on AxesManager will need an overhaul and integrating with the gallery of example, etc. I was thinking that it would be a good time to do after #2756. |
8054d42
to
daba5e9
Compare
This is a simple change but very convenient!
Progress of the PR
"sig"
and"nav"
to indexaxes_manager
,upcoming_changes
folder (seeupcoming_changes/README.rst
),readthedocs
doc build of this PR (link in github checks)Minimal example of the bug fix or the new feature