Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
xtyangpsp committed Dec 29, 2023
1 parent dd66648 commit b11bb51
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 64 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ $ python -m ipykernel install --user --name=hypoinv

## Run the hypoinverse example:
1. Make sure hypo1.40 has been installed on your computer. Download the version from the USGS website (https://www.usgs.gov/software/hypoinverse-earthquake-location). For your convinience, a copy of the hyp1.40 codes is available under folder `hyp1.40`.
2. In terminal under the `example` directory, run the jupyter notebook `HypoInvPy_dev_tests.ipynb`
2. In terminal under the `example` directory, run the jupyter notebook `HypoInvPy_run_example.ipynb`
3. The output directory includes the resultant earthquake catalogs.

## Upcoming changes:
Expand Down
2 changes: 1 addition & 1 deletion description.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $ python -m ipykernel install --user --name=hypoinv

## Run the hypoinverse example:
1. Make sure hypo1.40 has been installed on your computer. Download the version from the USGS website (https://www.usgs.gov/software/hypoinverse-earthquake-location). For your convinience, a copy of the hyp1.40 codes is available under folder `hyp1.40`.
2. In terminal under the `example` directory, run the jupyter notebook `HypoInvPy_dev_tests.ipynb`
2. In terminal under the `example` directory, run the jupyter notebook `HypoInvPy_run_example.ipynb`
3. The output directory includes the resultant earthquake catalogs.

## Upcoming changes:
Expand Down
111 changes: 50 additions & 61 deletions example/HypoInvPy_run_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -148,22 +148,10 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 4,
"id": "3298b21d-8733-4de3-93af-92c277b2aa5c",
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'np' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[1], line 8\u001b[0m\n\u001b[1;32m 6\u001b[0m lat_code\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mN\u001b[39m\u001b[38;5;124m'\u001b[39m\n\u001b[1;32m 7\u001b[0m lon_code\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mW\u001b[39m\u001b[38;5;124m'\u001b[39m\n\u001b[0;32m----> 8\u001b[0m depth_try_list\u001b[38;5;241m=\u001b[39m\u001b[43mnp\u001b[49m\u001b[38;5;241m.\u001b[39marange(\u001b[38;5;241m0\u001b[39m,\u001b[38;5;241m20\u001b[39m,\u001b[38;5;241m1\u001b[39m)\n\u001b[1;32m 9\u001b[0m min_nsta\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m4\u001b[39m \u001b[38;5;66;03m#minimum number of stations to relocate the earthquake. 4 is recommeneded as the minimum to get a reliable location.\u001b[39;00m\n\u001b[1;32m 10\u001b[0m keep_summary_files\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mFalse\u001b[39;00m \u001b[38;5;66;03m#keep intermediate summary files from each relocation run?\u001b[39;00m\n",
"\u001b[0;31mNameError\u001b[0m: name 'np' is not defined"
]
}
],
"outputs": [],
"source": [
"# modified from https://github.com/YijianZhou/Hypo-Interface-Py\n",
"phase_file='input/EQT_Y2000.phs'\n",
Expand Down Expand Up @@ -29499,7 +29487,20 @@
" 767 2019- 9- 1 13:29 - 35 36 117 28 11.29 0.05 0.0 6 10.8 1.1 200767\n",
" 768 2019- 9- 1 13:30 - 35 37 117 29 8.24 0.07 0.0 6 10.9 4.2 200768\n",
" 769 2019- 9- 1 13:31 - 35 33 117 31 5.26 0.05 0.0 6 8.0 7.3 200769\n",
" 770 2019- 9- 1 13:31 - 35 40 117 32 7.10 0.06 0.0 6 10.6 6.4 200770\n",
" 770 2019- 9- 1 13:31 - 35 40 117 32 7.10 0.06 0.0 6 10.6 6.4 200770\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Note: The following floating-point exceptions are signalling: IEEE_DENORMAL\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
" 771 2019- 9- 1 13:31 - 35 38 117 39 0.00 2.30 0.0 6 89.1 88.9 200771\n",
" 772 2019- 9- 1 13:33 - 35 35 117 26 0.63 0.01 0.0 4 12.5 2.0 200772\n",
" 773 2019- 9- 1 13:33 - 35 34 117 30 5.73 0.04 0.0 5 8.6 5.1 200773\n",
Expand Down Expand Up @@ -29916,20 +29917,7 @@
" 1118 2019- 9- 1 18:26 - 35 33 117 28 5.62 0.08 0.0 6 9.4 6.0 201118\n",
" 1119 2019- 9- 1 18:26 - 35 33 117 28 6.09 0.03 0.0 6 8.0 5.0 201119\n",
" 1120 2019- 9- 1 18:27 - 35 41 117 36 4.40 0.03 0.0 6 9.9 7.2 201120\n",
" 1121 2019- 9- 1 18:27 - 35 38 117 27 6.95 0.03 0.0 5 9.6 7.6 201121\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Note: The following floating-point exceptions are signalling: IEEE_DENORMAL\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
" 1121 2019- 9- 1 18:27 - 35 38 117 27 6.95 0.03 0.0 5 9.6 7.6 201121\n",
" 1122 2019- 9- 1 18:28 - 35 40 117 26 7.28 0.02 0.0 5 7.6 9.5 201122\n",
" 1123 2019- 9- 1 18:28 - 35 40 117 26 8.03 0.13 0.0 6 9.1 11.9 201123\n",
" *** SKIP EVENT WITH LESS THAN 3 PHASE CARDS:2019 9 1 18 31\n",
Expand Down Expand Up @@ -36494,20 +36482,7 @@
" 647 2019- 9- 1 11:56 - 35 35 117 27 15.26 0.02 0.0 6 11.9 1.0 200647\n",
" 648 2019- 9- 1 11:57 - 35 35 117 28 12.93 0.02 0.0 5 11.5 1.1 200648\n",
" 649 2019- 9- 1 11:57 - 35 36 117 29 8.36 0.05 0.0 6 10.6 0.7 200649\n",
" 650 2019- 9- 1 11:58 - 35 47 117 57 10.01 0.13 0.0 6 15.0 14.1 200650\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Note: The following floating-point exceptions are signalling: IEEE_DENORMAL\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
" 650 2019- 9- 1 11:58 - 35 47 117 57 10.01 0.13 0.0 6 15.0 14.1 200650\n",
" *** DISTANCE & RESIDUAL WEIGHTING CANCELLED FOR EVENT: 2019 9 1 11 59\n",
" 651 2019- 9- 1 11:59 - 35 36 117 29 9.90 0.27 0.0 5 20.7 3.5 200651\n",
" 652 2019- 9- 1 12:00 - 35 37 117 34 0.02 0.75 0.0 6 45.8 32.2 200652\n",
Expand Down Expand Up @@ -37191,7 +37166,20 @@
" 1227 2019- 9- 1 20:13 - 35 41 117 43 16.54 0.01 0.0 5 12.5 4.5 201228\n",
" 1228 2019- 9- 1 20:14 - 35 36 117 28 8.45 0.05 0.0 6 12.0 1.0 201229\n",
" 1229 2019- 9- 1 20:15 - 35 35 117 32 8.27 0.04 0.0 5 11.1 3.7 201230\n",
" 1230 2019- 9- 1 20:15 - 35 36 117 28 7.11 0.04 0.0 6 9.6 0.8 201231\n",
" 1230 2019- 9- 1 20:15 - 35 36 117 28 7.11 0.04 0.0 6 9.6 0.8 201231\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Note: The following floating-point exceptions are signalling: IEEE_DENORMAL\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
" SEQ ---DATE--- TIME REMARK -LAT- --LON- DEPTH RMS PMAG NUM ERH ERZ ID\n",
" 1231 2019- 9- 1 20:16 - 35 38 117 33 9.75 0.06 0.0 6 11.4 2.4 201232\n",
" 1232 2019- 9- 1 20:16 - 35 40 117 41 19.01 0.15 0.0 5 16.8 3.6 201233\n",
Expand Down Expand Up @@ -61537,20 +61525,7 @@
" 683 2019- 9- 1 12:21 - 35 39 117 38 16.16 0.14 0.0 5 16.8 2.1 200683\n",
" 684 2019- 9- 1 12:22 - 35 41 117 46 18.09 0.06 0.0 5 13.4 5.6 200684\n",
" *** DISTANCE & RESIDUAL WEIGHTING CANCELLED FOR EVENT: 2019 9 1 12 22\n",
" 685 2019- 9- 1 12:22 - 35 33 117 18 14.09 3.23 0.0 5 98.7 42.4 200685\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Note: The following floating-point exceptions are signalling: IEEE_UNDERFLOW_FLAG IEEE_DENORMAL\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
" 685 2019- 9- 1 12:22 - 35 33 117 18 14.09 3.23 0.0 5 98.7 42.4 200685\n",
" 686 2019- 9- 1 12:22 - 35 35 117 26 11.73 0.22 0.0 4 22.2 2.3 200686\n",
" 687 2019- 9- 1 12:23 - 35 41 117 46 8.33 2.70 0.0 5 84.8 83.8 200687\n",
" *** DISTANCE & RESIDUAL WEIGHTING CANCELLED FOR EVENT: 2019 9 1 12 24\n",
Expand Down Expand Up @@ -61943,7 +61918,20 @@
" 1013 2019- 9- 1 16:56 - 35 36 117 30 8.61 0.05 0.0 6 10.2 1.0 201013\n",
" 1014 2019- 9- 1 16:56 - 35 36 117 30 9.21 0.03 0.0 6 10.1 1.0 201014\n",
" 1015 2019- 9- 1 16:57 - 35 36 117 29 12.09 0.07 0.0 6 11.4 1.1 201015\n",
" 1016 2019- 9- 1 16:57 - 35 37 117 34 7.94 0.04 0.0 6 11.6 1.3 201016\n",
" 1016 2019- 9- 1 16:57 - 35 37 117 34 7.94 0.04 0.0 6 11.6 1.3 201016\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Note: The following floating-point exceptions are signalling: IEEE_UNDERFLOW_FLAG IEEE_DENORMAL\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
" 1017 2019- 9- 1 16:59 - 35 36 117 29 8.33 0.07 0.0 6 10.4 1.1 201017\n",
" 1018 2019- 9- 1 17:00 - 35 36 117 28 8.37 0.05 0.0 6 9.6 1.1 201018\n",
" 1019 2019- 9- 1 17:00 - 35 39 117 38 21.79 0.11 0.0 6 14.3 2.7 201019\n",
Expand Down Expand Up @@ -71494,7 +71482,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"converting output sum files\n"
"converting output sum files\n",
"Earthquakes are saved in: output/hyp_good.csv and output/hyp_bad.csv for good and bad sources.\n"
]
}
],
Expand Down Expand Up @@ -71546,7 +71535,7 @@
{
"data": {
"text/plain": [
"<matplotlib.collections.PathCollection at 0x16897d0d0>"
"<matplotlib.collections.PathCollection at 0x155a53110>"
]
},
"execution_count": 9,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

# Arguments marked as "Required" below must be included for upload to PyPI.
# Fields marked as "Optional" may be commented out.
version='0.0.1'
version='0.5.0'
setup(
name='hypoinvpy',
version=version,
Expand Down

0 comments on commit b11bb51

Please sign in to comment.