As the title shows, I want to define my own continuous wavelet by Python. However, I don't know how to achieve this exactly.
The formula of my wavelet mother function is below
It looks something like the Mexican hat wavelet, but they are different.
So how can I define such a custom wavelet by Python, then CWT can be performed using this wavelet?

Per this you need a function that takes a number of points and a scale to provide as a
waveletargumentSo we define it as such:
Let's test it. We note that in fact something that looks very similar to yours is available. The difference is in scaling
aand also the constant is front looks slightly different. Notemath.sqrt(2)scaling for the Ricker waveletHere is the graph: