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

Modify code to handle non-standard and time-varying component orientations #95

Merged
merged 13 commits into from
Jan 19, 2025

Conversation

ShangqinHao
Copy link

Thank you for providing this package, which has significantly improved the efficiency of my PRF processing.

I made two changes in this pull request:

  1. Correction to SAC Header cmpinc Calculation
    The relationship between the dip defined in the SEED standard and the SAC header cmpinc should be cmpinc = dip + 90 rather than the previously assumed cmpinc = −dip. While this error does not impact data using standard NEZ components, it becomes significant when rotating non-standard components to NEZ, where correct "dip" values are required. To address this, I modified the rotateZNE function in eq.py and the _add_header function in rf.py.

  2. Handling Time-Varying Component Orientations
    The original _add_header function could not correctly process stations with component orientations that vary over time (e.g., station II.MSVF). I updated this function to determine the appropriate orientation based on the correct time period for each station.

I tested the updated code using station II.MSVF, which has non-standard and time-varying component orientations:

ch.start_date, ch.end_date, ch.azimuth, ch.dip:
1994-05-24T00:00:00.000000Z 2002-06-05T23:59:59.000000Z 180.0 0.0
2002-06-06T00:00:00.000000Z 2007-06-15T23:59:59.000000Z 180.0 0.0
2007-06-16T00:00:00.000000Z 2008-05-12T23:59:59.000000Z 180.0 0.0
2008-05-13T00:00:00.000000Z 2010-07-21T23:59:59.000000Z 180.0 0.0
2010-07-22T00:00:00.000000Z 2013-01-17T23:59:59.000000Z 180.0 0.0
2013-01-18T00:00:00.000000Z 2013-10-05T05:24:59.000000Z 169.8 0.0
2013-10-05T05:25:00.000000Z 2016-10-16T23:59:59.000000Z 169.8 0.0
2016-10-17T00:00:00.000000Z 2018-03-06T19:59:59.000000Z 169.8 0.0
2018-03-06T20:00:00.000000Z 2022-06-16T03:29:59.000000Z 169.8 0.0
2022-06-16T03:30:00.000000Z 2022-08-06T23:59:59.000000Z 169.8 0.0
2022-08-07T00:00:00.000000Z None 67.1 0.0

Thank you for reviewing this pull request, and I look forward to your feedback!

@xumi1993 xumi1993 changed the base branch from master to dev January 19, 2025 01:57
@xumi1993
Copy link
Owner

Hi Shangqin,
Great to hear from you. Thanks for your improvement on Seispy. These changes are very important for the efficiency of RF calculations. But I have changed the branch to dev. I'll merge all changes from dev to master at the next version.

@xumi1993 xumi1993 merged commit 02debc2 into xumi1993:dev Jan 19, 2025
1 of 3 checks passed
@ShangqinHao
Copy link
Author

Got it. I will submit a pull request to your dev branch the next time I modify the code.

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

Successfully merging this pull request may close these issues.

2 participants