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
Fixes for Seisan + Nordic files: parsing of int16 waveform files, edge cases in event files, compact event files #3287
base: maintenance_1.4.x
Are you sure you want to change the base?
Conversation
…high-acc lines without content
…e.g. int16 vs int32
for id_line, tag in id_lines: | ||
event_id = id_line.split('ID:')[-1].split(' ')[0].strip('dSLRD') | ||
break | ||
event.extra = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now this might be the only instance setting anything on extra
but that might change.. might be safer to do something like
extra = event.setdefault('extra', {})
extra['nordic_event_id'] = ...
try: | ||
header = sorted(tagged_lines['7'], key=lambda tup: tup[1])[0][0] | ||
except IndexError: # Compact catalog file without picks?! | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be OK but indexing is used 4 times on that line, so it might or nmight not be too "catch all" of an exception handling? Up to you though, I don't know the details here too much.
I don't know this format at all, so I only have a few comments after briefly looking at this. Otherwise it's looking good to me (again without knowing or using that format). Two things to consider though:
|
Thanks a lot for the review! |
What does this PR do?
Why was it initiated? Any relevant Issues?
This PR takes care of some additional, rather rare edge cases for reading of Seisan waveform files and Nordic event parameter files. There were not related open issues that this PR resolves.
I realize this PR now combines a few more commits than I originally anticipated, so sorry for that. Let me know if you'd rather have it split up.
PR Checklist
master
for new features,maintenance_...
for bug fixesno_ci
label can be added to skip CI builds[ ] If the PR is making changes to documentation, docs pages can be built automatically.Just add the
build_docs
tag to this PR.Docs will be served at docs.obspy.org/pr/{branch_name} (do not use master branch).
Please post a link to the relevant piece of documentation.
[ ] If all tests including network modules (e.g.clients.fdsn
) should be tested for the PR,just add the
test_network
tag to this PR.[] Any new or changed features are fully documented.CHANGELOG.txt
.[ ] First time contributors have added your name toCONTRIBUTORS.txt
.from all the CI builds look correct. Add the "upload_plots" tag so that plotting
outputs are attached as artifacts. ~
[ ] New modules, add the module toCODEOWNERS
with your github handleready for review
label when you are ready for the PR to be reviewed.