libs/data/utils.py
def broad_filter(signal, fs, lowcut=0.1, highcut=35):
    """Returns filtered signal sampled at fs Hz, with a [lowcut, highcut] Hz
    bandpass."""
    # Generate butter bandpass of order 3.
    nyq = 0.5 * fs
    low = lowcut / nyq
    high = highcut / nyq
    b, a = butter(3, [low, high], btype='band')
    # Apply filter to the signal with zero-phase.
    filtered_signal = filtfilt(b, a, signal)
    return filtered_signal
Returns filtered signal sampled at fs Hz, with a [lowcut, highcut] Hz
    bandpass.
Returns filtered signal sampled at fs Hz, with a [lowcut, highcut] Hz
bandpass.
Returns filtered signal sampled at fs Hz with a [ lowcut highcut ] Hz bandpass .
def broad_filter(signal, fs, lowcut=0.1, highcut=35):
    nyq = 0.5 * fs
    low = lowcut / nyq
    high = highcut / nyq
    b, a = butter(3, [low, high], btype='band')
    filtered_signal = filtfilt(b, a, signal)
    return filtered_signal
def broad_filter ( signal , fs , lowcut = 0.1 , highcut = 35 ) : nyq = 0.5 * fs low = lowcut / nyq high = highcut / nyq b , a = butter ( 3 , [ low , high ] , btype = 'band' ) filtered_signal = filtfilt ( b , a , signal ) return filtered_signal
Returns filtered signal sampled at fs Hz, with a [lowcut, highcut] Hz
bandpass.
Returns filtered signal sampled at fs Hz with a [ lowcut highcut ] Hz bandpass .
"""Returns filtered signal sampled at fs Hz, with a [lowcut, highcut] Hz
    bandpass.""" # Generate butter bandpass of order 3. # Apply filter to the signal with zero-phase.
signal
fs
lowcut
highcut