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
Feature request: Create DataAxis from vector instead of dict #2718
Comments
Is it not already implemented in #2399? See https://hyperspy--2399.org.readthedocs.build/en/2399/user_guide/axes.html#non-uniform-data-axis |
What do you think, @F00lWise? Is the following enough? dict0 = {'axis': np.arange(12)**2}
s = hs.signals.Signal1D(np.ones(12), axes=[dict0]) |
Wow awesome I had not seen that yet! I will try that out immediately! :D |
... actually, can I install it yet? (Sorry, noob question.) |
Yep. If you haven't been using git, then the easiest is to do |
It works :)))) |
Hey guys,
having discovered hyperspy some weeks back, it has been hugely helpful in analyzing a spectroscopy dataset with 4 independent dimensions. However, I just found that one of the stepper motors was using steps, so that the true scanned axis is no longer linear, but totally irregular.
I have been looking excitedly at the development for non-uniform axis support and I was wondering if a non-uniform axis could not be created by a call like this:
I suppose the vector would have to represent the middles, rather than the edges of the signal, although that is technically not precise if the true data is continuous.
This kind of syntax would also allow a functional axis (see #1927, #2398) by simply evaluating the function first and passing it as a vector, thereby relieving the programmer of learning the axis dictionary syntax.
It would also automatically solve #2692.
@thomasaarholt suggested this could make a nice option for #2399 .
Thanks so much for all your work!
The text was updated successfully, but these errors were encountered: