Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error reading SAC files local network #284

Open
indraPLM opened this issue Nov 21, 2024 · 5 comments
Open

Error reading SAC files local network #284

indraPLM opened this issue Nov 21, 2024 · 5 comments

Comments

@indraPLM
Copy link

Dear All,

I am newbie for using MTUQ software. I interest to use MTUQ to estimate moment tensor crustal earthquake magnitude ranging from4 to 5.5 . I tried to use SAC files seismic records from our local seismic network. Unfortunately, it's seem I get problem in reading the SAC files. Here is the error message:
(mtuq) sysop@sysop:~/mtuq/examples$ python SerialGridSearch.DoubleCouple.py
Reading data...

Traceback (most recent call last):
File "/home/indra/mtuq/examples/SerialGridSearch.DoubleCouple.py", line 137, in
data = read(path_data, format='sac',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/indra/mtuq/mtuq/init.py", line 95, in read
return _readers()[format](path, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/indra/mtuq/mtuq/io/readers/SAC.py", line 79, in read
assert preliminary_origin==_get_origin(stream, event_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError

Meanwhile, when I only use single station SAC File, the SerialGridSearch.DoubleCouple.py run well and could process for obtaining green function.
Hopefully, I could get advise and suggestion to fix the problem.
Warm Regards

Indra Gunawan

@rmodrak
Copy link
Member

rmodrak commented Nov 21, 2024

@indraPLM,

It looks like the assertion is a sort of sanity check of the hypocenter and origin time metadata present in the SAC headers. The idea is to check that waveforms from two different events are not accidentally being used in the same inversion. Aside from this sanity check, the SAC origin headers are not actually used by MTUQ.

After double checking that you are reading in the correct SAC files, I would feel free just to comment out this assertion.

(I could imagine different scenarios that would give rise to false positives, e.g. origin headers are present for some SAC files but absent for others. As a result, we might consider raising a warning rather than an error?)

Best regards
Ryan

@indraPLM
Copy link
Author

Dear Ryan,

Really, I don't know well, how to fix the problem.
I already compared SAC header from our SAC Files with data/example/2009040720125535. It seems all features in SAC header are available.
Here I attached our SAC files, perhaps you could try.

Warm Regards
Indra Gunawan
20221121062110565.zip

@rmodrak
Copy link
Member

rmodrak commented Nov 22, 2024 via email

@indraPLM
Copy link
Author

indraPLM commented Nov 22, 2024

Ok I get it. It seem reading SAC files and mtuq are running well.

Thank you so much.

@rmodrak
Copy link
Member

rmodrak commented Nov 22, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants