def dopplerFunction(dim=1024, normalize=True, fq=0):
    """
    Generate the Doppler function in a range of 0 to 1, with dim points.

    Parameters
    ----------
    dim: int
        Dimension of the signal.

    normalize: bool, optional
        It is True by default. This parameter normalize the data values 
        in a range of 0 to 1 with a function present in 
        ``statsWaveletFilt.miscellaneous``.

    fq: int or float, optional
        It is 0 by default. With this default value the original doppler, 
        shown by Donoho [1] will be used.

    Returns
    -------
    tuple:
        [0] 1-D array-like, coordinates in X axis and [1] 1-D array-like,
        coordinates in Y axis

    References
    ----------
    .. [1] DONOHO, D. L.; JOHNSTONE, I. M. Ideal spatial adaptation via
           wavelet shrinkage. Biometrika, v. 81, p. 425–455, 1994.
    """
    import numpy as np
    import statsWaveletFilt.miscellaneous as misc
    linspace = np.linspace
    sin = np.sin
    pi = np.pi
    sqrt = np.sqrt
    x = linspace(0, 1, dim)
    e = 0.05
    if fq == 0:
        y = sqrt(x * (1 - x)) * sin(2 * pi * (1 + e) / (x + e))
    else:
        y = sqrt(x * (1 - x)) * sin(2 * fq * pi * (1 + e) / (x + e))
    if normalize:
        y_nor = misc.normalizeData(y)
    else:
        y_nor = y
    return x, y_nor
