PSPicker, a matlab tool for automatic phase picking and event location
function made to compute the enveloppe of an array, and smooths by a selected time window
Input:
f: array
smooth: number of samples for smoothin
type: ‘maxi’ or ‘mini’
Output:
f_out: smoothed envelope