The problem is, I have no idea how to identify and isolate them correctly. I’ve tried using some baseline shift correction methods, but they don’t work well for ‘symmetrical’ signals like seismic signals. I’ve tried using remove_response but I don’t have the information whether the hardwares recorded the amplitude as acceleration/velocity/displacement. I tried a code from and although it’s the most straightforward as far, it got wrong a lot when detecting if the waveforms have or have no distortions. All in all, my attempts ended up having more ‘normal’ waveforms getting wrongly detected like the above waveforms. These are my attempts so far. tester9part1zhang.py (715 Bytes) tester10part2beads.py (1.3 KB) tester10part3median.py (716 Bytes) tester11part1responses.py (1.8 KB) tester13part1glitches.py (2.1 KB)
Thank you some much for any help you can give me.
You could try template matching, i.e. use one of the glitches as a template and use it for cross correlation. Its nested into the coincidence trigger, but you can just use the one station and set the target coincidence sum to 1.0.
Edit: I forgot how it was implemented, you can set a higher coincidence sum that is unreachable actually and just let it declare an event based on the similarity alone.
Thanks for the suggestion. I tried to use coincidence_trigger within the script below. Unfortunately, I got an error on that function, which pointed to nlta being longer than `len(data).
Traceback (most recent call last):
File "…\tester18part1.py", line 30, in <module>
trig = coincidence_trigger(
^^^^^^^^^^^^^^^^^^^^
File "…\latsar\Lib\site-packages\obspy\signal\trigger.py", line 715, in coincidence_trigger
tr.trigger(trigger_type, **options)
File "…\latsar\Lib\site-packages\decorator.py", line 235, in fun
return caller(func, *(extras + args), **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "…\latsar\Lib\site-packages\obspy\core\trace.py", line 282, in _add_processing_info
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "…\latsar\Lib\site-packages\obspy\core\trace.py", line 1640, in trigger
self.data = func(self.data, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "…\latsar\Lib\site-packages\obspy\signal\trigger.py", line 189, in classic_sta_lta
raise Exception('ERROR %d stalta: len(data) < nlta' % errcode)
Exception: ERROR 1 stalta: len(data) < nlta
I got no idea where nlta came from, nor how to fix this error. tester18part1.py (1.0 KB)