pysep.utils.fetch ================= .. py:module:: pysep.utils.fetch .. autoapi-nested-parse:: Grab information from external webservices or databases Functions --------- .. autoapisummary:: pysep.utils.fetch.get_taup_arrivals pysep.utils.fetch._get_or_build_taup_model Module Contents --------------- .. py:function:: get_taup_arrivals(st=None, event=None, inv=None, phase_list=('ttall', ), model='ak135', network=None, station=None) Retrieve phase arrival times using TauP/TauPy based on event and station locations, either using SAC headers or using event and inventory metadata. .. note:: Requires EITHER `st` with appropriate SAC headers OR `event` and `inv` defining event and station locations. Available model names can be found here: https://docs.obspy.org/packages/obspy.taup.html OR internally at: pysep/pysep/data/taup_models :type st: obspy.core.stream.Stream :param st: Stream with appended SAC headers which will be used to gather TaupP arrivals from a given `model` :type event: obspy.core.event.Event :param event: Event object to get location from :type inv: obspy.core.inventory.Inventory :param inv: inventory object to get locations from :type phase_list: list of str :param phase_list: phases to search TauP for. Defaults to 'ttall', which is ObsPy's default for getting all phase arrivals :type model: str :param model: Model to query TauP with. Looks at ObsPy and PySEP models :type network: str :param network: query only a specific network :type station: str :param station: query only a specific station :rtype: dict :return: a dictionary where keys are trace ID consisting of network and station (NN.SSS), and values are TauP Arrivals() instances which contain information about phase arrivals .. py:function:: _get_or_build_taup_model(model) Attempts to retrieve a TauP model from the internal ObsPy directory. If nothing is found, will attempt to search the internal PySEP taup_model data directory for matching velocity models which can be built :type model: str :param model: name of model to search for :rtype: obspy.taup.TauPyModel :return: model matching model name :raises FileNotfoundError: If no matching file is found