From 759697add80f5f3ffcfb4b317206157196150238 Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Fri, 13 Feb 2015 11:36:09 +0100 Subject: [PATCH] problem with the creation of a valid resource identifier fixed (still problematic, see #145) --- pylot/core/util/utils.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pylot/core/util/utils.py b/pylot/core/util/utils.py index 90a43149..b69347f3 100644 --- a/pylot/core/util/utils.py +++ b/pylot/core/util/utils.py @@ -153,8 +153,8 @@ def createPick(origintime, picknum, picktime, eventnum, cinfo, phase, station, return pick -def createArrival(pickresID, eventnum, cinfo, phase, station, authority_id, - azimuth=None, dist=None): +def createArrival(origintime, pickresID, eventnum, cinfo, phase, station, + authority_id, azimuth=None, dist=None): ''' createArrival - function to create an Obspy Arrival :param pickresID: Resource identifier of the created pick @@ -177,9 +177,7 @@ def createArrival(pickresID, eventnum, cinfo, phase, station, authority_id, :type dist: float or int, optional :return: An ObsPy :class: `~obspy.core.event.Arrival` object ''' - arriID = 'arrival/' + eventnum + '/' + station + '/{0}'.format(phase) - arriresID = ope.ResourceIdentifier(id=arriID) - arriresID.convertIDToQuakeMLURI(authority_id=authority_id) + arriresID = createResourceID(origintime, 'arrival', authority_id, eventnum) arrival = ope.Arrival() arrival.resource_id = arriresID arrival.creation_info = cinfo