I was working on the zero-phase Ricker wavelet.
Chances you were working on the "linear-phase" wavelet. Assuming a real input, zero-phase requires time symmetry, i.e. $x[-n] = x[n]$. If you just take the wavelet (which is centered around $N/2$) and apply an FFT you get a linear phase behavior.
How can I solve that problem?
Two suggestions:
- Circularly shift the time domain wavelet before the DFT. Recall that the DFT is periodic, i.e. $x[-n] = x[n]$ is equivalent to $x[N-n] = x[n]$
- Apply the the circular shift in the frequency domain after the DFT by multiplying with $e^{j2\pi \frac{N}{2} \frac{k}{N_{FFT}}}$
Exact details depend a bit on whether the length of the wavelet is odd or even.