From f55429a1c741fa725786741207c97023edf254d7 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 27 Jan 2015 04:51:37 -0500 Subject: [PATCH] Fix pierce calculation. I'm not sure why I'm getting a NumPy array here, but probably once the lists of arrays goes away, it should fix itself. --- obspy/taup/seismic_phase.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/obspy/taup/seismic_phase.py b/obspy/taup/seismic_phase.py index 9f9a32715b2..69db4d27bf0 100644 --- a/obspy/taup/seismic_phase.py +++ b/obspy/taup/seismic_phase.py @@ -8,6 +8,8 @@ from itertools import count import math +import numpy as np + from .arrival import Arrival from .helper_classes import TauModelError, TimeDist @@ -884,7 +886,7 @@ def calc_pierce_from_arrival(self, currArrival): distB = tauBranch.dist[rayNum + 1] timeB = tauBranch.time[rayNum + 1] branchDist += distRatio * (distB - distA) + distA - prevBranchTime = branchTime + prevBranchTime = np.array(branchTime, copy=True) branchTime += distRatio * (timeB - timeA) + timeA if isDownGoing: branchDepth = min(tauBranch.botDepth, turnDepth)