This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from obspy.clients.fdsn import Client | |
publicIDs=['2016p008122', '2016p008353', '2016p008155', '2016p008194'] | |
client = Client("GEONET") | |
catalog = Catalog() | |
for publicID in publicIDs: | |
data_stream = client._download('http://quakeml.geonet.org.nz/' + | |
'quakeml/1.2/' + publicID) | |
data_stream.seek(0, 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def inventory_to_seisan(inventory, filename): | |
""" | |
Write station co-ordinates from an inventory object to STATION0.HYP format. | |
:type inventory: :class:`~obspy.core.inventory.Inventory` | |
:param inventory: Inventory to write co-ordinated from. | |
:type filename: str | |
:param filename: Filename to output to, will overwrite file is present | |
.. note:: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from eqcorrscan.core import match_filter, lag_calc | |
from eqcorrscan.utils import pre_processing | |
from eqcorrscan.utils.plotting import detection_multiplot | |
from obspy import read, Catalog | |
import glob | |
import os | |
outfile = open("failed_days", "w") | |
# Read in the templates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def normxcorr1(template, search_window): | |
""" | |
Normlized cross-correlation using scipy - contributed by d-chambers. | |
:type template: :class:`numpy.ndarray` | |
:param template: 1D numpy array to use as template | |
:type search_window: :class: `numpy.ndarray` | |
:param search_window: 1D numpy array to search for the template within. | |
:rtype: :class: `numpy.ndarray` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import division, print_function, absolute_import | |
import bottleneck | |
import threading | |
import numpy as np | |
import time | |
from scipy._lib._version import NumpyVersion | |
from scipy.signal.signaltools import _centered | |
from scipy import fftpack |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_geonet_moment_tensor(catalog): | |
""" | |
Get the moment tensor info for a given set of events, and add them to the | |
events. | |
Use John Ristau's MT catalog here: | |
`https://raw.githubusercontent.com/GeoNet/data/master/moment-tensor/GeoNet_CMT_solutions.csv` | |
which does not include all events, if events are not in the database they | |
will warn that they are not found. |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer