-----
    Brief
    -----
    Function with the purpose of applying a digital bandpass filter on signal, in order to attenuate
    the signal content outside the frequency band [low_cutoff, high_cutoff].

    -----------
    Description
    -----------
    In signal processing, knowledge can be extracted from different domains, the most common is the
    time-domain, where statistical parameters are taken by analysing the acquired samples of
    a time series.

    Another common domain of signal analysis is the frequency domain, also known as
    "Fourier Domain" due to the fact that for converting data from time to frequency domain it is
    necessary to apply the Fourier Transform.

    The basic principle behind the Fourier Analysis is related with the mathematical decomposition
    of a time-series.

    As demonstrated by Joseph Fourier in his book "Théorie analytique de la chaleur":
    "some functions could be written as an infinite sum of harmonics".

    Each "harmonic" is characterized by a specific frequency, so, after decomposing a time series
    into their harmonics/elementary components, the "frequency content" of the signal is revealed.

    If the frequency content is manipulated, for example, by decreasing the weight of some
    harmonics, after the reconstruction ("sum of harmonics") then the resultant signal in time
    domain will be slightly different comparing with the original one.

    With the current function an input "signal" is applied to a butterworth bandpass filter, in
    order to decrease the weight of elementary components with frequencies smaller than "low_cutoff"
    or bigger than "high_cutoff".

    Filter order can also be specified (the bigger the order more quickly the response of the filter
    will be, near the cutoff frequencies). Higher orders could cause a less stable behavior of the
    system.

    ----------
    Parameters
    ----------
    signal : ndarray
        Array that contains the acquired samples of the signal under analysis.
    low_cutoff : int
        Low cutoff frequency of the bandpass filter.
    high_cutoff : int
        High cutoff frequency of the bandpass filter.
    sample_rate : int
        Sampling rate at which the acquisition took place.
    order : int
        Filter order.

    Returns
    -------
    out : list
        Filtered signal samples.

def _butter_bandpass_filter(signal, low_cutoff, high_cutoff, sample_rate, order=6):
    """
    -----
    Brief
    -----
    Function with the purpose of applying a digital bandpass filter on signal, in order to attenuate
    the signal content outside the frequency band [low_cutoff, high_cutoff].

    -----------
    Description
    -----------
    In signal processing, knowledge can be extracted from different domains, the most common is the
    time-domain, where statistical parameters are taken by analysing the acquired samples of
    a time series.

    Another common domain of signal analysis is the frequency domain, also known as
    "Fourier Domain" due to the fact that for converting data from time to frequency domain it is
    necessary to apply the Fourier Transform.

    The basic principle behind the Fourier Analysis is related with the mathematical decomposition
    of a time-series.

    As demonstrated by Joseph Fourier in his book "Théorie analytique de la chaleur":
    "some functions could be written as an infinite sum of harmonics".

    Each "harmonic" is characterized by a specific frequency, so, after decomposing a time series
    into their harmonics/elementary components, the "frequency content" of the signal is revealed.

    If the frequency content is manipulated, for example, by decreasing the weight of some
    harmonics, after the reconstruction ("sum of harmonics") then the resultant signal in time
    domain will be slightly different comparing with the original one.

    With the current function an input "signal" is applied to a butterworth bandpass filter, in
    order to decrease the weight of elementary components with frequencies smaller than "low_cutoff"
    or bigger than "high_cutoff".

    Filter order can also be specified (the bigger the order more quickly the response of the filter
    will be, near the cutoff frequencies). Higher orders could cause a less stable behavior of the
    system.

    ----------
    Parameters
    ----------
    signal : ndarray
        Array that contains the acquired samples of the signal under analysis.
    low_cutoff : int
        Low cutoff frequency of the bandpass filter.
    high_cutoff : int
        High cutoff frequency of the bandpass filter.
    sample_rate : int
        Sampling rate at which the acquisition took place.
    order : int
        Filter order.

    Returns
    -------
    out : list
        Filtered signal samples.
    """

    order = order
    nyquist_freq = 0.5 * sample_rate

    # Transfer Function.
    b_coeff, a_coeff = scisign.butter(order, [low_cutoff / nyquist_freq,
                                              high_cutoff / nyquist_freq], btype='band')[:2]

    # Application of the signal to the designed filter.
    sign = scisign.lfilter(b_coeff, a_coeff, signal)

    return sign