Skip to content

Commit

Permalink
clearing outputs from scoped_download
Browse files Browse the repository at this point in the history
  • Loading branch information
mdenolle committed Feb 4, 2024
1 parent fc4adba commit 6b4a389
Showing 1 changed file with 10 additions and 115 deletions.
125 changes: 10 additions & 115 deletions tutorials/noisepy_scoped_download_s3_store.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,18 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: pymongo in /Users/marinedenolle/miniconda3/envs/noisepy/lib/python3.10/site-packages (4.6.1)\n",
"Requirement already satisfied: dnspython<3.0.0,>=1.16.0 in /Users/marinedenolle/miniconda3/envs/noisepy/lib/python3.10/site-packages (from pymongo) (2.4.2)\n"
]
}
],
"outputs": [],
"source": [
"!pip install pymongo"
]
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Pinged your deployment. You successfully connected to MongoDB!\n"
]
}
],
"outputs": [],
"source": [
"from pymongo.mongo_client import MongoClient\n",
"from pymongo.server_api import ServerApi\n",
Expand All @@ -61,49 +44,9 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Station Pair Collection:\n",
"{'_id': ObjectId('656f38bbd5ca665876e72eb6'), 'station0': 'ABL', 'station1': 'ABL', 'starttime': '2022-01-01T00:00:00+00:00', 'endtime': '2023-01-01T00:00:00+00:00', 'storage_mode': 'url', 'url': 's3://scoped-noise/scedc_CI_2022_stack/CI.ABL/CI.ABL/2022_01_01_00_00_00T2023_01_01_00_00_00.tar.gz'}\n",
"{'_id': ObjectId('656f38bbd5ca665876e72eb7'), 'station0': 'ABL', 'station1': 'ACP', 'starttime': '2022-01-01T00:00:00+00:00', 'endtime': '2023-01-01T00:00:00+00:00', 'storage_mode': 'url', 'url': 's3://scoped-noise/scedc_CI_2022_stack/CI.ABL/CI.ACP/2022_01_01_00_00_00T2023_01_01_00_00_00.tar.gz'}\n",
"{'_id': ObjectId('656f38bbd5ca665876e72eb8'), 'station0': 'ABL', 'station1': 'ADO', 'starttime': '2022-01-01T00:00:00+00:00', 'endtime': '2023-01-01T00:00:00+00:00', 'storage_mode': 'url', 'url': 's3://scoped-noise/scedc_CI_2022_stack/CI.ABL/CI.ADO/2022_01_01_00_00_00T2023_01_01_00_00_00.tar.gz'}\n",
"{'_id': ObjectId('656f38bbd5ca665876e72eb9'), 'station0': 'ABL', 'station1': 'AGM', 'starttime': '2022-01-01T00:00:00+00:00', 'endtime': '2023-01-01T00:00:00+00:00', 'storage_mode': 'url', 'url': 's3://scoped-noise/scedc_CI_2022_stack/CI.ABL/CI.AGM/2022_01_01_00_00_00T2023_01_01_00_00_00.tar.gz'}\n",
"{'_id': ObjectId('656f38bbd5ca665876e72eba'), 'station0': 'ABL', 'station1': 'ALP', 'starttime': '2022-01-01T00:00:00+00:00', 'endtime': '2023-01-01T00:00:00+00:00', 'storage_mode': 'url', 'url': 's3://scoped-noise/scedc_CI_2022_stack/CI.ABL/CI.ALP/2022_01_01_00_00_00T2023_01_01_00_00_00.tar.gz'}\n",
"{'_id': ObjectId('656f38bbd5ca665876e72ebb'), 'station0': 'ABL', 'station1': 'ARV', 'starttime': '2022-01-01T00:00:00+00:00', 'endtime': '2023-01-01T00:00:00+00:00', 'storage_mode': 'url', 'url': 's3://scoped-noise/scedc_CI_2022_stack/CI.ABL/CI.ARV/2022_01_01_00_00_00T2023_01_01_00_00_00.tar.gz'}\n",
"{'_id': ObjectId('656f38bbd5ca665876e72ebc'), 'station0': 'ABL', 'station1': 'AVM', 'starttime': '2022-01-01T00:00:00+00:00', 'endtime': '2023-01-01T00:00:00+00:00', 'storage_mode': 'url', 'url': 's3://scoped-noise/scedc_CI_2022_stack/CI.ABL/CI.AVM/2022_01_01_00_00_00T2023_01_01_00_00_00.tar.gz'}\n",
"{'_id': ObjectId('656f38bbd5ca665876e72ebd'), 'station0': 'ABL', 'station1': 'BAI', 'starttime': '2022-01-01T00:00:00+00:00', 'endtime': '2023-01-01T00:00:00+00:00', 'storage_mode': 'url', 'url': 's3://scoped-noise/scedc_CI_2022_stack/CI.ABL/CI.BAI/2022_01_01_00_00_00T2023_01_01_00_00_00.tar.gz'}\n",
"{'_id': ObjectId('656f38bbd5ca665876e72ebe'), 'station0': 'ABL', 'station1': 'BAK', 'starttime': '2022-01-01T00:00:00+00:00', 'endtime': '2023-01-01T00:00:00+00:00', 'storage_mode': 'url', 'url': 's3://scoped-noise/scedc_CI_2022_stack/CI.ABL/CI.BAK/2022_01_01_00_00_00T2023_01_01_00_00_00.tar.gz'}\n",
"{'_id': ObjectId('656f38bbd5ca665876e72ebf'), 'station0': 'ABL', 'station1': 'BAR', 'starttime': '2022-01-01T00:00:00+00:00', 'endtime': '2023-01-01T00:00:00+00:00', 'storage_mode': 'url', 'url': 's3://scoped-noise/scedc_CI_2022_stack/CI.ABL/CI.BAR/2022_01_01_00_00_00T2023_01_01_00_00_00.tar.gz'}\n",
"\n",
"Station Collection:\n",
"{'_id': ObjectId('656eac931fec6658167a34fd'), 'name': 'ABL', 'elevation': -1.7976931348623157e+308, 'lat': -1.7976931348623157e+308, 'location': '', 'lon': -1.7976931348623157e+308, 'network': 'CI'}\n",
"ABL\n",
"{'_id': ObjectId('656eac931fec6658167a3546'), 'name': 'ACP', 'elevation': -1.7976931348623157e+308, 'lat': -1.7976931348623157e+308, 'location': '', 'lon': -1.7976931348623157e+308, 'network': 'CI'}\n",
"ACP\n",
"{'_id': ObjectId('656eac931fec6658167a355d'), 'name': 'ADO', 'elevation': -1.7976931348623157e+308, 'lat': -1.7976931348623157e+308, 'location': '', 'lon': -1.7976931348623157e+308, 'network': 'CI'}\n",
"ADO\n",
"{'_id': ObjectId('656eac931fec6658167a3575'), 'name': 'AGM', 'elevation': -1.7976931348623157e+308, 'lat': -1.7976931348623157e+308, 'location': '', 'lon': -1.7976931348623157e+308, 'network': 'CI'}\n",
"AGM\n",
"{'_id': ObjectId('656eac931fec6658167a3597'), 'name': 'ALP', 'elevation': -1.7976931348623157e+308, 'lat': -1.7976931348623157e+308, 'location': '', 'lon': -1.7976931348623157e+308, 'network': 'CI'}\n",
"ALP\n",
"{'_id': ObjectId('656eac931fec6658167a35f4'), 'name': 'ARV', 'elevation': -1.7976931348623157e+308, 'lat': -1.7976931348623157e+308, 'location': '', 'lon': -1.7976931348623157e+308, 'network': 'CI'}\n",
"ARV\n",
"{'_id': ObjectId('656eac931fec6658167a3650'), 'name': 'AVM', 'elevation': -1.7976931348623157e+308, 'lat': -1.7976931348623157e+308, 'location': '', 'lon': -1.7976931348623157e+308, 'network': 'CI'}\n",
"AVM\n",
"{'_id': ObjectId('656eac931fec6658167a369b'), 'name': 'BAI', 'elevation': -1.7976931348623157e+308, 'lat': -1.7976931348623157e+308, 'location': '', 'lon': -1.7976931348623157e+308, 'network': 'CI'}\n",
"BAI\n",
"{'_id': ObjectId('656eac931fec6658167a3702'), 'name': 'BAK', 'elevation': -1.7976931348623157e+308, 'lat': -1.7976931348623157e+308, 'location': '', 'lon': -1.7976931348623157e+308, 'network': 'CI'}\n",
"BAK\n",
"{'_id': ObjectId('656eac931fec6658167a374c'), 'name': 'BAR', 'elevation': -1.7976931348623157e+308, 'lat': -1.7976931348623157e+308, 'location': '', 'lon': -1.7976931348623157e+308, 'network': 'CI'}\n",
"BAR\n"
]
}
],
"outputs": [],
"source": [
"db = client.scoped_noise\n",
"station_pair_collection = db.station_pair\n",
Expand All @@ -127,36 +70,9 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"2023-12-06 14:30:45,060 4717313536 INFO numpystore.__init__(): store creating at s3://scoped-noise/scedc_CI_2022_stack/, mode=a, storage_options={'s3': {'anon': False}}\n",
"2023-12-06 14:30:45,061 4717313536 INFO numpystore.__init__(): Numpy store created at s3://scoped-noise/scedc_CI_2022_stack/\n",
"2023-12-06 14:30:52,062 4717313536 INFO hierarchicalstores._load_src(): Loading directory cache for CI.ABL - ix: 0\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Time to get station pairs: 6.9995436668396 seconds\n",
"Time to get timespans: 0.1572427749633789 seconds\n",
"Timespan: 2022-01-01T00:00:00+0000 - 2023-01-01T00:00:00+0000\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
". Memory: 388 MB: 100%|██████████| 10/10 [00:00<00:00, 31.01it/s]\n",
"2023-12-06 14:30:52,556 4717313536 INFO utils.log_raw(): TIMING: 0.3359 secs. for loading 10 stacks\n"
]
}
],
"outputs": [],
"source": [
"import os\n",
"import noisepy\n",
Expand Down Expand Up @@ -193,30 +109,9 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ASDF file [format version: 1.0.3]: 'asdf_data/CI.ABL/CI.ABL_CI.ABL.h5' (239.7 KB)\n",
"\tContains 0 event(s)\n",
"\tContains waveform data from 0 station(s).\n",
"\tContains 1 type(s) of auxiliary data: Allstack_linear\n"
]
},
{
"data": {
"text/plain": [
"(8001,)"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"import pyasdf\n",
"\n",
Expand Down

0 comments on commit 6b4a389

Please sign in to comment.