mne.filter.high_pass_filter

mne.filter.high_pass_filter(x, Fs, Fp, filter_length='10s', trans_bandwidth=0.5, method='fft', iir_params=None, picks=None, n_jobs=1, copy=True, verbose=None)

Highpass filter for the signal x.

Applies a zero-phase highpass filter to the signal x, operating on the last dimension.

Parameters:

x : array

Signal to filter.

Fs : float

Sampling rate in Hz.

Fp : float

Cut-off frequency in Hz.

filter_length : str (Default: ‘10s’) | int | None

Length of the filter to use. If None or “len(x) < filter_length”, the filter length used is len(x). Otherwise, if int, overlap-add filtering with a filter of the specified length in samples) is used (faster for long signals). If str, a human-readable time in units of “s” or “ms” (e.g., “10s” or “5500ms”) will be converted to the shortest power-of-two length at least that duration. Not used for ‘iir’ filters.

trans_bandwidth : float

Width of the transition band in Hz. Not used if ‘order’ is specified in iir_params.

method : str

‘fft’ will use overlap-add FIR filtering, ‘iir’ will use IIR forward-backward filtering (via filtfilt).

iir_params : dict | None

Dictionary of parameters to use for IIR filtering. See mne.filter.construct_iir_filter for details. If iir_params is None and method=”iir”, 4th order Butterworth will be used.

picks : array-like of int | None

Indices to filter. If None all indices will be filtered.

n_jobs : int | str

Number of jobs to run in parallel. Can be ‘cuda’ if scikits.cuda is installed properly, CUDA is initialized, and method=’fft’.

copy : bool

If True, a copy of x, filtered, is returned. Otherwise, it operates on x in place.

verbose : bool, str, int, or None

If not None, override default verbose level (see mne.verbose).

Returns:

xf : array

x filtered.

Notes

The frequency response is (approximately) given by:

               -----------------------
             /|
            / |
           /  |
          /   |
----------    |
              |
       Fstop  Fp

Where Fstop = Fp - trans_bandwidth.