-
Notifications
You must be signed in to change notification settings - Fork 529
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
writing catalog to NLL obs doesn't handle 12 (etc) channels properly #3223
Comments
2nd issue that is a bit more serious but also an easy fix in the same file... obspy is reading in the phase information in hyp files incorrectly. For example, the top two lines correspond to the given arrivals.
The distances, residuals, and weights have been jumbled. Possibly obspy is following an older format version of NLL HYP file (e.g. v6? I'm using v7) In any event the following three changes in core.py produces the expected results
continuing my deep dive into this (previously I was converting these all by hand!) so possibly more to come |
Regarding the first issueI totally agree, this probably should be changed to just use the last character of channel code unchanged. Looking at NLLoc docs, I probably was confused by Actually, I'm looking at some of our test files from @claudiodsf ( Probably just make it: component = wid.channel_code or "?" -- Regarding the second issuewell yeah, thats just very unfortunate to change the NLLOC hyp file format which is free form whitespace separated values in a breaking fashion. There apparently was one value added in the middle of the phase lines ( Original
New (NLL_FORMAT_VER_2 ?)
Is there a way to tell from the file that it is "version 2"? Can you post one of your hyp files? If yes, then we can determine the indices of items on the phase lines from it, if not we might have to check at what position in the line this magic ">" separator is positioned to judge from that what indices to look at. |
yep i was afraid of that... I did post the ver2 hyp file above, it's easy to miss https://github.com/obspy/obspy/files/10028900/last.hyp.txt if V2 has more elements i suppose that is one tell |
I guess we could check the NLLoc version as stated in the SIGNATURE line, I think it should always be there. But then we would need to check at what exact nonlinloc version this changed.. to be honest, I'd probably check if |
agree, probably easiest and fastest to |
Avoid duplicates
Bug Summary
Noticing that when one exports a catalog object to NLL's obs format, it converts any channel outside of
ZNEH
to a?
. Not really an issue as NLL still handles it fine.e.g. obspy/io/nlloc line 400 or so
However when reading NLL's output
.hpy
file back in, this (presumably horizontal) channel is now converted toN
which then becomes a problem if the station's actual channels are12
.It seems like a trivial fix to change
if component not in "ZNEH"
to at leastZNE123H
(or evenZNE123HABCUVWTR
?) unless I am missing something. I know NLL will handle 123 but not completely sure about the more esoteric channels.Code to Reproduce
No response
Error Traceback
No response
ObsPy Version?
1.3.1.post0+390.g3ad5eee621.obspy.master
Operating System?
No response
Python Version?
No response
Installation Method?
developer installation / from source / git checkout
The text was updated successfully, but these errors were encountered: