def spikes_removal_tool(self, signal_mask=None, navigation_mask=None): """Graphical interface to remove spikes from EELS spectra. Parameters ---------- signal_mask: boolean array Restricts the operation to the signal locations not marked as True (masked) navigation_mask: boolean array Restricts the operation to the navigation locations not marked as True (masked) See also -------- _spikes_diagnosis, """ self._check_signal_dimension_equals_one() sr = SpikesRemoval(self, navigation_mask=navigation_mask, signal_mask=signal_mask) sr.configure_traits() return sr
def spikes_removal_tool(self, signal_mask=None, navigation_mask=None): """Graphical interface to remove spikes from EELS spectra. Parameters ---------- signal_mask: boolean array Restricts the operation to the signal locations not marked as True (masked) navigation_mask: boolean array Restricts the operation to the navigation locations not marked as True (masked) See also -------- _spikes_diagnosis, """ self._check_signal_dimension_equals_one() sr = SpikesRemoval(self, navigation_mask=navigation_mask, signal_mask=signal_mask) sr.edit_traits() return sr
def test_spikes_removal(self): from hyperspy.gui.egerton_quantification import SpikesRemoval m = mock.Mock() s = self.s s.events.data_changed.connect(m.data_changed) sr = SpikesRemoval(s) sr.threshold = 0.5 sr.find() sr.apply() nt.assert_equal(s.data[0, 50], 0) nt.assert_true(m.data_changed.called)
def spikes_removal_tool(self,signal_mask=None, spatial_mask=None): sr = SpikesRemoval(self,spatial_mask=spatial_mask, signal_mask=signal_mask) sr.edit_traits() return sr