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

Rotate stream to uvw #1992 and #2372 #2397

Open
wants to merge 12 commits into
base: master
from

Conversation

Projects
None yet
1 participant
@LMurrayBergquist
Copy link
Contributor

commented May 10, 2019

This pull request adds a method to stream.rotate so that streams can be rotated from any coordinates to UVW coordinates. It also fixes an issue in stream.rotate where previously if stream.rotate failed, the stream would be emptied, this has been adjusted so that if there is an error, the stream is not returned empty.

This pull request was initiated to fix issues #1992 and #2372 so that it will be possible to use stream.rotate to rotate to UVW coordinates, and so that if an error occurs while a stream is being rotated it is not emptied.

PR Checklist

  • Correct base branch selected? master for new features, maintenance_... for bug fixes
  • This PR is not directly related to an existing issue (which has no PR yet).
  • If the PR is making changes to documentation, docs pages can be built automatically.
    Just remove the space in the following string after the + sign: "+ DOCS"
  • If any network modules should be tested for the PR, add them as a comma separated list
    (e.g. clients.fdsn,clients.arclink) after the colon in the following magic string: "+TESTS:"
    (you can also add "ALL" to just simply run all tests across all modules)
  • All tests still pass.
  • Any new features or fixed regressions are be covered via new tests.
  • Any new or changed features have are fully documented.
  • Significant changes have been added to CHANGELOG.txt .
  • First time contributors have added your name to CONTRIBUTORS.txt .

LMurrayBergquist added some commits Apr 6, 2019

Add method uvw to obspy/core/stream.py
adds a way to rotate from any coordinates to uvw, not complete yet.
Fix #2372 Exception in stream.rotate() emptying stream
It was pointed out in issue #2372 that if an Exception is raised in stream.rotate("->ZNE") the original stream was emptied, this has been changed so that if an exception is raised the stream will still contain the unrotated traces.
Update of test_stream.py
Update of test stream, however still does not work as no inventory input.
Update Test and edit Stream
Creates an inventory file for the test to use, edits to the test to check why it is failing.
Update to test_stream
Added "components='UVW'" argument to ANE_st=st1.rotate(method='->ZNE', inventory=inv, components='UVW'). Also changed from using rotate2zne (which outputs a tuple) to using st.rotate(method='->ZNE') as this outputs a stream which can be used in st.rotate(method='->UVW').
Update obspy/core/stream.py
Removes a "trailing white space" that was flagged in the circleci test.
Update obspy/core/stream.py
Missinterpreted one of the fails in circleci and made a test fix, this is just to undo that.
Revert "Commits changes that were fetched from origin into this branc…
…h, deletes a lot of files in io/sac/tests"

This reverts commit c2aaa35.
@LMurrayBergquist

This comment has been minimized.

Copy link
Contributor Author

commented Jun 7, 2019

@megies I rebased and fixed the circleci problems in the files that I had changed, the circleci test is still failing so should I go through and fix problems in the other files that weren't me? I wasn't sure if doing that might cause more issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.