problem with the creation of a valid resource identifier fixed (still problematic, see #145)

This commit is contained in:
Sebastian Wehling-Benatelli 2015-02-13 11:36:09 +01:00
parent c35eea4588
commit 759697add8

View File

@ -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