Esempio n. 1
0
 def smooth_tv(self,
               smoothing_parameter=None,
               show_progressbar=None,
               parallel=None):
     """Total variation data smoothing in place.
     Parameters
     ----------
     smoothing_parameter: float or None
        Denoising weight relative to L2 minimization. If None the method
        is run in interactive mode.
     show_progressbar : None or bool
         If True, display a progress bar. If None the default is set in
         `preferences`.
     parallel : {Bool, None, int}
         Perform the operation parallely
     Raises
     ------
     SignalDimensionError if the signal dimension is not 1.
     """
     self._check_signal_dimension_equals_one()
     if smoothing_parameter is None:
         smoother = SmoothingTV(self)
         smoother.edit_traits()
     else:
         self.map(_tv_denoise_1d,
                  weight=smoothing_parameter,
                  show_progressbar=show_progressbar,
                  parallel=parallel)