Skip to content

lijunzh/ricker

Repository files navigation

Ricker Wavelet Generator

PyPI version License Python versions CI/CD

Introduction

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.

Installation

From PyPI

pip install ricker

From source (development)

git clone https://github.com/lijunzh/ricker.git
cd ricker
uv sync --all-extras --dev

Quick Start

import 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()

API

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)

Dependencies

Development

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 hooks

Contact

For issues, please open a GitHub issue or contact gatechzhu@gmail.com.

About

Seismic synthetic signal using Ricker wavelet (Mexican hat) with controlable length, peak frequency, and peak location.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages