Source code for obspy.taup.taup_path

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Ray path calculations.
"""
from __future__ import (absolute_import, division, print_function,
                        unicode_literals)
from future.builtins import *  # NOQA

from .taup_pierce import TauPPierce


[docs]class TauPPath(TauPPierce): """ Calculate the ray paths for each phase, using TauPPierce and TauPTime. """
[docs] def calculate(self, degrees): """ Call all the necessary calculations to obtain the ray paths. """ self.depth_correct(self.source_depth, self.receiver_depth) self.recalc_phases() self.arrivals = [] self.calculate_path(degrees)
[docs] def calculate_path(self, degrees): """ Calculates the ray paths for phases at the given distance by calling the calculate_path method of the SeismicPhase class. The results are then in self.arrivals. """ self.degrees = degrees for phase in self.phases: self.arrivals += phase.calc_path(degrees)