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 filter_zero_loss_peak argument to spikes_removal_tool and fix one bug. #1412
Add filter_zero_loss_peak argument to spikes_removal_tool and fix one bug. #1412
Conversation
Wouldn't this be equivalent?: s.isig[start:end].spikes_removal_tool() |
Yes, it is! Thanks :) I will add it to the documentation! Is there a clever way to set two intervals, that I would have miss? For example to ignore a zero-loss peak? |
You can pass a |
Adding a |
Something like that. Currently
They enable editing a mask interactively. Because the mask is stored in the model as an attribute for internal consumption there is no method to get the mask as you propose. For the model it makes sense to store it internally, but does it make sense to store it internally for the signal? If not, it could be implemented as a mask = s.get_signal_mask() # This returns a mask masking nothing by default
mask.set_signal_range() # It remembers its parent mask and, if no signal range is passed, it plots s for interactive selection
mask.set_signal_range(signal=s2) # Interactively edit the mask with a different signal
s.spikes_removal_tool(signal_mask=mask) |
- Add link to the summary of the implementation of lazy signal to the dev_guide
- Display signal masked area with fill_between 0 and signal.
- close plot at the same time than closing the window
1f35812
to
ec73fd8
Compare
Ready for review. |
…ero_loss_peak_argument_spikes_removal_tool # Conflicts: # doc/dev_guide.rst # hyperspy/_signals/signal1d.py # hyperspy/gui/egerton_quantification.py
…to signal_tools.py and remove unnecessary tests.
33d9d80
to
9743d30
Compare
…ero_loss_peak_argument_spikes_removal_tool
…ctive` to make it interactive or not. - Allow the threshold to be estimated automatically using the `spikes_diagnosis` tool. - Update documnentation.
Merged with upstream and resolved conflict. |
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.
Minor doc change @ericpre otherwise looks good!
…ero_loss_peak_argument_spikes_removal_tool # Conflicts: # doc/dev_guide/lazy_computations.rst # doc/user_guide/signal1d.rst
Codecov Report
@@ Coverage Diff @@
## RELEASE_next_minor #1412 +/- ##
======================================================
+ Coverage 75.56% 75.63% +0.07%
======================================================
Files 202 202
Lines 29544 29614 +70
Branches 6439 6449 +10
======================================================
+ Hits 22324 22398 +74
+ Misses 5401 5390 -11
- Partials 1819 1826 +7
Continue to review full report at Codecov.
|
If you can resolve the conflicts this should be good to go? |
…ero_loss_peak_argument_spikes_removal_tool # Conflicts: # hyperspy/tests/signal/test_tools.py
@francisco-dlp can you check this over again since you initially reviewed it? |
…ero_loss_peak_argument_spikes_removal_tool # Conflicts: # hyperspy/signal_tools.py
…ero_loss_peak_argument_spikes_removal_tool # Conflicts: # hyperspy/signal_tools.py
06010f7
to
c9db02e
Compare
563fc8a
to
020863f
Compare
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.
Subject to resolving conflicts.
…ero_loss_peak_argument_spikes_removal_tool # Conflicts: # doc/user_guide/signal1d.rst # hyperspy/_signals/eels.py # hyperspy/_signals/signal1d.py # hyperspy/tests/signal/test_eels.py # hyperspy/tests/signal/test_tools.py
It should be PR to next_minor, but I initially check out from next_patch... I can change it to next_minor if necessary.
It may also be a good opportunity to add some tests (not for the ui) for the spikes_removal_tool, I guess it should be possible to test the different method/functions without using the ui?