triggerOnset method of
Trace objects uses the numeric vector returned by
STALTA "first break picking" method and a user selected threshold to determine the
arrival time of a seismic event.
triggerOnset(x, picker, threshold, index)
results from applying the
optional numeric value of the threshold at which triggering should occur
optional logical to return the index (rather than the time) of event onset (default=
This method simply identifies the point at which the
picker first rises above the
threshold is supplied, an appropriate value is calculated from the picker with:
threshold <- quantile(picker,0.999,na.rm=TRUE).
A single value is returned identifying the onset of the seismic event or
NA if none is detected.
The returned value wil be a
POSIXct time by defult or a numeric index if
The appropriate value for the threshold will depend upon the exact STA/LTA algorithm used and the noise level in the signal.
Jonathan Callahan email@example.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
# Open a connection to IRIS DMC webservices iris <- new("IrisClient") starttime <- as.POSIXct("2010-02-27 06:00:00",tz="GMT") endtime <- as.POSIXct("2010-02-27 09:00:00",tz="GMT") # Get the waveform st <- getDataselect(iris,"IU","ANMO","00","BHZ",starttime,endtime) tr <- st@traces[] picker <- STALTA(tr,3,30) # Identify the onset of the event to <- triggerOnset(tr,picker) plot(tr) abline(v=to, col='red', lwd=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.