shakemap-modules 1.1.3__tar.gz → 1.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/CHANGELOG.md +4 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/PKG-INFO +1 -1
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/code.json +36 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/utils/smclone.py +24 -53
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules.egg-info/PKG-INFO +1 -1
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/.gitignore +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/.gitlab-ci.yml +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/DISCLAIMER.md +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/LICENSE.md +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/MANIFEST.in +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/README.md +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/install.sh +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/pyproject.toml +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/pytest.ini +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/setup.cfg +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/setup.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/base/base.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/base/cli.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/base/transfer_base.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/assemble.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/associate.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/augment.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/contour.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/coverage.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/dyfi.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/exception.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/gridxml.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/history.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/info.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/kml.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/makecsv.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/mapping.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/model.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/plotregr.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/raster.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/rupture.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/save.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/shape.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/sleep.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/sm_select.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/stations.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/transfer_email.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/transfer_pdl.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/transfer_scp.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/uncertaintymaps.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/xtestimage.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/xtestplot.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/xtestplot_multi.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/xtestplot_spectra.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/fdsn_networks.json +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/gis/WGS1984.prj +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/gis/mi.lyr +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/gis/mi.shp.xml +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/gis/pga.lyr +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/gis/pga.shp.xml +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/gis/pgv.lyr +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/gis/pgv.shp.xml +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/gis/psa0p3.lyr +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/gis/psa0p3.shp.xml +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/gis/psa1p0.lyr +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/gis/psa1p0.shp.xml +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/gis/psa3p0.lyr +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/gis/psa3p0.shp.xml +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/gmpe_sets.conf +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/alaska.wkt +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/australia.wkt +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/california.wkt +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/cascadia.wkt +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/chile.wkt +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/china.wkt +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/europe_share.wkt +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/hawaii.wkt +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/induced.wkt +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/japan.wkt +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/new_zealand.wkt +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/south_africa.wkt +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/taiwan.wkt +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/logging.conf +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/loggingspec.conf +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/mapping/circle.png +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/mapping/intensity_legend.png +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/mapping/map_strings.cn +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/mapping/map_strings.en +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/mapping/map_strings.en-AU +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/mapping/map_strings.en-CA +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/mapping/map_strings.es +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/mapping/map_strings.fr-CA +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/mapping/map_strings.it +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/mapping/map_strings.tw +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/mapping/triangle.png +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/migrate.conf +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/migratespec.conf +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/model.conf +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/modelspec.conf +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/modules.conf +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/modulesspec.conf +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/products.conf +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/productsspec.conf +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/queue.conf +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/queuespec.conf +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/select.conf +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/selectspec.conf +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/shake.conf +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/shakespec.conf +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/simulationspec.conf +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/transfer.conf +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/transfer_reviewed_origin.conf +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/transferspec.conf +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/mapping/mapmaker.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/mapping/mercatormap.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/mapping/scalebar.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/utils/amps.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/utils/comcat.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/utils/config.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/utils/dataframe.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/utils/generic_amp.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/utils/layers.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/utils/logging.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/utils/macros.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/utils/points_to_station.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/utils/probs.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/utils/utils.py +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules.egg-info/SOURCES.txt +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules.egg-info/dependency_links.txt +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules.egg-info/entry_points.txt +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules.egg-info/requires.txt +0 -0
- {shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules.egg-info/top_level.txt +0 -0
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# main
|
|
2
2
|
|
|
3
|
+
## 1.1.4 / 2025-04-07
|
|
4
|
+
- Fixed a bug in sm_clone that prevented the preferred Atlas shakemap from being chosen by default.
|
|
5
|
+
- Fixed a bug that caused sm_clone to incorrectly fail on older fault text files.
|
|
6
|
+
|
|
3
7
|
## 1.1.3 / 2025-03-20
|
|
4
8
|
- Added an option to mapping module to save figure objects to files that can be overplotted later.
|
|
5
9
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: shakemap-modules
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.4
|
|
4
4
|
Summary: USGS Earthquake Impact ShakeMap Modules
|
|
5
5
|
Author-email: Bruce Worden <cbworden@contractor.usgs.gov>, Eric Thompson <emthompsone@usgs.gov>, Mike Hearne <mhearne@usgs.gov>
|
|
6
6
|
License: License
|
|
@@ -1,4 +1,40 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"name": "shakemap-modules",
|
|
4
|
+
"description": "ShakeMap processing modules.",
|
|
5
|
+
"version": "v1.1.4",
|
|
6
|
+
"status": "Development",
|
|
7
|
+
"organization": "U.S. Geological Survey",
|
|
8
|
+
"vcs": "git",
|
|
9
|
+
"repositoryURL": "https://code.usgs.gov/ghsc/esi/shakemap-modules.git",
|
|
10
|
+
"homepageURL": "https://code.usgs.gov/ghsc/esi/shakemap-modules",
|
|
11
|
+
"downloadURL": "https://code.usgs.gov/ghsc/esi/shakemap-modules/-/archive/v1.1.4/shakemap-modules-v1.1.4.zip",
|
|
12
|
+
"disclaimerURL": "https://code.usgs.gov/ghsc/esi/shakemap-modules/-/raw/v1.1.4/DISCLAIMER.md",
|
|
13
|
+
"permissions": {
|
|
14
|
+
"usageType": "openSource",
|
|
15
|
+
"licenses": [
|
|
16
|
+
{
|
|
17
|
+
"name": "Public Domain, CC0-1.0",
|
|
18
|
+
"URL": "https://code.usgs.gov/ghsc/esi/shakemap-modules/-/raw/v1.1.4/LICENSE.md"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"laborHours": 1,
|
|
23
|
+
"languages": [
|
|
24
|
+
"python"
|
|
25
|
+
],
|
|
26
|
+
"tags": [
|
|
27
|
+
"earthquake",
|
|
28
|
+
"utilities"
|
|
29
|
+
],
|
|
30
|
+
"contact": {
|
|
31
|
+
"name": "Bruce Worden",
|
|
32
|
+
"email": "cbworden@contractor.usgs.gov"
|
|
33
|
+
},
|
|
34
|
+
"date": {
|
|
35
|
+
"metadataLastUpdated": "2025-03-20"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
2
38
|
{
|
|
3
39
|
"name": "shakemap-modules",
|
|
4
40
|
"description": "ShakeMap processing modules.",
|
|
@@ -16,10 +16,7 @@ import pandas as pd
|
|
|
16
16
|
import requests
|
|
17
17
|
from configobj import ConfigObj
|
|
18
18
|
from esi_shakelib.station import StationList
|
|
19
|
-
from esi_utils_rupture.factory import
|
|
20
|
-
rupture_from_dict_and_origin,
|
|
21
|
-
text_to_json,
|
|
22
|
-
)
|
|
19
|
+
from esi_utils_rupture.factory import rupture_from_dict_and_origin, text_to_json
|
|
23
20
|
from esi_utils_rupture.origin import Origin, write_event_file
|
|
24
21
|
from shakemap_modules.coremods.dyfi import _get_dyfi_dataframe
|
|
25
22
|
from shakemap_modules.coremods.sm_select import SelectModule
|
|
@@ -27,7 +24,9 @@ from shakemap_modules.utils.comcat import get_bytes
|
|
|
27
24
|
from shakemap_modules.utils.dataframe import dataframe_to_xml
|
|
28
25
|
from shakemap_modules.utils.utils import get_network_name
|
|
29
26
|
|
|
30
|
-
EVENT_URL_TEMPLATE =
|
|
27
|
+
EVENT_URL_TEMPLATE = (
|
|
28
|
+
"https://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/{eventid}.geojson"
|
|
29
|
+
)
|
|
31
30
|
EVENT_SCENARIO_TEMPLATE = (
|
|
32
31
|
"https://earthquake.usgs.gov/fdsnws/scenario/1"
|
|
33
32
|
"/query?eventid={eventid}&format=geojson"
|
|
@@ -87,13 +86,12 @@ class ShakeClone:
|
|
|
87
86
|
for prefsource in DEFAULT_SOURCE_PREFERENCES:
|
|
88
87
|
if prefsource in sources:
|
|
89
88
|
idx = sources.index(prefsource)
|
|
89
|
+
break
|
|
90
90
|
|
|
91
91
|
self.shakemap = shakemaps[idx]
|
|
92
92
|
self.event_dict = event_dict
|
|
93
93
|
if self.event_dict is None:
|
|
94
|
-
self.event_dict = self.get_event_dict(
|
|
95
|
-
is_online_scenario=is_online_scenario
|
|
96
|
-
)
|
|
94
|
+
self.event_dict = self.get_event_dict(is_online_scenario=is_online_scenario)
|
|
97
95
|
|
|
98
96
|
self.origin = Origin(self.event_dict)
|
|
99
97
|
|
|
@@ -123,9 +121,7 @@ class ShakeClone:
|
|
|
123
121
|
/ "modules.conf"
|
|
124
122
|
)
|
|
125
123
|
select_file = (
|
|
126
|
-
importlib_resources.files("shakemap_modules")
|
|
127
|
-
/ "data"
|
|
128
|
-
/ "select.conf"
|
|
124
|
+
importlib_resources.files("shakemap_modules") / "data" / "select.conf"
|
|
129
125
|
)
|
|
130
126
|
model, messages = self.get_model_conf(
|
|
131
127
|
module_file, select_file, skip_bounds=skip_bounds
|
|
@@ -137,12 +133,10 @@ class ShakeClone:
|
|
|
137
133
|
model.write()
|
|
138
134
|
model_filename = model.filename
|
|
139
135
|
if get_dyfi or get_instrumented or get_macroseismic:
|
|
140
|
-
macroseismic_json, instrumented_json, dyfi_json = (
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
instrumented=get_instrumented,
|
|
145
|
-
)
|
|
136
|
+
macroseismic_json, instrumented_json, dyfi_json = self.get_data_dicts(
|
|
137
|
+
dyfi=get_dyfi,
|
|
138
|
+
macroseismic=get_macroseismic,
|
|
139
|
+
instrumented=get_instrumented,
|
|
146
140
|
)
|
|
147
141
|
for jsonstr, data_type in zip(
|
|
148
142
|
[macroseismic_json, instrumented_json, dyfi_json],
|
|
@@ -190,39 +184,22 @@ class ShakeClone:
|
|
|
190
184
|
rupture_text = response.text
|
|
191
185
|
|
|
192
186
|
rupture_io = StringIO(rupture_text)
|
|
193
|
-
# text_to_json doesn't flip lat/lons around if lats come first
|
|
194
|
-
# detect and fix that
|
|
195
|
-
df = pd.read_csv(
|
|
196
|
-
rupture_io,
|
|
197
|
-
delimiter=r"\s+",
|
|
198
|
-
names=["x1", "x2", "depth"],
|
|
199
|
-
)
|
|
200
|
-
# if any values in 2nd column
|
|
201
|
-
c2_lon = (df["x2"] > 90).any() or (df["x2"] < -90).any()
|
|
202
|
-
if c2_lon:
|
|
203
|
-
df["tmp"] = df["x2"].copy()
|
|
204
|
-
df["x2"] = df["x1"].copy()
|
|
205
|
-
df["x1"] = df["tmp"]
|
|
206
|
-
df.drop(labels=["tmp"], axis="columns", inplace=True)
|
|
207
|
-
rupture_io = StringIO()
|
|
208
|
-
df.to_csv(
|
|
209
|
-
rupture_io, sep=" ", index=False, header=False
|
|
210
|
-
)
|
|
211
|
-
rupture_io.seek(0)
|
|
212
187
|
try:
|
|
213
|
-
rupture_dict = text_to_json(
|
|
214
|
-
|
|
188
|
+
rupture_dict = text_to_json(rupture_io, new_format=True)
|
|
189
|
+
rupture = rupture_from_dict_and_origin(
|
|
190
|
+
rupture_dict, self.origin
|
|
215
191
|
)
|
|
216
|
-
|
|
217
192
|
except Exception as ve:
|
|
218
193
|
try:
|
|
219
|
-
|
|
220
|
-
|
|
194
|
+
rupture_io.seek(0)
|
|
195
|
+
rupture_dict = text_to_json(rupture_io, new_format=False)
|
|
196
|
+
rupture = rupture_from_dict_and_origin(
|
|
197
|
+
rupture_dict, self.origin
|
|
221
198
|
)
|
|
222
199
|
has_coordinates = len(
|
|
223
|
-
rupture_dict["features"][0]["geometry"][
|
|
224
|
-
|
|
225
|
-
]
|
|
200
|
+
rupture_dict["features"][0]["geometry"]["coordinates"][
|
|
201
|
+
0
|
|
202
|
+
]
|
|
226
203
|
)
|
|
227
204
|
if not has_coordinates:
|
|
228
205
|
raise Exception("No coordinates found.")
|
|
@@ -233,9 +210,7 @@ class ShakeClone:
|
|
|
233
210
|
f"{rupture_url}, error: '{e}'"
|
|
234
211
|
)
|
|
235
212
|
)
|
|
236
|
-
|
|
237
|
-
rupture_dict, self.origin
|
|
238
|
-
)
|
|
213
|
+
|
|
239
214
|
break
|
|
240
215
|
|
|
241
216
|
return rupture
|
|
@@ -416,9 +391,7 @@ class ShakeClone:
|
|
|
416
391
|
netname = self.event_json["properties"]["net"]
|
|
417
392
|
etype = "SCENARIO"
|
|
418
393
|
else:
|
|
419
|
-
netname = get_network_name(
|
|
420
|
-
self.event_json["properties"]["net"]
|
|
421
|
-
)
|
|
394
|
+
netname = get_network_name(self.event_json["properties"]["net"])
|
|
422
395
|
etype = "ACTUAL"
|
|
423
396
|
edict = {
|
|
424
397
|
"id": eventid,
|
|
@@ -448,9 +421,7 @@ class ShakeClone:
|
|
|
448
421
|
if self.shakemap is not None:
|
|
449
422
|
infourl = self.shakemap["contents"]["download/info.json"]["url"]
|
|
450
423
|
jdict = json.loads(get_bytes(infourl).decode("utf8"))
|
|
451
|
-
versiondict = jdict["processing"]["shakemap_versions"][
|
|
452
|
-
"map_data_history"
|
|
453
|
-
]
|
|
424
|
+
versiondict = jdict["processing"]["shakemap_versions"]["map_data_history"]
|
|
454
425
|
return versiondict
|
|
455
426
|
|
|
456
427
|
def get_data_dicts(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: shakemap-modules
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.4
|
|
4
4
|
Summary: USGS Earthquake Impact ShakeMap Modules
|
|
5
5
|
Author-email: Bruce Worden <cbworden@contractor.usgs.gov>, Eric Thompson <emthompsone@usgs.gov>, Mike Hearne <mhearne@usgs.gov>
|
|
6
6
|
License: License
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/base/transfer_base.py
RENAMED
|
File without changes
|
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/associate.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/exception.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/sm_select.py
RENAMED
|
File without changes
|
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/transfer_email.py
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/transfer_pdl.py
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/transfer_scp.py
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/uncertaintymaps.py
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/xtestimage.py
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/xtestplot.py
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/xtestplot_multi.py
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/coremods/xtestplot_spectra.py
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/fdsn_networks.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/gis/psa0p3.shp.xml
RENAMED
|
File without changes
|
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/gis/psa1p0.shp.xml
RENAMED
|
File without changes
|
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/gis/psa3p0.shp.xml
RENAMED
|
File without changes
|
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/alaska.wkt
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/australia.wkt
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/california.wkt
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/cascadia.wkt
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/chile.wkt
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/china.wkt
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/europe_share.wkt
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/hawaii.wkt
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/induced.wkt
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/japan.wkt
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/new_zealand.wkt
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/south_africa.wkt
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/layers/taiwan.wkt
RENAMED
|
File without changes
|
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/loggingspec.conf
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/mapping/circle.png
RENAMED
|
File without changes
|
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/mapping/map_strings.cn
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/mapping/map_strings.en
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/mapping/map_strings.es
RENAMED
|
File without changes
|
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/mapping/map_strings.it
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/mapping/map_strings.tw
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/mapping/triangle.png
RENAMED
|
File without changes
|
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/migratespec.conf
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/modulesspec.conf
RENAMED
|
File without changes
|
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/productsspec.conf
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/simulationspec.conf
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/data/transferspec.conf
RENAMED
|
File without changes
|
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/mapping/mercatormap.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules/utils/points_to_station.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules.egg-info/requires.txt
RENAMED
|
File without changes
|
{shakemap_modules-1.1.3 → shakemap_modules-1.1.4}/src/shakemap_modules.egg-info/top_level.txt
RENAMED
|
File without changes
|