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

Data extraction issue for 8H and 9H networks #146

Open
Rinku-274 opened this issue Sep 20, 2024 · 2 comments
Open

Data extraction issue for 8H and 9H networks #146

Rinku-274 opened this issue Sep 20, 2024 · 2 comments

Comments

@Rinku-274
Copy link

I am experiencing an issue with Pysep while downloading data for stations in the 8H and 9H networks. Despite setting seconds_before_ref: 100 and seconds_after_ref: 300 in the .yaml file, the extracted data starts earlier than -100 seconds from the reference time. Additionally, when viewed in SAC, the event appears to occur before the origin time for some stations, which is incorrect.

This problem is specific to the 8H and 9H networks, while other stations behave as expected. The input DOC
file and SAC output image for a particular station are attached.
2016-12-12T220444_HINDU_KUSH.docx
Issue_pysep

@bch0w
Copy link
Member

bch0w commented Oct 1, 2024

Hi @Rinku-274, thanks for bringing this issue. It's slightly concerning that this is happening only for certain networks while other stations are behaving as expected, that makes me think it's a data/metadata issue for 8H and 9H networks, rather than a PySEP issue, since some things are working as expected. Is there any information in the log file that suggests PySEP is shifting the origin time? Also can you point me towards a specific station where this is working? It would be useful to see the comparison between them.

@casarotti
Copy link

I think there is a problem with the SAC header construction.

here

self.st = append_sac_headers(self.st, self.event, self.inv)

pysep constructs the SAC header (before the trim), which means that it calculates the B value from the stream start time

here

self.st = self.preprocess()

pysep calls the preprocess routine and trims the waves, setting the new stream start time.

Then it writes the SAC files (with the new start time and the previously defined header).

When the SAC file is read back, OBSPY takes into account the start time (defined by the trim) and the B value, and adjusts nzsec, nzmsec.
which will be used later to create the origin time.

So the origin time is modified in the sac files

If you agree with this analysis, I can submit a commit where the SAC header definition comes after the trim.

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

3 participants