obspy.signal.trigger.trigger_onset
- trigger_onset(charfct, thres1, thres2, max_len=9e+99, max_len_delete=False)[source]
Calculate trigger on and off times.
Given thres1 and thres2 calculate trigger on and off times from characteristic function.
This method is written in pure Python and gets slow as soon as there are more then 1e6 triggerings (“on” AND “off”) in charfct — normally this does not happen.
- Parameters:
charfct (NumPy
ndarray
) – Characteristic function of e.g. STA/LTA triggerthres1 (float) – Value above which trigger (of characteristic function) is activated (higher threshold)
thres2 (float) – Value below which trigger (of characteristic function) is deactivated (lower threshold)
max_len (int) – Maximum length of triggered event in samples. A new event will be triggered as soon as the signal reaches again above thres1.
max_len_delete (bool) – Do not write events longer than max_len into report file.
- Return type:
List
- Returns:
Nested List of trigger on and of times in samples