Skip to content

Instantly share code, notes, and snippets.

View calum-chamberlain's full-sized avatar

Calum Chamberlain calum-chamberlain

View GitHub Profile
@calum-chamberlain
calum-chamberlain / benchmark.py
Last active November 28, 2023 00:42
Simple benchmarking for EQcorrscan.
"""
Simple benchmark of matched-filter in EQcorrscan for PR #544
"""
import boto3
import os
import logging
import pickle
from obspy import UTCDateTime
@calum-chamberlain
calum-chamberlain / Response_plotting.ipynb
Created April 20, 2020 04:37
Response_plotting.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@calum-chamberlain
calum-chamberlain / obsplus_index_testing.ipynb
Created December 1, 2019 03:01
Testing memory and timing for obsplus index creation
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@calum-chamberlain
calum-chamberlain / Profile_xcorr_chunked.ipynb
Created January 22, 2019 02:55
EQcorrscan chunked cross-correlation profiling
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
class SparseEvent:
"""
Sparse event class with only picks and origins to mimic
obspy events.
"""
def __init__(self, resource_id, origins, picks):
self.resource_id = resource_id
self.origins = origins
self.picks = picks
@calum-chamberlain
calum-chamberlain / test-eqcorrscan.py
Last active August 25, 2018 07:08
Test script for EQcorrscan
#!/usr/bin/env python
"""
Collect and run the EQcorrscan tests.
:copyright:
EQcorrscan developers.
:license:
GNU Lesser General Public License, Version 3
(https://www.gnu.org/copyleft/lesser.html)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@calum-chamberlain
calum-chamberlain / attach_geonet_mt.py
Last active January 24, 2018 04:21
Simple function to attach available moment-tensor information to a given catalogue by downloading and integrating John Ristau's mt solutions.
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.
@calum-chamberlain
calum-chamberlain / obspy_normxcorr.ipynb
Created January 7, 2018 20:34
Demonstration of normalisation using obspy correlate functions
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.