The Ricker wavelet (Mexican hat) is widely used in synthetic seismic simulation. While SciPy offers a basic generator, this package provides a shifted, causal Ricker wavelet with configurable peak location — ready for seismic modelling.
pip install rickergit clone https://github.com/lijunzh/ricker.git
cd ricker
uv sync --all-extras --devimport matplotlib.pyplot as plt
from ricker import ricker
wavelet = ricker(f=25, duration=0.2, dt=0.001, peak_loc=0.1)
plt.plot(wavelet)
plt.title("25 Hz Ricker Wavelet")
plt.show()ricker(f=10, duration=0.5, dt=0.002, peak_loc=0.25)| Parameter | Type | Default | Description |
|---|---|---|---|
f |
float | 10 | Centre frequency (Hz) |
duration |
float | 0.5 | Signal length (seconds) |
dt |
float | 0.002 | Sampling interval (seconds) |
peak_loc |
float | 0.25 | Peak location (seconds) |
uv run ruff check src tests # lint
uv run ruff format src tests # format
uv run pytest # test
uv run pre-commit install # set up git hooksFor issues, please open a GitHub issue or contact gatechzhu@gmail.com.