Made changes to load data from data directory on Jupyter Hub and deleted data directory.

This commit is contained in:
Janis Heuel 2021-06-25 10:11:03 +02:00
parent 8ce3df158c
commit 138d954abf
19 changed files with 13 additions and 23 deletions

View File

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

View File

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

View File

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

View File

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