File Exchange

image thumbnail

An automated P-phase Arrival Time Picker with SNR output

version 6.0.2 (1.5 MB) by Dr. Erol Kalkan, P.E.
PPHASEPICKER is a powerful tool for automatically picking P-phase onsets.


Updated 03 Apr 2019

View Version History

View License

PPHASEPICKER is a powerful tool for automatically picking P-phase onsets with high precision without requiring detection interval or threshold settings. The algorithm detects P-phase onset in single-component acceleration or broadband velocity records using the histogram method. It also computes signal-to-noise ratio (SNR).

PPHASEPICKER has been integrated into the “Automated Processing and Review Interface for Strong Motion Data (PRISM)” software ( of the U.S. Geological Survey in order to identify pre-event time-window for systematic and automated processing of large numbers of strong-motion data.

An example MatLAB code is provided in zip file to show how to run PPHASEPICKER using three sample waveforms, one from strong earthquake and others from micro seismic events.

For your intended application, please note that filter corner frequencies may need to be updated manually within the code based on the frequency content of the input record.


Kalkan, E. (2016). “An Automatic P-phase Arrival Time Picker“, Bull. of Seis. Soc. of Am., 106(3): 971-986, doi: 10.1785/0120150111.

Cite As

Dr. Erol Kalkan, P.E. (2021). An automated P-phase Arrival Time Picker with SNR output (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (13)

Dr. Erol Kalkan, P.E.

Hi Wei, yes. That's correct. You can see the whole formulation for different energy terms from my paper:


I wonder the formula codes of the reative input energy、reative kinetic energy and elastic strain energy as follows:
Ed = cumsum(2*ksi*omegan*vel.^2); % viscous damping energy
Edi = 2*ksi*omegan*vel.^2; % power of viscous damping energy

thank you!

Sid Albert

Thank you for the quick reply Erol. Looks like the first part of your reply was not posted.

I meant Sid. Sorry for the typo.

Sid Albert

I wonder if anyone knows of available tools to convert SEGY data to a format suitable to input into PhasePicker.

Dr. Erol Kalkan, P.E.

That's a good comment. Note that background noise always exists in the signal itself too so it is not possible to say P-phase onset is the cutoff between noise and seismic signal. It is a cut-off between noise and noise+seismic signal. Even if you filter out the signal based on FAS of the noise, you still remove part of the seismic signal within the same passband. Nonetheless, I will include your suggestion into the code as short window SNR output. Thanks...

michele paoletti

Erol in part where you Compute SNR, you take:
but x is all signal (noise first and signal then). I think that is necessary select only seismic wave signal without noise for example using a window centered in ppicking time (that suppose is named Tm) and taking 2 second after this value and 1 second first this value (using a window of width 3s). So the signal window will be [Tm-1s;Tm+2s].

Dr. Erol Kalkan, P.E.

I just completed a new algorithm to pick both P- and S-phases. It is now in MatLAB FEX.

michele paoletti

This algorithm no find the time value when p-phase end, and the s-phase pick. How find them? Thanks.

michele paoletti

Dr. Erol Kalkan, P.E.

Thank you! I have included a link above for download of the paper.

Pritesh Bhoumick

Hello, would it be possible for you to email me your paper - “An Automatic P-phase Arrival Time Picker“, mentioned in the reference section to - "". I would really like to read it.

Zhichao Yu

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!