Skip to content

Commit

Permalink
minor update. name change for notebooks to seisgo
Browse files Browse the repository at this point in the history
  • Loading branch information
xtyangpsp committed Jan 1, 2022
1 parent 6f24c65 commit b9014af
Show file tree
Hide file tree
Showing 11 changed files with 739 additions and 742 deletions.
138 changes: 69 additions & 69 deletions notebooks/download_catalog.ipynb

Large diffs are not rendered by default.

158 changes: 79 additions & 79 deletions notebooks/download_continuous.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,27 @@
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Download ans Save Data: Continuous\n",
"### Xiaotao Yang\n",
"This notebook shows examples of calling seispy.utils.getdata() to download seismic data and save them to files."
]
"This notebook shows examples of calling seisgo.utils.getdata() to download seismic data and save them to files."
],
"metadata": {}
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Step 0. Load needed packages.\n",
"Some functions are imported from the utils.py."
]
],
"metadata": {}
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"#import needed packages.\n",
"from seispy import utils\n",
"from seisgo import utils\n",
"import sys\n",
"import time\n",
"import scipy\n",
Expand All @@ -37,83 +35,21 @@
"from obspy.core import Stream,Trace\n",
"from IPython.display import clear_output\n",
"from obspy.clients.fdsn import Client"
]
],
"outputs": [],
"metadata": {}
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Step 1. Set global parameters\n",
"These parameters will control the downloading procedure."
]
],
"metadata": {}
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['2012_02_02_00_00_00', '2012_02_02_08_00_00', '2012_02_02_16_00_00', '2012_02_03_00_00_00', '2012_02_03_08_00_00', '2012_02_03_16_00_00', '2012_02_04_00_00_00', '2012_02_04_08_00_00', '2012_02_04_16_00_00', '2012_02_05_00_00_00']\n",
"Downloading 7D.G03A ...\n",
"station 7D.G03A --> seismic channel: BHZ\n",
" downsamping from 50 to 10\n",
" removing response using inv for 7D.G03A.BHZ\n",
" downloaded 7D.G03A.BHZ in 4.829556941986084 seconds.\n",
" saving to ../data/raw_test/2012_02_02_00_00_00T2012_02_02_08_00_00.h5\n",
"Downloading 7D.G03A ...\n",
"station 7D.G03A --> seismic channel: BHZ\n",
" downsamping from 50 to 10\n",
" removing response using inv for 7D.G03A.BHZ\n",
" downloaded 7D.G03A.BHZ in 4.547628164291382 seconds.\n",
" saving to ../data/raw_test/2012_02_02_08_00_00T2012_02_02_16_00_00.h5\n",
"Downloading 7D.G03A ...\n",
"station 7D.G03A --> seismic channel: BHZ\n",
" downsamping from 50 to 10\n",
" removing response using inv for 7D.G03A.BHZ\n",
" downloaded 7D.G03A.BHZ in 4.405111074447632 seconds.\n",
" saving to ../data/raw_test/2012_02_02_16_00_00T2012_02_03_00_00_00.h5\n",
"Downloading 7D.G03A ...\n",
"station 7D.G03A --> seismic channel: BHZ\n",
" downsamping from 50 to 10\n",
" removing response using inv for 7D.G03A.BHZ\n",
" downloaded 7D.G03A.BHZ in 4.533736944198608 seconds.\n",
" saving to ../data/raw_test/2012_02_03_00_00_00T2012_02_03_08_00_00.h5\n",
"Downloading 7D.G03A ...\n",
"station 7D.G03A --> seismic channel: BHZ\n",
" downsamping from 50 to 10\n",
" removing response using inv for 7D.G03A.BHZ\n",
" downloaded 7D.G03A.BHZ in 3.4130070209503174 seconds.\n",
" saving to ../data/raw_test/2012_02_03_08_00_00T2012_02_03_16_00_00.h5\n",
"Downloading 7D.G03A ...\n",
"station 7D.G03A --> seismic channel: BHZ\n",
" downsamping from 50 to 10\n",
" removing response using inv for 7D.G03A.BHZ\n",
" downloaded 7D.G03A.BHZ in 3.534677028656006 seconds.\n",
" saving to ../data/raw_test/2012_02_03_16_00_00T2012_02_04_00_00_00.h5\n",
"Downloading 7D.G03A ...\n",
"station 7D.G03A --> seismic channel: BHZ\n",
" downsamping from 50 to 10\n",
" removing response using inv for 7D.G03A.BHZ\n",
" downloaded 7D.G03A.BHZ in 3.6696767807006836 seconds.\n",
" saving to ../data/raw_test/2012_02_04_00_00_00T2012_02_04_08_00_00.h5\n",
"Downloading 7D.G03A ...\n",
"station 7D.G03A --> seismic channel: BHZ\n",
" downsamping from 50 to 10\n",
" removing response using inv for 7D.G03A.BHZ\n",
" downloaded 7D.G03A.BHZ in 3.5089330673217773 seconds.\n",
" saving to ../data/raw_test/2012_02_04_08_00_00T2012_02_04_16_00_00.h5\n",
"Downloading 7D.G03A ...\n",
"station 7D.G03A --> seismic channel: BHZ\n",
" downsamping from 50 to 10\n",
" removing response using inv for 7D.G03A.BHZ\n",
" downloaded 7D.G03A.BHZ in 3.5488531589508057 seconds.\n",
" saving to ../data/raw_test/2012_02_04_16_00_00T2012_02_05_00_00_00.h5\n"
]
}
],
"source": [
"\"\"\"\n",
"1. Station parameters\n",
Expand Down Expand Up @@ -207,14 +143,78 @@
" print(str(e))\n",
" \n",
" "
]
],
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"['2012_02_02_00_00_00', '2012_02_02_08_00_00', '2012_02_02_16_00_00', '2012_02_03_00_00_00', '2012_02_03_08_00_00', '2012_02_03_16_00_00', '2012_02_04_00_00_00', '2012_02_04_08_00_00', '2012_02_04_16_00_00', '2012_02_05_00_00_00']\n",
"Downloading 7D.G03A ...\n",
"station 7D.G03A --> seismic channel: BHZ\n",
" downsamping from 50 to 10\n",
" removing response using inv for 7D.G03A.BHZ\n",
" downloaded 7D.G03A.BHZ in 4.829556941986084 seconds.\n",
" saving to ../data/raw_test/2012_02_02_00_00_00T2012_02_02_08_00_00.h5\n",
"Downloading 7D.G03A ...\n",
"station 7D.G03A --> seismic channel: BHZ\n",
" downsamping from 50 to 10\n",
" removing response using inv for 7D.G03A.BHZ\n",
" downloaded 7D.G03A.BHZ in 4.547628164291382 seconds.\n",
" saving to ../data/raw_test/2012_02_02_08_00_00T2012_02_02_16_00_00.h5\n",
"Downloading 7D.G03A ...\n",
"station 7D.G03A --> seismic channel: BHZ\n",
" downsamping from 50 to 10\n",
" removing response using inv for 7D.G03A.BHZ\n",
" downloaded 7D.G03A.BHZ in 4.405111074447632 seconds.\n",
" saving to ../data/raw_test/2012_02_02_16_00_00T2012_02_03_00_00_00.h5\n",
"Downloading 7D.G03A ...\n",
"station 7D.G03A --> seismic channel: BHZ\n",
" downsamping from 50 to 10\n",
" removing response using inv for 7D.G03A.BHZ\n",
" downloaded 7D.G03A.BHZ in 4.533736944198608 seconds.\n",
" saving to ../data/raw_test/2012_02_03_00_00_00T2012_02_03_08_00_00.h5\n",
"Downloading 7D.G03A ...\n",
"station 7D.G03A --> seismic channel: BHZ\n",
" downsamping from 50 to 10\n",
" removing response using inv for 7D.G03A.BHZ\n",
" downloaded 7D.G03A.BHZ in 3.4130070209503174 seconds.\n",
" saving to ../data/raw_test/2012_02_03_08_00_00T2012_02_03_16_00_00.h5\n",
"Downloading 7D.G03A ...\n",
"station 7D.G03A --> seismic channel: BHZ\n",
" downsamping from 50 to 10\n",
" removing response using inv for 7D.G03A.BHZ\n",
" downloaded 7D.G03A.BHZ in 3.534677028656006 seconds.\n",
" saving to ../data/raw_test/2012_02_03_16_00_00T2012_02_04_00_00_00.h5\n",
"Downloading 7D.G03A ...\n",
"station 7D.G03A --> seismic channel: BHZ\n",
" downsamping from 50 to 10\n",
" removing response using inv for 7D.G03A.BHZ\n",
" downloaded 7D.G03A.BHZ in 3.6696767807006836 seconds.\n",
" saving to ../data/raw_test/2012_02_04_00_00_00T2012_02_04_08_00_00.h5\n",
"Downloading 7D.G03A ...\n",
"station 7D.G03A --> seismic channel: BHZ\n",
" downsamping from 50 to 10\n",
" removing response using inv for 7D.G03A.BHZ\n",
" downloaded 7D.G03A.BHZ in 3.5089330673217773 seconds.\n",
" saving to ../data/raw_test/2012_02_04_08_00_00T2012_02_04_16_00_00.h5\n",
"Downloading 7D.G03A ...\n",
"station 7D.G03A --> seismic channel: BHZ\n",
" downsamping from 50 to 10\n",
" removing response using inv for 7D.G03A.BHZ\n",
" downloaded 7D.G03A.BHZ in 3.5488531589508057 seconds.\n",
" saving to ../data/raw_test/2012_02_04_16_00_00T2012_02_05_00_00_00.h5\n"
]
}
],
"metadata": {}
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"source": [],
"outputs": [],
"source": []
"metadata": {}
}
],
"metadata": {
Expand Down Expand Up @@ -242,4 +242,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
Loading

0 comments on commit b9014af

Please sign in to comment.