-
Notifications
You must be signed in to change notification settings - Fork 32
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
How to use nonlinloc with obspyck? #11
Comments
Ok I get as far as making picks with warning messages
then after pressing "do NLloc" I get error below. Not sure if it's a problem with my NLloc setup. Any suggestions?
|
Huh, looks like you're on MAC. I remember there were problems with the checking when the subprocess is finished and the the program should continue. @jwassermann, is it working on MAC for you right now? Can you have a look into your EDIT: To be more precise, these lines have sometimes made problems on MAC: https://github.com/megies/obspyck/blob/master/util.py#L711-L714 As I don't use MAC I never was able to perfectly fix that.. all I can say right now is that you could play around with those to change how the waiting for subprocess to finish is handled. Let me know how it goes, I hope @jwassermann is able to help out.. |
@c546824, what you could do in the meantime is to check if the rest that comes after this problem works for you..
|
|
Yes, given that |
Thought i'd move my questions to this forum rather continue in private e-mails (I've been e-mailing you as Abraham Jones, Tobais). I'm operating on a Linex machine and have been trying to run a provided sample location, but come across the same error as user c546824 once i've made picks and hit 'do NLLoc':
I feel that the error lies in calling the I looked in I am however able to produce a location by manually running NLLoc on the
I'm unsure how to use this location back in the GUI however, as i don't see any change to show that a location has been produced. |
Can you post a directory listing (e.g. |
Before clicking:
gives (after recursively cleaning up files as you suggested)
|
After clicking
|
The following files no longer seem to be in the tmp directory after clicking "do NLLoc"
|
Now, I run; abe@AGOS1:/tmp/obspyck-dgi2EN/nlloc$ ./NLLoc locate_RH.nlloc
then: abe@AGOS1:/tmp/obspyck-dgi2EN/nlloc$ ls -l |
First, I'd recommend removing all of NonLinLoc related source/binary files, it's completely confusing with this long list of files. You really only need Then, like I wrote before..
..your binary needs to be renamed or you can also put a symlink in there, for obspyck to find the file..
That's normal, I'm cleaning out files after location run, so that later there can be no confusion with outdated input files. |
Then remember that you need to modify the coordinate conversion to fit your needs.. https://github.com/megies/obspyck/blob/master/util.py#L818 |
We have success! Putting a symlink in the |
Yep, for focmec you need some other bash script to handle the program calls as well. Maybe open another issue here about it when you want to try it? |
Hi Tobias, I am sorry for any inconvenience I might cause, but I 'd like to wonder about one more thing. Is there an option to pass the existing NonLinLoc solution from a local file to the Obspyck for the corresponding event (similar to passing the event information as --event myevent.xml), so that the takeoff angles, phases and azimuths are somehow parsed to be passed to FocMec ? Best regards, Anton. |
Sorry, that's some really strange use case.. You are using obspyck to pick data, then do nonlinloc externally and then want to load the event into obspyck to run focmec?? I would say either do nonlinloc also from inside obspyck or just do focmec with the output data of obspyck? Note that obspy can read nonlinloc output into a catalog object. http://docs.obspy.org/packages/obspy.nlloc.html?highlight=nlloc#obspy.nlloc |
Hey Tobias, The use-case is a bit different, as picks were picked by some other in-house software. Using obspy, I have managed to convert the picks from nlloc files into QuakeML. However, nonlinloc omits the information about the channel and location / network codes, so they can't be easily visualized in the obspyck, as ObsPyck does not know which channel assign the picks on. Eventually, I 'll end up using focmec separately, but it would be good to have the pick visualization in the obspyck from the external nonlinloc file / converted QuakeML. |
Well, if you parse some nonlinloc output file and write to QuakeML why not insert the correct network/location codes (you should know them I suppose). If you don't know the channel, why not just insert the channels you want to llok at (e.g. Z for P and N for S)? |
I'm having a similar error as AbeJones except that I can't seem to get my 'Missing pick error message' to go away: /var/folders/z6/2x3y1cqs6xd75sx8ztzsfdnm002t75/T/obspyck-FV1Kt4/nlloc/nlloc* Traceback (most recent call last): I've set pick errors (e.g., I+1) in the GUI window then press do_NLLoc with the BY option selected. Note I'm on a mac. I have not investigated the subprocess issue yet that you mentioned above. I have my setup as you described at the top of this thread. Note that I'm using the example global config file from nlloc_global_sample (neic_global.in) with the taup/ak135 HDR and buf files and without including the sta_list_neic.in file in the config file. Do you have an example config file that works with the EXAMPLE 1 stations? I figured the default global config file should work with just about any station. I have never used nlloc so there may be obvious things I'm overlooking. Do you know what the issue might be? Thanks! EDIT: If it helps when I run ./nlloc locate_BY.nlloc in my /tmp directory I get the following output NLLoc (NonLinLoc v6.00.0 18Mar2011) |
Note I was able to make the missing pick error messages go away by adding error bars to the picks with a right click. I'm still having issues with the IOError: [Errno 2] creating the nlloc.hyp file. |
Using the verbose mode in the config file I get the following: ./NLLoc__Darwin__64bit locate_BY.nlloc ... Reading observation file ./nlloc.obs Reading next set of observations (Files open: Tot:2 Buf:0 Hdr:0 Alloc: 0) ... ... 4 observations read, 4 will be used for location (./nlloc.20110311.055446). Applying Octtree search within Grid 0: Station Density Weight: Number Force Divide: 27332 max_num_nodes: 50000 I found however that the config file in my /tmp folder is not the one that I use to in my plugin_dir/nlloc directory? |
Looks like you're getting pretty far with nonlinloc, the segfault probably has to do with the values you used when compiling NonLinLoc..?
The temporary directory should be a copy of your plugin_dir.. so it seems strange that some files are not the same..? @klaaur, I'm not sure how to help right now, what is the problem you're stuck with right now? I kind of lost track of your problem.. |
@megies My current problem is getting nlloc to finish running with my locate_BY.nlloc file. I'm using the default neic_global.in file from the nlloc examples with the sta_list.neic.in file. I've selected a few stations to get picks from that are included in the station list file, I select the P-picks and the error bars, then click on the doNLLoc button and obtain the following error: Warning: SeisHub specific features will not work (e.g. 'send Event'). <subprocess.Popen object at 0x124065610> --> NLLoc finished I get the first phase output and the NLLoc finished print out but I don't get any of the location information or the focmech solution. Do you have a configuration file that works with the EXAMPLE1 stations in the default ~/.obspyckrc file? Or another NLLOC config file that works with stations and events I could test out my configuration with and pull data from the FDSN server? I'm struggling to find out where my issue is? As I mentioned this is my first time using NLLOC so there could be something simple that I'm overlooking. For example, does the global NLLOC version require that I recalculate the AK135 travel grid? I have the default ak135 HDR and buf files from the global nlloc example. Or would I need to specify that somewhere in obspyck? EDIT: If it helps I've attached my locate_BY.nlloc file. I made it have a .txt extension for the purposes of attaching it in a supported github attachment. |
Update: I have nlloc working now. I went back through the global sample run and retested it with the default files then re-ran in my /tmp directory. Once I got that working I was able to repair my link issue that was causing the wrong input file to be utilized. Now there's a map issue: --> NLLoc finished no station magnitudes (or all deselected), nothing to do... |
Are you feeding waveforms via local files? Or via fetching from servers? Looks like metadata is missing.. |
I'm fetching data from servers |
FDSN, I guess? Are there any error messages up until obspyck window pops up? Because, coordinates should be attached for FDSN servers correctly, see https://github.com/megies/obspyck/blob/master/util.py#L458-L474 |
There aren't any errors to suggest the metadata wasn't being obtained. What I didn't realize was that the default obspyckrc has 'no_metadata' set to true. Updating this variable to false fixed the issue. Thanks. |
Really? Are you sure? I think it should have it set to Good to hear you got it working now. I just an't seem to find the time do do a proper polishing of the whole plugin stuff and proper documentation / example use case for nonlinloc.. |
I must've changed it while doing some other tests, but once I changed it back to false I was able to get the information necessary for the showMap feature. Thanks for your help in this. When you do get around to it it might help to have a working global example and a local example, if possible. Or an example that works with your EXAMPLE1 stations in the .obspyckrc file. I think it would help users immensely get everything up and running. Thanks again. I have a few other issues I'm running into that I'll post into other issue threads. |
After nlloc has finished running, the 'show Map' feature is toggled. Could you explain what's being shown in the 3 small graphs in the top right corner? Thanks |
That's a view of the nonlinloc scatter file: http://alomax.free.fr/nlloc/soft6.00/formats.html#_location_scat_ |
try the following:
"locate_BY.nlloc"
generated with nonlinloc from your velocity models) in a subfolder
of "nlloc" folder
the following:
LOCFILES ./nlloc.obs NLLOC_OBS ./AAA/BBB ./nlloc
cubes
(e.g. put "VERSION3" for cubes named like e.g.
"VERSION3.P.UH1.time.buf", for a P travel time cube for station UH1)
it to the folder where your obspyck.py is with the "nlloc" subfolder.
Please simply create empty
hyp_2000
andfocmec
directories in your designated obspyck pluginpath directory.The text was updated successfully, but these errors were encountered: