irie 0.0.51__py3-none-any.whl → 0.0.53__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/inventory/views.py +3 -0
- irie/apps/prediction/runners/__init__.py +2 -1
- irie/apps/prediction/runners/ssid.py +5 -3
- irie/apps/prediction/views.py +6 -6
- irie/apps/templates/prediction/viewer/veux-viewer.js +5 -3
- irie/apps/templates/prediction/xara-profile.html +1 -1
- {irie-0.0.51.dist-info → irie-0.0.53.dist-info}/METADATA +1 -1
- {irie-0.0.51.dist-info → irie-0.0.53.dist-info}/RECORD +11 -11
- {irie-0.0.51.dist-info → irie-0.0.53.dist-info}/WHEEL +0 -0
- {irie-0.0.51.dist-info → irie-0.0.53.dist-info}/entry_points.txt +0 -0
- {irie-0.0.51.dist-info → irie-0.0.53.dist-info}/top_level.txt +0 -0
irie/apps/inventory/views.py
CHANGED
|
@@ -337,6 +337,9 @@ def asset_profile(request, calid):
|
|
|
337
337
|
except Exception as e:
|
|
338
338
|
if "DEBUG" in os.environ and os.environ["DEBUG"]:
|
|
339
339
|
raise e
|
|
340
|
+
import sys
|
|
341
|
+
print(e, file=sys.stderr)
|
|
342
|
+
print(e)
|
|
340
343
|
html_template = loader.get_template("site/page-500.html")
|
|
341
344
|
return HttpResponse(html_template.render(context, request))
|
|
342
345
|
|
|
@@ -45,7 +45,8 @@ class Runner:
|
|
|
45
45
|
|
|
46
46
|
self.runs = {}
|
|
47
47
|
if pred.config_file:
|
|
48
|
-
|
|
48
|
+
# TODO: for Amazon S3
|
|
49
|
+
# self.model_file = Path(pred.config_file.path).resolve()
|
|
49
50
|
self.out_dir = Path(__file__).parents[0]/"Predictions"
|
|
50
51
|
else:
|
|
51
52
|
self.model_file = None
|
|
@@ -15,9 +15,7 @@ import numpy as np
|
|
|
15
15
|
# Ensure Agg backend is set for non-interactive plotting
|
|
16
16
|
|
|
17
17
|
import quakeio
|
|
18
|
-
from mdof import transform
|
|
19
18
|
from scipy.signal import find_peaks
|
|
20
|
-
from mdof.utilities import Config, extract_channels
|
|
21
19
|
import subprocess
|
|
22
20
|
|
|
23
21
|
|
|
@@ -318,6 +316,7 @@ def _load_events(asset, output_channels):
|
|
|
318
316
|
}
|
|
319
317
|
"""
|
|
320
318
|
events = {}
|
|
319
|
+
from mdof.utilities import extract_channels
|
|
321
320
|
for evt in EventRecord.objects.filter(asset=asset):
|
|
322
321
|
|
|
323
322
|
try:
|
|
@@ -342,6 +341,8 @@ def _get_spectra(event, conf, cmap):
|
|
|
342
341
|
with the maximum period of the N_PEAKS tallest peaks, as well as plotting options
|
|
343
342
|
such as color and alpha.
|
|
344
343
|
"""
|
|
344
|
+
from mdof import transform
|
|
345
|
+
from mdof.utilities import Config
|
|
345
346
|
period_band = conf.period_band
|
|
346
347
|
|
|
347
348
|
n_outputs = event['outputs'].shape[0]
|
|
@@ -466,7 +467,7 @@ def _plot_mountains(spectra, accellim=None):
|
|
|
466
467
|
|
|
467
468
|
|
|
468
469
|
def make_mountains(asset, conf=None, output_channels=None):
|
|
469
|
-
|
|
470
|
+
from mdof.utilities import Config
|
|
470
471
|
cmap = colormaps['plasma']
|
|
471
472
|
if conf is None:
|
|
472
473
|
conf = Config()
|
|
@@ -547,6 +548,7 @@ if __name__ == '__main__':
|
|
|
547
548
|
import sys
|
|
548
549
|
from matplotlib import pyplot as plt, ticker, cm
|
|
549
550
|
from matplotlib import colormaps
|
|
551
|
+
from mdof.utilities import Config
|
|
550
552
|
|
|
551
553
|
procedure = parse_args(sys.argv)
|
|
552
554
|
STATION_TYPE = procedure['STATION_TYPE']
|
irie/apps/prediction/views.py
CHANGED
|
@@ -120,15 +120,15 @@ def predictor_profile(request, calid, preid):
|
|
|
120
120
|
context["predictor"] = predictor
|
|
121
121
|
context["sensors"] = predictor.sensorassignment_set.all()
|
|
122
122
|
|
|
123
|
-
if predictor.protocol == PredictorModel.Protocol.TYPE1:
|
|
124
|
-
html_template = loader.get_template("prediction/xara-profile.html")
|
|
125
|
-
context["members"] = context["runner"].structural_members()
|
|
126
123
|
|
|
127
|
-
|
|
128
|
-
|
|
124
|
+
try:
|
|
125
|
+
if predictor.protocol == PredictorModel.Protocol.TYPE1:
|
|
126
|
+
html_template = loader.get_template("prediction/xara-profile.html")
|
|
127
|
+
context["members"] = context["runner"].structural_members()
|
|
129
128
|
|
|
129
|
+
else:
|
|
130
|
+
html_template = loader.get_template("prediction/predictor-profile.html")
|
|
130
131
|
|
|
131
|
-
try:
|
|
132
132
|
return HttpResponse(html_template.render(context, request))
|
|
133
133
|
|
|
134
134
|
except Exception as e:
|
|
@@ -7,11 +7,12 @@
|
|
|
7
7
|
class VeuxViewer {
|
|
8
8
|
#initializedTabs;
|
|
9
9
|
#table;
|
|
10
|
+
#url;
|
|
10
11
|
#tabLinkContainer;
|
|
11
12
|
#tabContentContainer;
|
|
12
13
|
|
|
13
|
-
constructor(
|
|
14
|
-
this.#
|
|
14
|
+
constructor(url, tabLinkContainer, tabContentContainer) {
|
|
15
|
+
this.#url = url;
|
|
15
16
|
this.#initializedTabs = [];
|
|
16
17
|
this.#tabLinkContainer = tabLinkContainer;
|
|
17
18
|
this.#tabContentContainer = tabContentContainer;
|
|
@@ -144,7 +145,8 @@ class VeuxViewer {
|
|
|
144
145
|
</div>
|
|
145
146
|
`;
|
|
146
147
|
|
|
147
|
-
let apiUrl =
|
|
148
|
+
let apiUrl = `${this.#url}${tab}`;
|
|
149
|
+
console.log(`Fetching content from: ${apiUrl}`);
|
|
148
150
|
|
|
149
151
|
if (true) {
|
|
150
152
|
contentDiv.innerHTML = "";
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
<script>
|
|
145
145
|
{% include "prediction/viewer/veux-viewer.js" %}
|
|
146
146
|
|
|
147
|
-
const VIEWER = new VeuxViewer(
|
|
147
|
+
const VIEWER = new VeuxViewer(`/inventory/{{asset.calid}}/predictors/{{predictor.id}}/detail/?section=`,
|
|
148
148
|
document.querySelector('#tab-link-container'),
|
|
149
149
|
document.getElementById('tab-content-container'));
|
|
150
150
|
|
|
@@ -65,7 +65,7 @@ irie/apps/inventory/models.py,sha256=VdJ_5mEb6lBk21NalK8bhOy0u6SFdWmhXpcQ4vRs3Pg
|
|
|
65
65
|
irie/apps/inventory/sitemaps.py,sha256=Nha1MTsIH_ad7JyoxwonPytp7MNuEhDNszkEUOmlN0o,826
|
|
66
66
|
irie/apps/inventory/tables.py,sha256=vZdPOcbN1ibuWXqLwbBUoQw9iavwa1GJ5fd83k8bu7Y,27874
|
|
67
67
|
irie/apps/inventory/urls.py,sha256=u2LNLB4K4fDq3yPYtREKf3i7_yHRzrTP3cb22G8Brvk,1578
|
|
68
|
-
irie/apps/inventory/views.py,sha256=
|
|
68
|
+
irie/apps/inventory/views.py,sha256=0CyW2MytaUTlaWZsJ0HREcm9yHlt9zEacUrSAJnUNpQ,21951
|
|
69
69
|
irie/apps/inventory/archive/CESMD.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
70
70
|
irie/apps/inventory/archive/calid.py,sha256=3L8MbPIGOE3kzDnqeyY055pRBiF2O2l0cmpuDbTsdTg,3014
|
|
71
71
|
irie/apps/inventory/migrations/0001_initial.py,sha256=PwTHv4Q3gqWFha--8Zp9kUOh-cYalB14jXj7RVJUVnw,1786
|
|
@@ -100,7 +100,7 @@ irie/apps/prediction/metrics.py,sha256=Zh1utUZTGddQEVn4e1rLO74tbIz7bVvZli8sgmuB_
|
|
|
100
100
|
irie/apps/prediction/models.py,sha256=hmgSXRgUovuekHCxqPaqSiN7WNNjY7iAz9gqOOlELLo,2841
|
|
101
101
|
irie/apps/prediction/predictor.py,sha256=-x_4kHWnfUxiX2aQfbl3dsbVAG4lRKAFbo1CqfZNCIc,831
|
|
102
102
|
irie/apps/prediction/urls.py,sha256=_v7CdR97c7eMcsilURYP0c1QCzxBNnex0lbcTfWrpOI,1028
|
|
103
|
-
irie/apps/prediction/views.py,sha256=
|
|
103
|
+
irie/apps/prediction/views.py,sha256=iP0SyE1WVbGCNDM2T44E0HNvNJSuN8FSSOOF5uv1fYk,9251
|
|
104
104
|
irie/apps/prediction/views_api.py,sha256=DJzLYO5ouPOWkkZJNZxZJzxC3TROKJ-L6Z2IC1NMuFQ,6888
|
|
105
105
|
irie/apps/prediction/migrations/0001_initial.py,sha256=-0GWd2vUUAzSPfptccAJ3raI3UD4Xj9H0E5EJ7xN0Ek,1428
|
|
106
106
|
irie/apps/prediction/migrations/0002_alter_predictormodel_protocol.py,sha256=nrQvuZ1eRR7fR17IjdS0Xyw14y9DpE6HkG2-h7HQ_zA,560
|
|
@@ -109,9 +109,9 @@ irie/apps/prediction/migrations/0004_sensorassignment.py,sha256=aUSFlaXiclLH68nF
|
|
|
109
109
|
irie/apps/prediction/migrations/0005_remove_sensorassignment_offset_x_and_more.py,sha256=ojU-wQl6CEtiDpS2mVJurSuw9UUdCxDblP_PDcVgqNQ,1472
|
|
110
110
|
irie/apps/prediction/migrations/0006_remove_sensorassignment_show_x_and_more.py,sha256=GbvT1XpRL7Eu_4lm6RYJziUtvFOcI9qTQoUIDvkuZWg,595
|
|
111
111
|
irie/apps/prediction/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
112
|
-
irie/apps/prediction/runners/__init__.py,sha256=
|
|
112
|
+
irie/apps/prediction/runners/__init__.py,sha256=pur6vJ5zXwjyTxl7p0TBJ8dt-2h-4Ty65KPmtRM8lyQ,2308
|
|
113
113
|
irie/apps/prediction/runners/hazus.py,sha256=sWQDDmwN82wKSHW9EGx46JOOPo_IN2CTK7RF23Rx4c4,31207
|
|
114
|
-
irie/apps/prediction/runners/ssid.py,sha256=
|
|
114
|
+
irie/apps/prediction/runners/ssid.py,sha256=sVOsDm5TotpUdd2mTqvAiMveOPMjTEoQBy40EyCY5YI,18807
|
|
115
115
|
irie/apps/prediction/runners/opensees/__init__.py,sha256=S5qKLo_7_pJKiSvsArpNz012h7ku4eR0tk35fLegKdk,23051
|
|
116
116
|
irie/apps/prediction/runners/opensees/metrics.py,sha256=HU1V0RYQDXrhTcHqwpnU2KOSl4UPNo9S6QP3sz2VcUY,6428
|
|
117
117
|
irie/apps/prediction/runners/opensees/utilities.py,sha256=1cajnV6gWkJ5obYixfbHZKwxi1ECpR0sBWquAAGhseE,9032
|
|
@@ -427,11 +427,11 @@ irie/apps/templates/prediction/create-mdof.html,sha256=QVuZGz3E5iwYvOQk_kkitAt5q
|
|
|
427
427
|
irie/apps/templates/prediction/create-model.html,sha256=QjgeuEqSCDFbJlGK3PY6LePia3vJXKqD6g2TKdpIeE4,3237
|
|
428
428
|
irie/apps/templates/prediction/new-runner.html,sha256=7gMXrrD-CylMDUelIltB9JnmnqlBr4euqktTfRFnhdU,1586
|
|
429
429
|
irie/apps/templates/prediction/predictor-profile.html,sha256=PWUQAOAAWQP_Ak2D-cQP5PoVjyLiz6Kc8lhNLlffnZk,1253
|
|
430
|
-
irie/apps/templates/prediction/xara-profile.html,sha256=
|
|
430
|
+
irie/apps/templates/prediction/xara-profile.html,sha256=eCzUuPcv03QBYwipYAN30uEUB1wVKKUWGfqd3q1kUEI,8843
|
|
431
431
|
irie/apps/templates/prediction/hazus/event.html,sha256=vcmQKfb-Gww5sd-kn6b2QL3llRrfQFv8mafVNNxTHrY,841
|
|
432
432
|
irie/apps/templates/prediction/hazus/history.html,sha256=zvnwP0gxSV9JNBbYACnKlMLB9iD7hGUbdkZ6kfJtBik,136
|
|
433
433
|
irie/apps/templates/prediction/hazus/history.js,sha256=blHRXzlEfMBCezPE-2dZCpt2rVgTiGHkYlY1t-clOE8,1101
|
|
434
|
-
irie/apps/templates/prediction/viewer/veux-viewer.js,sha256=
|
|
434
|
+
irie/apps/templates/prediction/viewer/veux-viewer.js,sha256=gPhTyPupjV_RD8t86Lc2wGZsY68TLuv0WjzyaDpRsfI,6189
|
|
435
435
|
irie/apps/templates/sensors/render-sensors.js,sha256=u05VQ7dBDhUMsTYs0_xgdltA2V5DAqenVKgYhAlBxw0,5570
|
|
436
436
|
irie/apps/templates/site/about.html,sha256=5hS5taj3XF-F8z-uIn53ZFXVHVS4apLRMg39OyvMvRs,610
|
|
437
437
|
irie/apps/templates/site/asset_map.html,sha256=rnTjeYMc8NESIo6Uuq8fgZ_xcKNuKdt4zcqoUTDI8Xg,387
|
|
@@ -496,8 +496,8 @@ irie/init/management/commands/make_asset.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm
|
|
|
496
496
|
irie/pull/nbi.py,sha256=KpBjJ9GEU72Qk1t4bGN9cg0QBeVJ8k9XcI3Y1oSgIR0,11478
|
|
497
497
|
irie/rest/__main__.py,sha256=6Nf_-Rr9zGmMyp_wqCFDO7ls9QPnPd9UyUgN17rIGYw,3680
|
|
498
498
|
irie/usgs/__main__.py,sha256=HiSvPn5IW5IqRiCk1qRRq5dCy3-7iISw7v1P_w2rLrk,5049
|
|
499
|
-
irie-0.0.
|
|
500
|
-
irie-0.0.
|
|
501
|
-
irie-0.0.
|
|
502
|
-
irie-0.0.
|
|
503
|
-
irie-0.0.
|
|
499
|
+
irie-0.0.53.dist-info/METADATA,sha256=KeFh5656sSo032wk-q7KSOarl264gYDZbVGtYlGXdiA,3205
|
|
500
|
+
irie-0.0.53.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
|
|
501
|
+
irie-0.0.53.dist-info/entry_points.txt,sha256=A_3h9wPBGfxGQ78_MGa-nO6Z0foxOYeAnIE47jxEztg,44
|
|
502
|
+
irie-0.0.53.dist-info/top_level.txt,sha256=zVCxi5E2nkISZPzKq8VEhWe_dGuPcefLYV1tYqQdwlY,5
|
|
503
|
+
irie-0.0.53.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|