[add] user prompt when event_id not matching on load_data

This commit is contained in:
2017-06-27 15:06:28 +02:00
parent f1a9726f91
commit f1f9295370
3 changed files with 31 additions and 5 deletions

View File

@@ -15,8 +15,9 @@ class Event(ObsPyEvent):
Pickable class derived from ~obspy.core.event.Event containing information on a single event.
'''
def __init__(self, path):
self.pylot_id = path.split('/')[-1]
# initialize super class
super(Event, self).__init__(resource_id=ResourceIdentifier(path.split('/')[-1]))
super(Event, self).__init__(resource_id=ResourceIdentifier('smi:local/'+self.pylot_id))
self.path = path
self.database = path.split('/')[-2]
self.datapath = path.split('/')[-3]