#NEWLINE# @ verbose #NEWLINE# def apply_hilbert( self , picks , envelope = False , n_jobs = 1 , n_fft = None , verbose = None ) : #NEWLINE# #INDENT# ' Compute analytic signal or envelope for a subset of channels.\n\n        If envelope=False, the analytic signal for the channels defined in\n        "picks" is computed and the data of the Raw object is converted to\n        a complex representation (the analytic signal is complex valued).\n\n        If envelope=True, the absolute value of the analytic signal for the\n        channels defined in "picks" is computed, resulting in the envelope\n        signal.\n\n        .. warning: Do not use ``envelope=True`` if you intend to compute\n                    an inverse solution from the raw data. If you want to\n                    compute the envelope in source space, use\n                    ``envelope=False`` and compute the envelope after the\n                    inverse solution has been obtained.\n\n        .. note:: If envelope=False, more memory is required since the\n                  original raw data as well as the analytic signal have\n                  temporarily to be stored in memory.\n\n        .. note:: If n_jobs > 1, more memory is required as\n                  ``len(picks) * n_times`` additional time points need to\n                  be temporaily stored in memory.\n\n        Parameters\n        ----------\n        picks : array-like of int\n            Indices of channels to apply the function to.\n        envelope : bool (default: False)\n            Compute the envelope signal of each channel.\n        n_jobs: int\n            Number of jobs to run in parallel.\n        n_fft : int > self.n_times | None\n            Points to use in the FFT for Hilbert transformation. The signal\n            will be padded with zeros before computing Hilbert, then cut back\n            to original length. If None, n == self.n_times.\n        verbose : bool, str, int, or None\n            If not None, override default verbose level (see mne.verbose).\n            Defaults to self.verbose.\n\n        Notes\n        -----\n        The analytic signal "x_a(t)" of "x(t)" is::\n\n            x_a = F^{-1}(F(x) 2U) = x + i y\n\n        where "F" is the Fourier transform, "U" the unit step function,\n        and "y" the Hilbert transform of "x". One usage of the analytic\n        signal is the computation of the envelope signal, which is given by\n        "e(t) = abs(x_a(t))". Due to the linearity of Hilbert transform and the\n        MNE inverse solution, the enevlope in source space can be obtained\n        by computing the analytic signal in sensor space, applying the MNE\n        inverse, and computing the envelope in source space.\n\n        Also note that the n_fft parameter will allow you to pad the signal\n        with zeros before performing the Hilbert transform. This padding\n        is cut off, but it may result in a slightly different result\n        (particularly around the edges). Use at your own risk.\n        ' #NEWLINE# n_fft = ( self . n_times if ( n_fft is None ) else n_fft ) #NEWLINE# if ( n_fft < self . n_times ) : #NEWLINE# #INDENT# raise ValueError ( 'n_fft must be greater than n_times' ) #NEWLINE# #UNINDENT# if ( envelope is True ) : #NEWLINE# #INDENT# self . apply_function ( _my_hilbert , picks , None , n_jobs , n_fft , envelope = envelope ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . apply_function ( _my_hilbert , picks , np . complex64 , n_jobs , n_fft , envelope = envelope )