megies / obspyck

ObsPyck is a GUI application that is intended to cover the tasks in a standard analysis workflow for seismic events in seismological observatory practice.
https://github.com/megies/obspyck/wiki
GNU General Public License v2.0
61 stars 32 forks source link

How to use obspyck with local files (waveforms/metadata)? #10

Closed megies closed 9 years ago

megies commented 9 years ago

EDIT: N.B.: Local files are now (esp. after merging #18) not provided by a command line option but as any non-options, i.e. command line arguments left over after parsing options. Files will be autodetected as waveforms and station metadata.

E.g.

$ obspyck -s MAGS2 -o 60 -d 120 -t 2016-06-22T09:20:00 /tmp/event.mseed /tmp/dataless/*

See also #23.

try "obspyck.py --help":

-f FILES, --files=FILES Local files containing waveform data. List of absolute paths separated by commas --dataless=DATALESS Local Dataless SEED files to look up metadata for local waveform files. List of absolute paths separated by commas

so.. something like

~~obspyck.py -f /path/to/file1.gse,/some/path/file2.mseed --dataless /path1/my_stations1.dataless,/path2/my_stations2.dataless~~

etc. should work..

megies commented 9 years ago

You always need to specify option time "-t" and duration "-d". SAC file format is fine, anything your ObsPy install can read works.

AntonBiryukov commented 9 years ago

Hello Tobias @megies ,

I was wondering as to how to pass an an input the picks that were previously saved in the local folder . Is it possible to import the picks into an ObsPyck instance with loaded waveforms from the seed files ?

And if yes, what is the preliminary procedure, that is required to make the FocMec to work ( what would be the best source for the takeoff angles for the said picks etc.). Is there any way to create the focmec input file from within ObsPyck relying on the solution information , say, coming as a result of 'do hyp2000' button ? If no, then I'd like to know what the purpose of the 'do FocMec' button is, besides running the focmec .

Regards,

Anton.

megies commented 9 years ago

Hi Anton,

first of all, did you remove your old comments/questions from this ticket? Please don't do that, that's very bad style and distorts any discussion in here.

Second, I just commited to master you can now use --event my_file.xml to load a previously stored event file at startup.

If you have run a location routine, then your event should be populated with arrivals that also have takeoff angels needed for focmec runs. Hitting "do focMec" is indeed only running focmec, but it's doing that searching for a solution with as little as possible polarity errors which is problematic in a single run of focmec and only really feasible looping over several focmec runs with different input parameters.

T

AntonBiryukov commented 9 years ago

Hey Tobias @megies ,

I have just registered on GitHub (literally today) and had no questions / comments in the past, neither I deleted anything from anywhere. Moreover, I am a very "green" user of both the GitHub and ObsPy / ObsPyck, so the only questions I might ask are still to come :)

Thanks for the suggestions and the quick response !

megies commented 9 years ago

Ok, sorry then. I just noticed that the original poster in this issue removed all his questions..

AntonBiryukov commented 9 years ago

Will it matter which routine I 'll use for location?

The event feature sometimes throws me an error :

Traceback (most recent call last): File "./obspyck.py", line 4254, in main() File "./obspyck.py", line 4242, in main obspyck = ObsPyck(clients, streams, options, KEYS) File "./obspyck.py", line 248, in init self.setEventFromFilename(options.event) File "./obspyck.py", line 4015, in setEventFromFilename self.setEventFromCatalog(catalog) File "./obspyck.py", line 4062, in setEventFromCatalog ampl.setFromTimeWindow(tr) File "/home/nanoanton/obspyck-master/event_helper.py", line 202, in setFromTimeWindow raise NotImplementedError() NotImplementedError

the command I am using is somewhat similar to ./obspyck.py --verbosity=verbose --nometadata --noevents -t 2015-05-19T06:35:00 -d 300 -f ./SeedFiles/AA_BB_20150519_063758.seed --event=./obspyck.xml

It seems that the presence of the magnitude picks and the lack of location throw that error. I have tried setting P and S picks only - no error, works as a charm. After I added the magnitude peaks (obv., no location yet, as I need to figure out how to add the external programs) - it threw the error.

megies commented 9 years ago

It seems that the presence of the magnitude picks and the lack of location throw that error. I have tried setting P and S picks only - no error, works as a charm. After I added the magnitude peaks (obv., no location yet, as I need to figure out how to add the external programs) - it threw the error.

It seems you have incomplete amplitude picks. Obspyck uses peak-to-peak amplitude in raw counts, so you need to set both min and max (left click/right click).

screenshot from 2015-06-10 10 15 19

However unless you have some location routine, you won't be able to get the information necessary to run focmec. To use hypo2000 you need to point obspyck to your --pluginpath my_plugin_dir, make a directory my_plugin_dir/hyp_2000/ and put a file my_plugin_dir/hyp_2000/bay2000.inp in there that is your Hypo2000 control file. Of course you need to put your velocity model in there too and some input/output files have to be correctly set (like they are in obspyck, here)

megies commented 9 years ago

I'll lock this discussion about hyp2000 here, this doesn't fit the original issue anymore. Open another ticket if you have problems.