irie 0.0.55__py3-none-any.whl → 0.0.57__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/models.py +22 -1
- irie/apps/inventory/urls.py +3 -0
- irie/apps/inventory/views.py +67 -2
- irie/apps/prediction/models.py +7 -5
- irie/apps/prediction/runners/opensees/__init__.py +179 -177
- irie/apps/prediction/runners/opensees/metrics.py +37 -34
- irie/apps/prediction/views.py +13 -12
- irie/apps/templates/includes/asset-event-table.html +1 -1
- irie/apps/templates/inventory/asset-profile.html +8 -3
- irie/apps/templates/inventory/asset-sensors.html +33 -12
- irie/apps/templates/inventory/sensor-upload.html +88 -54
- irie/apps/templates/prediction/asset-predictors.html +5 -1
- irie/apps/templates/sensors/render-sensors.js +1 -1
- irie/rest/__main__.py +5 -1
- {irie-0.0.55.dist-info → irie-0.0.57.dist-info}/METADATA +6 -5
- {irie-0.0.55.dist-info → irie-0.0.57.dist-info}/RECORD +19 -19
- {irie-0.0.55.dist-info → irie-0.0.57.dist-info}/WHEEL +0 -0
- {irie-0.0.55.dist-info → irie-0.0.57.dist-info}/entry_points.txt +0 -0
- {irie-0.0.55.dist-info → irie-0.0.57.dist-info}/top_level.txt +0 -0
|
@@ -29,40 +29,6 @@ def _get_bot_nodes(model,toptags, column_tags)->list:
|
|
|
29
29
|
return bot_nodes
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
def peak_acceleration_metric(output_directory, config):
|
|
33
|
-
nodes = [node["node"] for node in config["bents"]]
|
|
34
|
-
bents = {node["node"]: node["label"] for node in config["bents"]}
|
|
35
|
-
peaksX, timePeaksX, maxPeakColX = getPeak(output_directory/"TopColAccel_X_txt.txt")
|
|
36
|
-
peaksY, timePeaksY, maxPeakColX = getPeak(output_directory/"TopColAccel_Y_txt.txt")
|
|
37
|
-
out = {"column": [bents.get(n, "NA") for n in nodes],
|
|
38
|
-
"peak_acc_X": peaksX.tolist(),
|
|
39
|
-
"peak_acc_Y": peaksY.tolist(),
|
|
40
|
-
"time_peak_X": timePeaksX.tolist(),
|
|
41
|
-
"time_peak_Y": timePeaksY.tolist(),
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
# BUILD SUMMARY
|
|
45
|
-
peaks = np.array([ out["peak_acc_X"], out["peak_acc_Y"] ])
|
|
46
|
-
maxPeaks = np.max(peaks, axis=1)
|
|
47
|
-
maxPeakins2 = max(maxPeaks)
|
|
48
|
-
maxPeakg = maxPeakins2*0.00259007918
|
|
49
|
-
maxPeakdir = np.argmax(maxPeaks)
|
|
50
|
-
maxPeakLoc = np.argmax(peaks[maxPeakdir])
|
|
51
|
-
col = out["column"][maxPeakLoc]
|
|
52
|
-
timesPeaks = np.array([ out["time_peak_X"], out["time_peak_Y"]])
|
|
53
|
-
timeMaxPeak = timesPeaks[maxPeakdir][maxPeakLoc]
|
|
54
|
-
summary = {
|
|
55
|
-
"peak": str(maxPeakg),
|
|
56
|
-
"units": 'g',
|
|
57
|
-
"col": col,
|
|
58
|
-
"time": timeMaxPeak,
|
|
59
|
-
"metric_completion": 70
|
|
60
|
-
}
|
|
61
|
-
# BUILD DETAILS
|
|
62
|
-
details = [["column", *[k for k in out if k != "column"]]] + [
|
|
63
|
-
[c, *[out[k][i] for k in out if k != "column"]] for i,c in enumerate(out["column"])
|
|
64
|
-
]
|
|
65
|
-
return {"summary": summary, "details": details}
|
|
66
32
|
|
|
67
33
|
def peak_drift_metric(model, output_directory, config):
|
|
68
34
|
VERT = 2
|
|
@@ -109,6 +75,43 @@ def peak_drift_metric(model, output_directory, config):
|
|
|
109
75
|
]
|
|
110
76
|
return {"summary": summary, "details": details}
|
|
111
77
|
|
|
78
|
+
|
|
79
|
+
def peak_acceleration_metric(output_directory, config):
|
|
80
|
+
nodes = [node["node"] for node in config["bents"]]
|
|
81
|
+
bents = {node["node"]: node["label"] for node in config["bents"]}
|
|
82
|
+
peaksX, timePeaksX, maxPeakColX = getPeak(output_directory/"TopColAccel_X_txt.txt")
|
|
83
|
+
peaksY, timePeaksY, maxPeakColX = getPeak(output_directory/"TopColAccel_Y_txt.txt")
|
|
84
|
+
out = {"column": [bents.get(n, "NA") for n in nodes],
|
|
85
|
+
"peak_acc_X": peaksX.tolist(),
|
|
86
|
+
"peak_acc_Y": peaksY.tolist(),
|
|
87
|
+
"time_peak_X": timePeaksX.tolist(),
|
|
88
|
+
"time_peak_Y": timePeaksY.tolist(),
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
# BUILD SUMMARY
|
|
92
|
+
peaks = np.array([ out["peak_acc_X"], out["peak_acc_Y"] ])
|
|
93
|
+
maxPeaks = np.max(peaks, axis=1)
|
|
94
|
+
maxPeakins2 = max(maxPeaks)
|
|
95
|
+
maxPeakg = maxPeakins2*0.00259007918
|
|
96
|
+
maxPeakdir = np.argmax(maxPeaks)
|
|
97
|
+
maxPeakLoc = np.argmax(peaks[maxPeakdir])
|
|
98
|
+
col = out["column"][maxPeakLoc]
|
|
99
|
+
timesPeaks = np.array([ out["time_peak_X"], out["time_peak_Y"]])
|
|
100
|
+
timeMaxPeak = timesPeaks[maxPeakdir][maxPeakLoc]
|
|
101
|
+
summary = {
|
|
102
|
+
"peak": str(maxPeakg),
|
|
103
|
+
"units": 'g',
|
|
104
|
+
"col": col,
|
|
105
|
+
"time": timeMaxPeak,
|
|
106
|
+
"metric_completion": 70
|
|
107
|
+
}
|
|
108
|
+
# BUILD DETAILS
|
|
109
|
+
details = [["column", *[k for k in out if k != "column"]]] + [
|
|
110
|
+
[c, *[out[k][i] for k in out if k != "column"]] for i,c in enumerate(out["column"])
|
|
111
|
+
]
|
|
112
|
+
return {"summary": summary, "details": details}
|
|
113
|
+
|
|
114
|
+
|
|
112
115
|
def accel_response_history_plot(output_directory, config):
|
|
113
116
|
nodes = [node["node"] for node in config["bents"]]
|
|
114
117
|
RH = np.loadtxt(output_directory/"TopColAccel_Y_txt.txt")[:,nodes.index(403)]
|
irie/apps/prediction/views.py
CHANGED
|
@@ -22,8 +22,6 @@ from django.contrib.auth.decorators import login_required
|
|
|
22
22
|
from django.core.exceptions import ObjectDoesNotExist
|
|
23
23
|
from django.core.files.base import ContentFile
|
|
24
24
|
|
|
25
|
-
from django.shortcuts import render
|
|
26
|
-
|
|
27
25
|
from irie.apps.site.view_utils import raise404
|
|
28
26
|
from irie.apps.inventory.models import Asset
|
|
29
27
|
from irie.apps.prediction.predictor import PREDICTOR_TYPES
|
|
@@ -39,10 +37,11 @@ def _string_to_id(s: str) -> str:
|
|
|
39
37
|
).rstrip(b'=').decode('ascii')
|
|
40
38
|
return f"id_{b64}"
|
|
41
39
|
|
|
40
|
+
|
|
42
41
|
@login_required(login_url="/login/")
|
|
43
42
|
def asset_predictors(request, calid):
|
|
44
43
|
|
|
45
|
-
context = {"segment": "
|
|
44
|
+
context = {"segment": "assets"}
|
|
46
45
|
|
|
47
46
|
context["runners"] = list(reversed([
|
|
48
47
|
{
|
|
@@ -123,7 +122,7 @@ def predictor_render(request, calid, preid):
|
|
|
123
122
|
def predictor_profile(request, calid, preid):
|
|
124
123
|
|
|
125
124
|
context = {}
|
|
126
|
-
context["segment"] = "
|
|
125
|
+
context["segment"] = "assets"
|
|
127
126
|
|
|
128
127
|
try:
|
|
129
128
|
asset = Asset.objects.get(calid=calid)
|
|
@@ -138,7 +137,7 @@ def predictor_profile(request, calid, preid):
|
|
|
138
137
|
context["asset"] = asset
|
|
139
138
|
context["runner"] = PREDICTOR_TYPES[predictor.protocol](predictor)
|
|
140
139
|
context["predictor"] = predictor
|
|
141
|
-
context["sensors"]
|
|
140
|
+
context["sensors"] = predictor.sensorassignment_set.all()
|
|
142
141
|
|
|
143
142
|
try:
|
|
144
143
|
if predictor.protocol == PredictorModel.Protocol.TYPE1:
|
|
@@ -164,6 +163,7 @@ def predictor_profile(request, calid, preid):
|
|
|
164
163
|
html_template = loader.get_template("site/page-500.html")
|
|
165
164
|
return HttpResponse(html_template.render(context, request))
|
|
166
165
|
|
|
166
|
+
|
|
167
167
|
@login_required(login_url="/login/")
|
|
168
168
|
def asset_map(request, calid):
|
|
169
169
|
"""
|
|
@@ -238,7 +238,7 @@ def create_model(request, calid):
|
|
|
238
238
|
r400 = loader.get_template("site/page-400.html")
|
|
239
239
|
context = {
|
|
240
240
|
"asset": asset,
|
|
241
|
-
"segment": "
|
|
241
|
+
"segment": "assets",
|
|
242
242
|
"viewer": "babylon",
|
|
243
243
|
"offset": json.dumps(list(reversed(list(asset.coordinates)))),
|
|
244
244
|
}
|
|
@@ -248,18 +248,18 @@ def create_model(request, calid):
|
|
|
248
248
|
|
|
249
249
|
uploaded_file = request.FILES.get('config_file')
|
|
250
250
|
|
|
251
|
-
from
|
|
251
|
+
from xcsi.csi import load, create_model, collect_outlines
|
|
252
252
|
# 1) Parse the CSI file
|
|
253
253
|
try:
|
|
254
254
|
csi = load((str(line.decode()).replace("\r\n","\n") for line in uploaded_file.readlines()))
|
|
255
255
|
except Exception as e:
|
|
256
|
-
return HttpResponse(r400.render({"message": json.dumps({"error": str(e)})}), status=
|
|
256
|
+
return HttpResponse(r400.render({"message": json.dumps({"error": str(e)})}), status=500)
|
|
257
257
|
|
|
258
258
|
# 2) Process CSI data into xara model
|
|
259
259
|
try:
|
|
260
260
|
model = create_model(csi, verbose=True)
|
|
261
261
|
except Exception as e:
|
|
262
|
-
return HttpResponse(r400.render({"message": json.dumps({"error": str(e)})}), status=
|
|
262
|
+
return HttpResponse(r400.render({"message": json.dumps({"error": str(e)})}), status=500)
|
|
263
263
|
|
|
264
264
|
# 3) Render the model
|
|
265
265
|
outlines = collect_outlines(csi, model.frame_tags)
|
|
@@ -270,7 +270,7 @@ def create_model(request, calid):
|
|
|
270
270
|
)
|
|
271
271
|
artist.draw_surfaces()
|
|
272
272
|
|
|
273
|
-
# Generate the .glb
|
|
273
|
+
# Generate the rendering .glb
|
|
274
274
|
glb = artist.canvas.to_glb()
|
|
275
275
|
|
|
276
276
|
if request.POST.get("action") == "commit":
|
|
@@ -289,7 +289,7 @@ def create_model(request, calid):
|
|
|
289
289
|
|
|
290
290
|
context["form"] = form
|
|
291
291
|
|
|
292
|
-
else: #
|
|
292
|
+
else: # GET
|
|
293
293
|
context["form"] = PredictorForm()
|
|
294
294
|
|
|
295
295
|
|
|
@@ -299,7 +299,8 @@ def create_model(request, calid):
|
|
|
299
299
|
except Exception as e:
|
|
300
300
|
if "DEBUG" in os.environ and os.environ["DEBUG"]:
|
|
301
301
|
raise e
|
|
302
|
+
print(e)
|
|
302
303
|
html_template = loader.get_template("site/page-500.html")
|
|
303
|
-
return HttpResponse(html_template.render({}, request))
|
|
304
|
+
return HttpResponse(html_template.render({}, request), status=500)
|
|
304
305
|
|
|
305
306
|
|
|
@@ -241,9 +241,14 @@
|
|
|
241
241
|
<details id="event-table" open><summary><h3>Health History</h3></summary>
|
|
242
242
|
{% if asset.cesmd %}
|
|
243
243
|
<div class="row">
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
244
|
+
<div class="col-10 mb-4">
|
|
245
|
+
<a role="button"
|
|
246
|
+
href="{% url 'asset_evals' calid=asset.calid %}"
|
|
247
|
+
class="btn btn-sm btn-outline-primary d-inline-flex align-items-center mx-1">
|
|
248
|
+
All Events
|
|
249
|
+
</a>
|
|
250
|
+
{% include 'includes/asset-event-table.html' with evaluations=evaluations calid=asset.calid %}
|
|
251
|
+
</div>
|
|
247
252
|
</div>
|
|
248
253
|
{% endif %}
|
|
249
254
|
|
|
@@ -14,24 +14,45 @@ Chrystal Chern, Spring 2025
|
|
|
14
14
|
{% block title %} {{ asset.calid }} Sensors {% endblock %}
|
|
15
15
|
|
|
16
16
|
{% block content %}
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
17
|
+
<div class="col-10 mb-4 d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center py-4">
|
|
18
|
+
<div class="d-block mb-4 mb-md-0">
|
|
19
|
+
<nav aria-label="breadcrumb" class="d-none d-md-inline-block">
|
|
20
|
+
<ol class="breadcrumb breadcrumb-dark breadcrumb-transparent">
|
|
21
|
+
<li class="breadcrumb-item">
|
|
22
|
+
<a href="{% url 'dashboard' %}">
|
|
23
|
+
<svg class="icon icon-xxs" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"></path></svg>
|
|
24
|
+
</a>
|
|
25
|
+
</li>
|
|
26
|
+
<li class="breadcrumb-item" aria-current="page"><a href="{% url 'asset_table' %}">Inventory</a></li>
|
|
27
|
+
<li class="breadcrumb-item"><code>{{ asset.calid }}</code></li>
|
|
28
|
+
<li class="breadcrumb-item active" aria-current="page">Sensors</li>
|
|
29
|
+
</ol>
|
|
30
|
+
</nav>
|
|
31
|
+
<h1><code>{{ asset.calid }}</code> Sensors</h1>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="btn-toolbar mb-2 mb-md-0">
|
|
34
|
+
<a role="button" class="button btn btn-outline-primary"
|
|
35
|
+
href="{% url 'asset_profile' calid=asset.calid %}" class="me-1">Back to Structure</a>
|
|
36
|
+
<a role="button" class="button btn btn-outline-primary"
|
|
37
|
+
href="{% url 'sensor_upload' calid=asset.calid %}" class="me-1">
|
|
38
|
+
<svg class="icon icon-xs me-2" fill="none"
|
|
39
|
+
stroke="currentColor" viewBox="0 0 24 24"
|
|
40
|
+
xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path></svg>
|
|
41
|
+
Add SensorGroup</a>
|
|
42
|
+
</div>
|
|
27
43
|
</div>
|
|
28
44
|
|
|
45
|
+
|
|
29
46
|
<div class="col-lg-10">
|
|
30
47
|
{% for group in groups %}
|
|
31
48
|
<div class="card shadow-lg mb-4">
|
|
32
|
-
<div class="card-header bg-dark
|
|
49
|
+
<div class="card-header bg-dark fw-bold d-flex justify-content-between align-items-center">
|
|
33
50
|
<span>{{ group.name }}</span>
|
|
34
|
-
<span class="badge bg-gray
|
|
51
|
+
<span class="badge bg-gray px-2 py-1 fs-6">Datum: {{ group.datum.name }}</span>
|
|
52
|
+
<a class="btn" href="{% url 'sensor_edit' calid=asset.calid group_id=group.id %}">
|
|
53
|
+
<svg class="icon icon-xs me-2" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 4h2a2 2 0 012 2v2m-4-4l-6.586 6.586a2 2 0 00-.586 1.414V18a2 2 0 002 2h5.586a2 2 0 001.414-.586L20 12m-4-4l-6.586 6.586a2 2 0 00-.586 1.414V18a2 2 0 002 2h5.586a2 2 0 001.414-.586L20 12"></path></svg>
|
|
54
|
+
Edit
|
|
55
|
+
</a>
|
|
35
56
|
</div>
|
|
36
57
|
<div class="card-body">
|
|
37
58
|
<table class="table table-striped table-hover table-bordered">
|
|
@@ -12,23 +12,23 @@ Chrystal Chern, Spring 2025
|
|
|
12
12
|
|
|
13
13
|
{% block stylesheets %}
|
|
14
14
|
<style>
|
|
15
|
-
input[type="number"] {
|
|
15
|
+
input[type="number"] {
|
|
16
16
|
-moz-appearance: textfield; /* Firefox */
|
|
17
17
|
appearance: textfield; /* Standard */
|
|
18
|
-
}
|
|
19
|
-
input[type="number"]::-webkit-inner-spin-button,
|
|
20
|
-
input[type="number"]::-webkit-outer-spin-button {
|
|
18
|
+
}
|
|
19
|
+
input[type="number"]::-webkit-inner-spin-button,
|
|
20
|
+
input[type="number"]::-webkit-outer-spin-button {
|
|
21
21
|
-webkit-appearance: none;
|
|
22
22
|
margin: 0;
|
|
23
|
-
}
|
|
23
|
+
}
|
|
24
24
|
</style>
|
|
25
25
|
<script type="importmap">
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
{
|
|
27
|
+
"imports": {
|
|
28
|
+
"three": "https://cdn.jsdelivr.net/npm/three@0.172.0/build/three.module.js",
|
|
29
|
+
"three/addons/": "https://cdn.jsdelivr.net/npm/three@0.172.0/examples/jsm/"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
32
|
</script>
|
|
33
33
|
{% endblock stylesheets %}
|
|
34
34
|
|
|
@@ -38,10 +38,12 @@ input[type="number"]::-webkit-outer-spin-button {
|
|
|
38
38
|
<h1>Add Sensor Group to <code>{{ asset.calid }}</code></h1>
|
|
39
39
|
|
|
40
40
|
<div class="py-4 align-right">
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
<a role="button" class="button btn btn-outline-primary"
|
|
42
|
+
href="{% url 'asset_profile' calid=asset.calid %}"
|
|
43
|
+
class="me-1">Back to Structure</a>
|
|
44
|
+
<a role="button" class="button btn btn-outline-primary"
|
|
45
|
+
href="{% url 'asset_sensors' calid=asset.calid %}"
|
|
46
|
+
class="me-1">Back to Sensors</a>
|
|
45
47
|
</div>
|
|
46
48
|
|
|
47
49
|
|
|
@@ -54,62 +56,94 @@ input[type="number"]::-webkit-outer-spin-button {
|
|
|
54
56
|
{% csrf_token %}
|
|
55
57
|
|
|
56
58
|
<fieldset class="mb-4">
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
<legend>Sensor Group</legend>
|
|
60
|
+
{{ group_form.as_p }}
|
|
61
|
+
<div id="datum-info" class="mb-4 p-2 border rounded bg-light" style="display: none;">
|
|
62
|
+
<strong>Datum Location (x;y;z):</strong> <span id="datum-location">_, _, _</span> <br>
|
|
63
|
+
<strong>Datum Orientation (dx;dy;dz):</strong> <span id="datum-orientation">_, _, _</span>
|
|
64
|
+
</div>
|
|
63
65
|
</fieldset>
|
|
64
66
|
|
|
65
67
|
<fieldset>
|
|
66
|
-
|
|
68
|
+
<legend>Sensors</legend>
|
|
67
69
|
{{ formset.management_form }}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
<div id="formset-container" class="container">
|
|
71
|
+
{% for form in formset %}
|
|
70
72
|
<div class="sensor-form mb-4">
|
|
71
73
|
<div class="row mb-3">
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
<div class="input-group">
|
|
75
|
+
<span class="input-group-text col-md-2 text-dark border-dark">{{ form.name.label }}</span>
|
|
76
|
+
<input id="{{form.name.html_name}}"
|
|
77
|
+
type="text"
|
|
78
|
+
name="{{form.name.html_name}}"
|
|
79
|
+
value="{{ form.name.value|default_if_none:'' }}"
|
|
80
|
+
class="form-control col-md-4 text-dark border-dark" required></input>
|
|
81
|
+
</div>
|
|
76
82
|
</div>
|
|
77
83
|
<div class="row"><div class="col-md-12 d-flex align-items-center mb-3">
|
|
84
|
+
<div class="input-group">
|
|
85
|
+
<span class="input-group-text col-md-4 text-gray">{{ form.x.label }}</span>
|
|
86
|
+
<input id="{{form.x.html_name}}"
|
|
87
|
+
type="number" step="any"
|
|
88
|
+
name="{{form.x.html_name}}"
|
|
89
|
+
value="{{ form.x.value|default_if_none:'' }}"
|
|
90
|
+
class="form-control col-md-8 text-gray" required></input>
|
|
91
|
+
</div>
|
|
92
|
+
<div class="input-group">
|
|
93
|
+
<span class="input-group-text col-md-4 text-gray">{{ form.y.label }}</span>
|
|
94
|
+
<input id="{{form.y.html_name}}"
|
|
95
|
+
type="number" step="any"
|
|
96
|
+
name="{{form.y.html_name}}"
|
|
97
|
+
value="{{ form.y.value|default_if_none:'' }}"
|
|
98
|
+
class="form-control col-md-8 text-gray" required></input>
|
|
99
|
+
</div>
|
|
100
|
+
<div class="input-group">
|
|
101
|
+
<span class="input-group-text col-md-4 text-gray">{{ form.z.label }}</span>
|
|
102
|
+
<input id="{{form.z.html_name}}"
|
|
103
|
+
type="number" step="any"
|
|
104
|
+
name="{{form.z.html_name}}"
|
|
105
|
+
value="{{ form.z.value|default_if_none:'' }}"
|
|
106
|
+
class="form-control col-md-8 text-gray" required></input>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
<div class="row">
|
|
111
|
+
<div class="col-md-12 d-flex align-items-center mb-3">
|
|
78
112
|
<div class="input-group">
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
<div class="input-group">
|
|
87
|
-
<span class="input-group-text col-md-4 text-gray">{{ form.z.label }}</span>
|
|
88
|
-
<input id="{{form.z.html_name}}" type="number" step="any" name="{{form.z.html_name}}" class="form-control col-md-8 text-gray" required></input>
|
|
89
|
-
</div>
|
|
90
|
-
</div></div>
|
|
91
|
-
<div class="row"><div class="col-md-12 d-flex align-items-center mb-3">
|
|
92
|
-
<div class="input-group">
|
|
93
|
-
<span class="input-group-text col-md-5 text-gray">{{ form.dx.label }}</span>
|
|
94
|
-
<input id="{{form.dx.html_name}}" type="number" step="any" name="{{form.dx.html_name}}" class="form-control col-md-8 text-gray" required></input>
|
|
113
|
+
<span class="input-group-text col-md-5 text-gray">{{ form.dx.label }}</span>
|
|
114
|
+
<input id="{{form.dx.html_name}}"
|
|
115
|
+
type="number"
|
|
116
|
+
step="any"
|
|
117
|
+
name="{{form.dx.html_name}}"
|
|
118
|
+
value="{{ form.dx.value|default_if_none:'' }}"
|
|
119
|
+
class="form-control col-md-8 text-gray" required></input>
|
|
95
120
|
</div>
|
|
96
121
|
<div class="input-group">
|
|
97
|
-
|
|
98
|
-
|
|
122
|
+
<span class="input-group-text col-md-5 text-gray">{{ form.dy.label }}</span>
|
|
123
|
+
<input id="{{form.dy.html_name}}"
|
|
124
|
+
type="number"
|
|
125
|
+
step="any"
|
|
126
|
+
name="{{form.dy.html_name}}"
|
|
127
|
+
value="{{ form.dy.value|default_if_none:'' }}"
|
|
128
|
+
class="form-control col-md-8 text-gray" required></input>
|
|
99
129
|
</div>
|
|
100
130
|
<div class="input-group">
|
|
101
|
-
|
|
102
|
-
|
|
131
|
+
<span class="input-group-text col-md-5 text-gray">{{ form.dz.label }}</span>
|
|
132
|
+
<input id="{{form.dz.html_name}}"
|
|
133
|
+
type="number"
|
|
134
|
+
step="any"
|
|
135
|
+
name="{{form.dz.html_name}}"
|
|
136
|
+
value="{{ form.dz.value|default_if_none:'' }}"
|
|
137
|
+
class="form-control col-md-8 text-gray" required></input>
|
|
103
138
|
</div>
|
|
104
|
-
</div
|
|
105
|
-
|
|
106
|
-
<button class="remove-form btn btn-danger btn-sm ml-2">Remove</button>
|
|
139
|
+
</div>
|
|
107
140
|
</div>
|
|
108
|
-
|
|
141
|
+
<button class="remove-form btn btn-danger btn-sm ml-2">Remove</button>
|
|
142
|
+
</div>
|
|
143
|
+
{% endfor %}
|
|
109
144
|
</div>
|
|
110
145
|
<button id="add-form" class="btn btn-sm button btn-outline-primary mb-3">Add Sensor</button>
|
|
111
146
|
</fieldset>
|
|
112
|
-
|
|
113
147
|
<button type="button" id="plot-btn" class="btn btn-info btn-sm mb-3">Plot</button>
|
|
114
148
|
<button type="submit" class="btn btn-sm button btn-success mb-3">Save</button>
|
|
115
149
|
</form>
|
|
@@ -134,7 +168,7 @@ input[type="number"]::-webkit-outer-spin-button {
|
|
|
134
168
|
</div>
|
|
135
169
|
</div>
|
|
136
170
|
<div class="card-footer text-center">
|
|
137
|
-
Powered by <a href="https://veux.io/">veux</a>
|
|
171
|
+
Powered by <a href="https://veux.io/"><emph>veux</emph></a>
|
|
138
172
|
</div>
|
|
139
173
|
</div>
|
|
140
174
|
|
|
@@ -67,7 +67,11 @@ Claudio Perez, Summer 2023
|
|
|
67
67
|
</div>
|
|
68
68
|
|
|
69
69
|
<div class="card-footer">
|
|
70
|
-
|
|
70
|
+
{% if predictor.active %}
|
|
71
|
+
<button class="btn btn-outline-success" type="button">Active</button>
|
|
72
|
+
{% else %}
|
|
73
|
+
<button class="btn btn-outline-dark" type="button">Inctive</button>
|
|
74
|
+
{% endif %}
|
|
71
75
|
</div>
|
|
72
76
|
</div>
|
|
73
77
|
</div>
|
|
@@ -93,7 +93,7 @@ function createSensorRenderer(container, modelPath) {
|
|
|
93
93
|
directionalLight.shadow.camera.bottom = -500; // was 500
|
|
94
94
|
scene.add(directionalLight);
|
|
95
95
|
|
|
96
|
-
// 6) LOAD THE GLB MODEL
|
|
96
|
+
// 6) LOAD THE GLB MODEL
|
|
97
97
|
if (modelPath) {
|
|
98
98
|
const loader = new GLTFLoader();
|
|
99
99
|
loader.load(modelPath, (gltf) => {
|
irie/rest/__main__.py
CHANGED
|
@@ -99,7 +99,7 @@ def post_evaluations(data):
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
files = {
|
|
102
|
-
"evaluation":
|
|
102
|
+
"evaluation": (None, json.dumps(eval_data)),
|
|
103
103
|
"motion_data": (None, json.dumps(motion_data)),
|
|
104
104
|
# "event_file": (event_file, open(event_file, "rb")),
|
|
105
105
|
}
|
|
@@ -119,9 +119,13 @@ def post_evaluations(data):
|
|
|
119
119
|
if __name__ == "__main__":
|
|
120
120
|
|
|
121
121
|
if len(sys.argv) == 1:
|
|
122
|
+
# python -m irie.rest
|
|
123
|
+
# List all evaluations
|
|
122
124
|
print(json.dumps(list_evals()))
|
|
123
125
|
|
|
124
126
|
elif len(sys.argv) > 2:
|
|
127
|
+
# python -m irie.rest <file1> <file2> ...
|
|
128
|
+
# Post multiple motion files
|
|
125
129
|
post_motions(sys.argv[1:])
|
|
126
130
|
|
|
127
131
|
elif sys.argv[1].endswith(".zip"):
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: irie
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.57
|
|
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
|
|
7
7
|
Project-URL: Documentation, https://stairlab.berkeley.edu/software/irie/
|
|
8
|
-
Keywords:
|
|
8
|
+
Keywords: resilience,structural-health-monitoring,finite-element-analysis,xara
|
|
9
9
|
Classifier: Development Status :: 4 - Beta
|
|
10
10
|
Classifier: Intended Audience :: Science/Research
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
@@ -27,12 +27,13 @@ Classifier: Operating System :: Unix
|
|
|
27
27
|
Classifier: Operating System :: MacOS
|
|
28
28
|
Description-Content-Type: text/markdown
|
|
29
29
|
Requires-Dist: tqdm
|
|
30
|
-
Requires-Dist: opensees
|
|
30
|
+
Requires-Dist: opensees>=0.1.0
|
|
31
31
|
Requires-Dist: quakeio
|
|
32
32
|
Requires-Dist: mdof
|
|
33
|
-
Requires-Dist: veux
|
|
33
|
+
Requires-Dist: veux>=0.0.35
|
|
34
34
|
Requires-Dist: xara
|
|
35
|
-
Requires-Dist:
|
|
35
|
+
Requires-Dist: xcsi
|
|
36
|
+
Requires-Dist: xsection>=0.0.19
|
|
36
37
|
Requires-Dist: openbim
|
|
37
38
|
Requires-Dist: folium
|
|
38
39
|
Requires-Dist: pandas
|