Created
April 8, 2017 14:11
-
-
Save thomasaarholt/fd7df9a69751fafbdaeafb268381514e to your computer and use it in GitHub Desktop.
Spikes removal error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# When stepping through the signal looking for spikes, suddenly: | |
Exception occurred in traits notification handler for object: <hyperspy.signal_tools.SpikesRemoval object at 0x12835e048>, trait: ss_right_value, old value: nan, new value: 0.0 | |
Traceback (most recent call last): | |
File "/Users/thomas/miniconda3/envs/hs/lib/python3.5/site-packages/traits/trait_notifiers.py", line 340, in __call__ | |
self.handler( *args ) | |
File "/Users/thomas/hyperspy/hyperspy/signal_tools.py", line 968, in _ss_right_value_changed | |
self.span_selector_changed() | |
File "/Users/thomas/hyperspy/hyperspy/signal_tools.py", line 1047, in span_selector_changed | |
self.interpolated_line.update() | |
File "/Users/thomas/hyperspy/hyperspy/drawing/signal1d.py", line 320, in update | |
ydata = self.data_function(axes_manager=self.axes_manager).real | |
File "/Users/thomas/hyperspy/hyperspy/signal_tools.py", line 999, in get_interpolated_spectrum | |
left, right = self.get_interpolation_range() | |
File "/Users/thomas/hyperspy/hyperspy/signal_tools.py", line 986, in get_interpolation_range | |
left = axis.value2index(self.ss_left_value) | |
File "/Users/thomas/hyperspy/hyperspy/axes.py", line 392, in value2index | |
raise ValueError("The value is out of the axis limits") | |
ValueError: The value is out of the axis limits | |
ERROR:traits:Exception occurred in traits notification handler for object: <hyperspy.signal_tools.SpikesRemoval object at 0x12835e048>, trait: ss_right_value, old value: nan, new value: 0.0 | |
Traceback (most recent call last): | |
File "/Users/thomas/miniconda3/envs/hs/lib/python3.5/site-packages/traits/trait_notifiers.py", line 340, in __call__ | |
self.handler( *args ) | |
File "/Users/thomas/hyperspy/hyperspy/signal_tools.py", line 968, in _ss_right_value_changed | |
self.span_selector_changed() | |
File "/Users/thomas/hyperspy/hyperspy/signal_tools.py", line 1047, in span_selector_changed | |
self.interpolated_line.update() | |
File "/Users/thomas/hyperspy/hyperspy/drawing/signal1d.py", line 320, in update | |
ydata = self.data_function(axes_manager=self.axes_manager).real | |
File "/Users/thomas/hyperspy/hyperspy/signal_tools.py", line 999, in get_interpolated_spectrum | |
left, right = self.get_interpolation_range() | |
File "/Users/thomas/hyperspy/hyperspy/signal_tools.py", line 986, in get_interpolation_range | |
left = axis.value2index(self.ss_left_value) | |
File "/Users/thomas/hyperspy/hyperspy/axes.py", line 392, in value2index | |
raise ValueError("The value is out of the axis limits") | |
ValueError: The value is out of the axis limits | |
Exception occurred in traits notification handler. | |
Please check the log file for details. | |
--------------------------------------------------------------------------- | |
ValueError Traceback (most recent call last) | |
/Users/thomas/hyperspy/hyperspy/gui_ipywidgets/tools.py in on_remove_clicked(b) | |
416 | |
417 def on_remove_clicked(b): | |
--> 418 obj.apply() | |
419 remove.on_click(on_remove_clicked) | |
420 labeled_spline_order = labelme("Spline order", spline_order) | |
/Users/thomas/hyperspy/hyperspy/signal_tools.py in apply(self) | |
1048 | |
1049 def apply(self): | |
-> 1050 self.signal()[:] = self.get_interpolated_spectrum() | |
1051 self.signal.events.data_changed.trigger(obj=self.signal) | |
1052 self.update_spectrum_line() | |
/Users/thomas/hyperspy/hyperspy/signal_tools.py in get_interpolated_spectrum(self, axes_manager) | |
997 data = self.signal().copy() | |
998 axis = self.signal.axes_manager.signal_axes[0] | |
--> 999 left, right = self.get_interpolation_range() | |
1000 if self.kind == 'linear': | |
1001 pad = 1 | |
/Users/thomas/hyperspy/hyperspy/signal_tools.py in get_interpolation_range(self) | |
984 right = self.argmax + self.default_spike_width | |
985 else: | |
--> 986 left = axis.value2index(self.ss_left_value) | |
987 right = axis.value2index(self.ss_right_value) | |
988 | |
/Users/thomas/hyperspy/hyperspy/axes.py in value2index(self, value, rounding) | |
390 return index | |
391 else: | |
--> 392 raise ValueError("The value is out of the axis limits") | |
393 | |
394 def index2value(self, index): | |
ValueError: The value is out of the axis limits |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment