def ricker_function(resolution, center, width):
    x = np.linspace(0, resolution - 1, resolution)
    x = ((2 / ((np.sqrt(3 * width) * np.pi ** 1 / 4)))
         * (1 - ((x - center) ** 2 / width ** 2))
         * np.exp((-(x - center) ** 2) / (2 * width ** 2)))
    return x
Discrete sub-sampled Ricker (Mexican hat) wavelet
dataset/ETHPy150Open scikit-learn/scikit-learn/examples/decomposition/plot_sparse_coding.py/ricker_function