obspyck
obspyck copied to clipboard
Set username for NNLoc / HYPO2000 relocation
This was causing an error when the relocation was complete and Obspyck was trying to import the new catalogue / events. Perhaps related to an older version of Obspy?
Hmm.. no there must be something else wrong if this doesn't work. Inside obspyck I need to do an ugly monkey patch of man event-type obspy classes. Essentially we're not creating an obspy Event
instance but an obspyck.event_helper.Event
instance which has this method attached..
Oh, I see - I hadn't thought about that. Okay, will keep playing with the code a little more to narrow down the issue. Will try and update you soon with the exact error message I get.
Okay, so this is the error I get for the HYPO_2000 when I have the line set to
self.catalog[0].set_creation_info_username(self.username)
:
Traceback (most recent call last): File "/Users/sph1r17/anaconda/envs/obspy_2.7/lib/python2.7/site-packages/obspyck-0.4.1.post0-py2.7.egg/obspyck/obspyck.py", line 447, in on_qToolButton_doHyp2000_clicked self.loadHyp2000Data() File "/Users/sph1r17/anaconda/envs/obspy_2.7/lib/python2.7/site-packages/obspyck-0.4.1.post0-py2.7.egg/obspyck/obspyck.py", line 2576, in loadHyp2000Data self.catalog[0].set_creation_info_username(self.username) File "/Users/sph1r17/anaconda/envs/obspy_2.7/lib/python2.7/site-packages/obspy/core/util/attribdict.py", line 125, in getattr raise AttributeError(e.args[0]) AttributeError: set_creation_info_username
Sorry.. I'm pretty tangled up working on obspy 1.1.0 release.. ping me next week if I don't respond the next days.. ;-)
Thanks. No rush as the 'fix' is working for me right now! Have a nice weekend.