예제 #1
0
    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
예제 #2
0
파일: eels.py 프로젝트: mfm24/hyperspy
    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
예제 #3
0
 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)
예제 #4
0
파일: eels.py 프로젝트: csb60/hyperspy
 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