adjtomo / pysep

Seismogram Extraction and Processing: Seismic data retrieval and record sections
https://pysep.readthedocs.io
MIT License
29 stars 15 forks source link

Inconsistent kztime in SAC Headers affecting Moment Tensor Inversion in MTUQ #147

Open Aayushi-10 opened 1 week ago

Aayushi-10 commented 1 week ago

I am encountering an issue while downloading data with PySEP for the networks 8H, 7B, and 5C. The kztime in the SAC headers for all the station differs, which is causing difficulties in performing moment tensor inversion using the downloaded data.

I utilized the following file for data extraction: https://github.com/Aayushi-10/Test/blob/main/2016-12-12T220444_HINDU_KUSH.yaml

And the following file for conducting the MTUQ inversion: https://github.com/Aayushi-10/Test/blob/main/HinduKush_Sample.py

This is the error which I’m facing:

Screenshot (447)

bch0w commented 4 days ago

Hi @Aayushi-10, is this related to #146?

kztime is not explicitly set in PySEP and is built from tr.stats.starttime - tr.stats.sac.b (from here: https://github.com/obspy/obspy/issues/163). PySEP sets b here (https://github.com/adjtomo/pysep/blob/master/pysep/utils/cap_sac.py#L188), so kztime should just be the event origin time.

Can you provide log files for your PySEP data download for one station? That might help diagnose the issue.