Add all notebooks for part ii of the lecture. #13

Merged
kasper merged 3 commits from develop into main 2021-06-26 16:15:50 +02:00
19 changed files with 13 additions and 23 deletions
Showing only changes of commit 138d954abf - Show all commits

View File

@ -25,6 +25,7 @@
"source": [
"# Import all required packages\n",
"%matplotlib inline\n",
"import os\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"from obspy import read\n",
@ -38,8 +39,8 @@
"outputs": [],
"source": [
"# Read the data\n",
"st = read(\"../data/DOR50/*063\")\n",
"print(st)"
"datapath = os.path.join(os.path.expanduser('~'),'work', 'data', 'DOR50', '*063')\n",
"st = read(datapath)"
]
},
{

View File

@ -174,8 +174,9 @@
"stime = UTCDateTime('2013-01-23 14:17:00Z') # use record starting at 1400\n",
"etime = UTCDateTime('2013-01-23 14:19:00Z')\n",
"ttitle = ', depth: 56.5 m'\n",
" \n",
"datapath = \"../data/{}/{}\".format(station, 'e*'+record+'*.HHZ') # search string for database\n",
"\n",
"# search string for database\n",
"datapath = os.path.join(os.path.expanduser('~'),'work', 'data', 'GE-stations', station, 'e*'+record+'*.HHZ')\n",
"st = read(datapath) # read file using obspy read\n",
"print(st)\n",
"\n",
@ -298,7 +299,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.11"
"version": "3.6.7"
}
},
"nbformat": 4,

View File

@ -36,6 +36,7 @@
"outputs": [],
"source": [
"# Load all required packages\n",
"import os\n",
"import numpy as np\n",
"from scipy.signal import stft, istft\n",
"import matplotlib.pyplot as plt"
@ -48,9 +49,9 @@
"outputs": [],
"source": [
"# Load our earthquake data and plot\n",
"d = np.load(\"../data/events/bug2019mgoh_Z.npz\")\n",
"#d = np.load(\"../data/events/bug2019gbbo_Z.npz\")\n",
"#d = np.load(\"../data/events/bug2019ibsd_Z.npz\")\n",
"d = np.load(os.path.join(os.path.expanduser('~'),'work', 'data', 'events', 'bug2019mgoh_Z.npz'))\n",
"#d = np.load(os.path.join(os.path.expanduser('~'),'work', 'data', 'events', 'bug2019gbbo_Z.npz'))\n",
"#d = np.load(os.path.join(os.path.expanduser('~'),'work', 'data', 'events', 'bug2019ibsd_Z.npz'))\n",
"plt.figure(figsize=(15, 8))\n",
"plt.plot(d['data']);"
]

View File

@ -2,7 +2,6 @@
"cells": [
{
"cell_type": "markdown",
"id": "delayed-degree",
"metadata": {},
"source": [
"# Time Frequency Analysis\n",
@ -23,7 +22,6 @@
},
{
"cell_type": "markdown",
"id": "rising-paint",
"metadata": {},
"source": [
"## Borehole Data and Test Site\n",
@ -43,7 +41,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "lonely-caribbean",
"metadata": {},
"outputs": [],
"source": [
@ -58,7 +55,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "serial-stanford",
"metadata": {},
"outputs": [],
"source": [
@ -77,7 +73,7 @@
" etime = UTCDateTime('2013-01-23 14:19:00Z')\n",
" ttitle = ', depth: 56.5 m'\n",
" \n",
"datapath = \"../data/{}/{}\".format(station, 'e*'+record+'*.HHZ') # search string for database\n",
"datapath = os.path.join(os.path.expanduser('~'),'work', 'data','GE-stations', station, 'e*'+record+'*.HHZ') # search string for database\n",
"st = read(datapath) # read file using obspy read\n",
"print(st)\n",
"\n",
@ -91,7 +87,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "boring-killer",
"metadata": {},
"outputs": [],
"source": [
@ -113,7 +108,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "drawn-ability",
"metadata": {},
"outputs": [],
"source": [
@ -132,7 +126,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "stylish-monte",
"metadata": {},
"outputs": [],
"source": [
@ -159,7 +152,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "unnecessary-military",
"metadata": {},
"outputs": [],
"source": [
@ -194,7 +186,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "hydraulic-productivity",
"metadata": {},
"outputs": [],
"source": [
@ -209,7 +200,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "biological-championship",
"metadata": {},
"outputs": [],
"source": [
@ -227,7 +217,6 @@
},
{
"cell_type": "markdown",
"id": "simple-humidity",
"metadata": {},
"source": [
"## Exercise \n",
@ -245,7 +234,6 @@
},
{
"cell_type": "markdown",
"id": "previous-concern",
"metadata": {},
"source": [
"### The Hamming window\n",
@ -255,7 +243,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "ultimate-disaster",
"metadata": {},
"outputs": [],
"source": []
@ -277,7 +264,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.11"
"version": "3.6.7"
}
},
"nbformat": 4,

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.