#NEWLINE# def ricker_function( resolution , center , width ) : #NEWLINE# #INDENT# 'Discrete sub-sampled Ricker (Mexican hat) wavelet' #NEWLINE# x = np . linspace ( 0 , ( resolution - 1 ) , resolution ) #NEWLINE# x = ( ( ( 2 / ( ( np . sqrt ( ( 3 * width ) ) * ( np . pi ** 1 ) ) / 4 ) ) * ( 1 - ( ( ( x - center ) ** 2 ) / ( width ** 2 ) ) ) ) * np . exp ( ( ( - ( ( x - center ) ** 2 ) ) / ( 2 * ( width ** 2 ) ) ) ) ) #NEWLINE# return x