I have been writing Seispy when I was a master student. At first, I wanted to calculate Receiver Functions in Python, but there is no suitable toolkit. Fortunately, The obspy provided mounts of APIs for processing seismic data, so I ported codes for calculating Receiver Functions from Matlab to Python. Today increased functions have been added to Seispy to further process seismic data over than Obspy.

Install Seispy

Install Dependencies To use this module you will need to have Python3 and some thired party module installed. obspy (Numpy, Scipy and matplotlib included) netcdf4 pandas Install Seispy Now download and install Seispy

Calculate a P-wave Receiver Function (PRF)

0. Download SAC files for this example Download SAC files Download and unzip this .tar.gz file, which include three SAC files. 1. Import corresponding modules import obspy import seispy import numpy as np import matplotlib.

Calculate PRFs for a station

1. Perpare seismic records order by stations Seismic data should be trimed according earthquakes, including direct P arrival. Meanwhile, the data should be order by stations instead of events. For example, YN001 and YN002 are stations the SAC files are data of events recorded by these stations.

Stack PRFs by Common Conversion points (CCP) method

This note will introduce how to stack PRFs by CCP method in two steps. 1. Convert PRFs from time axis to depth axis according to 1D velocity model. 2. Search and stack amplitudes in each bin with calculated pierce points falling in.