irie 0.0.46__py3-none-any.whl → 0.0.48__py3-none-any.whl
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.
Potentially problematic release.
This version of irie might be problematic. Click here for more details.
- irie/apps/prediction/runners/opensees/utilities.py +1 -1
- irie/init/management/commands/init_cesmd.py +13 -0
- {irie-0.0.46.dist-info → irie-0.0.48.dist-info}/METADATA +2 -1
- {irie-0.0.46.dist-info → irie-0.0.48.dist-info}/RECORD +7 -7
- {irie-0.0.46.dist-info → irie-0.0.48.dist-info}/WHEEL +0 -0
- {irie-0.0.46.dist-info → irie-0.0.48.dist-info}/entry_points.txt +0 -0
- {irie-0.0.46.dist-info → irie-0.0.48.dist-info}/top_level.txt +0 -0
|
@@ -8,7 +8,6 @@ import json
|
|
|
8
8
|
import fnmatch
|
|
9
9
|
import numpy as np
|
|
10
10
|
|
|
11
|
-
from matplotlib import pyplot as plt
|
|
12
11
|
from math import pi
|
|
13
12
|
from collections import defaultdict
|
|
14
13
|
import quakeio
|
|
@@ -239,6 +238,7 @@ def getPeak(file, other=None):
|
|
|
239
238
|
return peakVals, timePeakVals, maxPeakCol
|
|
240
239
|
|
|
241
240
|
def husid(accRH, plothusid, dt, lb=0.05, ub=0.95):
|
|
241
|
+
from matplotlib import pyplot as plt
|
|
242
242
|
ai = np.tril(np.ones(len(accRH)))@accRH**2
|
|
243
243
|
husid = ai/ai[-1]
|
|
244
244
|
ilb = next(x for x, val in enumerate(husid) if val > lb)
|
|
@@ -5,11 +5,23 @@ from irie.init.calid import CALID, CESMD
|
|
|
5
5
|
from pathlib import Path
|
|
6
6
|
from django.core.management.base import BaseCommand
|
|
7
7
|
import json
|
|
8
|
+
from collections import defaultdict
|
|
8
9
|
|
|
9
10
|
DATA = Path(irie.__file__).parents[0]/"init"/"data"
|
|
10
11
|
|
|
11
12
|
with open(DATA/"cgs_data.json") as f:
|
|
12
13
|
CGS_DATA = json.loads(f.read())
|
|
14
|
+
with open(DATA/"nbi_data_cesmd.json") as f:
|
|
15
|
+
NBI_DATA = json.loads(f.read())
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def nbi_reshape(raw):
|
|
19
|
+
data = defaultdict(dict)
|
|
20
|
+
for row in raw["Results"]["NBIData"]["NBIDataList"]:
|
|
21
|
+
data[row["TABLE_NAME"]][row["EXPANDED_FIELD_ALIAS"]] = row["FIELD_VALUE"]
|
|
22
|
+
|
|
23
|
+
return dict(data)
|
|
24
|
+
|
|
13
25
|
|
|
14
26
|
class Command(BaseCommand):
|
|
15
27
|
def handle(self, *args, **kwargs):
|
|
@@ -29,6 +41,7 @@ class Command(BaseCommand):
|
|
|
29
41
|
asset.cesmd = cesmd
|
|
30
42
|
asset.calid = calid
|
|
31
43
|
asset.cgs_data = CGS_DATA.get(cesmd, {})
|
|
44
|
+
asset.nbi_data = nbi_reshape(NBI_DATA.get(calid.replace("-", " "), [{}])[-1])
|
|
32
45
|
|
|
33
46
|
asset.save()
|
|
34
47
|
print(asset)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: irie
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.48
|
|
4
4
|
Summary: An infrastructure resilience engine
|
|
5
5
|
Author-email: "Claudio M. Perez" <50180406+claudioperez@users.noreply.github.com>
|
|
6
6
|
Project-URL: Repository, https://github.com/STAIRLab
|
|
@@ -32,6 +32,7 @@ Requires-Dist: opensees
|
|
|
32
32
|
Requires-Dist: quakeio
|
|
33
33
|
Requires-Dist: mdof
|
|
34
34
|
Requires-Dist: veux
|
|
35
|
+
Requires-Dist: xara
|
|
35
36
|
Requires-Dist: bottle
|
|
36
37
|
Requires-Dist: openbim
|
|
37
38
|
Requires-Dist: folium
|
|
@@ -111,7 +111,7 @@ irie/apps/prediction/runners/hazus.py,sha256=sWQDDmwN82wKSHW9EGx46JOOPo_IN2CTK7R
|
|
|
111
111
|
irie/apps/prediction/runners/ssid.py,sha256=Y36FMPVzjNMXknQO6LegTBFUF2X-l7TXyddY4Z8SDmA,18701
|
|
112
112
|
irie/apps/prediction/runners/opensees/__init__.py,sha256=QlInYqEKc1oYBnw6TeF4dS3VnOxmQeLptF9EKr-blfM,21177
|
|
113
113
|
irie/apps/prediction/runners/opensees/metrics.py,sha256=HU1V0RYQDXrhTcHqwpnU2KOSl4UPNo9S6QP3sz2VcUY,6428
|
|
114
|
-
irie/apps/prediction/runners/opensees/utilities.py,sha256=
|
|
114
|
+
irie/apps/prediction/runners/opensees/utilities.py,sha256=1cajnV6gWkJ5obYixfbHZKwxi1ECpR0sBWquAAGhseE,9032
|
|
115
115
|
irie/apps/prediction/runners/opensees/xmlutils.py,sha256=Q3i5L0Dp_5nRsKRGMr-m_bS03Mxa36Ujb-RvwAmResc,7510
|
|
116
116
|
irie/apps/prediction/runners/opensees/zipped.py,sha256=ou2BnxY4WzAzVp3cL9XJUeSJqdijRs-rbcagOsX_Ed0,942
|
|
117
117
|
irie/apps/prediction/runners/opensees/schemas/__init__.py,sha256=AMX2Z5F_ltcB6ny1U41aDXIbAmS7wprjcA35j511XBU,1033
|
|
@@ -482,15 +482,15 @@ irie/init/data/nbi_definitions.json,sha256=NS3yNP1i1E_JXfGW_I_xOoNRsfeljDA5BZ_1h
|
|
|
482
482
|
irie/init/data/nbi/04.tar,sha256=ubRgxWBshe0cNKxftbEVyFeh1HcUmFarVL2BBHo9Tyk,1884160
|
|
483
483
|
irie/init/data/networks/soga_corridors.json,sha256=AQOUaKGNWkQxQKLfqphE9Qb_-NRmjN9IwK59SGjutxE,45496
|
|
484
484
|
irie/init/management/commands/init_assets.py,sha256=z-QczBwa7altFy8oLgKtF2_ogHwWOGGFiMJYLkol-zU,5709
|
|
485
|
-
irie/init/management/commands/init_cesmd.py,sha256=
|
|
485
|
+
irie/init/management/commands/init_cesmd.py,sha256=BDQqTzZGogVMjdRZgKr9MOZEhe78E8EvhIzB1zNuBBc,1626
|
|
486
486
|
irie/init/management/commands/init_corridors.py,sha256=EzLk0HUiFxlco-2u0rypewOc9mAo_raqXC2_UCG8a_w,1241
|
|
487
487
|
irie/init/management/commands/init_predictors.py,sha256=edCf7d36cwl4YitXLtvOfsPee-BiPF55_Gr73OvTPcU,2368
|
|
488
488
|
irie/init/management/commands/make_asset.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
489
489
|
irie/pull/nbi.py,sha256=KpBjJ9GEU72Qk1t4bGN9cg0QBeVJ8k9XcI3Y1oSgIR0,11478
|
|
490
490
|
irie/rest/__main__.py,sha256=6Nf_-Rr9zGmMyp_wqCFDO7ls9QPnPd9UyUgN17rIGYw,3680
|
|
491
491
|
irie/usgs/__main__.py,sha256=HiSvPn5IW5IqRiCk1qRRq5dCy3-7iISw7v1P_w2rLrk,5049
|
|
492
|
-
irie-0.0.
|
|
493
|
-
irie-0.0.
|
|
494
|
-
irie-0.0.
|
|
495
|
-
irie-0.0.
|
|
496
|
-
irie-0.0.
|
|
492
|
+
irie-0.0.48.dist-info/METADATA,sha256=KGSRxqsOhraNrCUpT3-fbCggjfmUU6510Waf0i_JeLk,3227
|
|
493
|
+
irie-0.0.48.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
|
494
|
+
irie-0.0.48.dist-info/entry_points.txt,sha256=A_3h9wPBGfxGQ78_MGa-nO6Z0foxOYeAnIE47jxEztg,44
|
|
495
|
+
irie-0.0.48.dist-info/top_level.txt,sha256=zVCxi5E2nkISZPzKq8VEhWe_dGuPcefLYV1tYqQdwlY,5
|
|
496
|
+
irie-0.0.48.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|