Skip to content

Instantly share code, notes, and snippets.

@krischer
krischer / relative_calibration.ipynb
Last active March 15, 2019 22:27
Synthetic relative calibration example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@krischer
krischer / get_all_stations.py
Created April 5, 2017 21:01
Asynchronously download information about all stations worldwise and write them to a JSON file.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Requires Python >= 3.5, aiohttp, and pandas.
$ pip install aiohttp pandas
Upon running it will create a file 'networks_stations.json' which contains all
stations it could find across FDSN web service capable data centers. For each
station it contains the epochs and coordinates.
@krischer
krischer / CPUTempCollector.py
Created January 31, 2017 13:12
Custom Diamond Collectors
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Custom collector for
Requires PySensors.
:copyright:
Lion Krischer, 2017
:license:
@krischer
krischer / add_blockette_1000.py
Created April 14, 2016 08:10
Adding Blockette 1000 to MiniSEED files without one.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Script adding Blockette 1000 to MiniSEED files that have been written without
one. It will discard all other blockettes and furthermore requires at least 8
bytes between the fixed header and the beginning of the data.
Requirements: Python >= 2.7
@krischer
krischer / lab_instrument_response.ipynb
Created April 11, 2016 09:42
Instrument response lab
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@krischer
krischer / syngine_sourcewidth.ipynb
Created April 6, 2016 17:08
sourcewidth in syngine
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@krischer
krischer / amplitudes.ipynb
Last active February 24, 2016 08:46
Based on an idea by Torsten Dahm
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@krischer
krischer / syngine_tutorial.ipynb
Created February 23, 2016 22:06
Enhanced Syngine Tutorial with ObsPy
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@krischer
krischer / syngine_perf.py
Created February 10, 2016 21:24
Performace Tester for Syngine
# Requires Python 3 and numpy and requests.
# `ping` and `curl` must be available and usable
#
# Measured times are the time to the first received
# byte of the response.
from __future__ import print_function
import math
import os
import random
IMPORTS="
obspy.ah.core;_get_AH_version
obspy.ah.core;_unpack_string
obspy.ah.core;is_AH
obspy.ah.core;read_AH
obspy.ah.core;read_AH1
obspy.ah.core;read_AH2
obspy.ah;core
obspy.arclink.client;ArcLinkException
obspy.arclink.client;Client