irie 0.0.55__py3-none-any.whl → 0.0.56__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.

@@ -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)]
@@ -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": "inventory"}
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"] = "inventory"
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"] = predictor.sensorassignment_set.all()
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": "inventory",
241
+ "segment": "assets",
242
242
  "viewer": "babylon",
243
243
  "offset": json.dumps(list(reversed(list(asset.coordinates)))),
244
244
  }
@@ -248,7 +248,7 @@ def create_model(request, calid):
248
248
 
249
249
  uploaded_file = request.FILES.get('config_file')
250
250
 
251
- from openbim.csi import load, create_model, collect_outlines
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()))
@@ -270,7 +270,7 @@ def create_model(request, calid):
270
270
  )
271
271
  artist.draw_surfaces()
272
272
 
273
- # Generate the .glb data
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: # probably a GET
292
+ else: # GET
293
293
  context["form"] = PredictorForm()
294
294
 
295
295
 
@@ -2,7 +2,7 @@
2
2
  <div class="card-header">
3
3
  <div class="row align-items-center">
4
4
  <div class="col">
5
- <h2 class="fs-5 fw-bold">Events</h2>
5
+ <h2 class="fs-5 fw-bold">Recent Events</h2>
6
6
  </div>
7
7
  <div class="col text-end">
8
8
  <div class="align-right">
@@ -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
- <div class="col-10 mb-4">
245
- {% include 'includes/asset-event-table.html' with evaluations=evaluations %}
246
- </div>
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
- <h1><code>{{ asset.calid }}</code> Sensors</h1>
18
- <div class="py-4 align-right">
19
- <a role="button" class="button btn btn-outline-primary"
20
- href="{% url 'asset_profile' calid=asset.calid %}" class="me-1">Back to Structure</a>
21
- <a role="button" class="button btn btn-outline-primary"
22
- href="{% url 'sensor_upload' calid=asset.calid %}" class="me-1">
23
- <svg class="icon icon-xs me-2" fill="none"
24
- stroke="currentColor" viewBox="0 0 24 24"
25
- 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>
26
- Add SensorGroup</a>
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 text-white fw-bold d-flex justify-content-between align-items-center">
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 text-white px-2 py-1 fs-6">Datum: {{ group.datum.name }}</span>
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
- "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
- }
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
- <a role="button" class="button btn btn-outline-primary"
42
- href="{% url 'asset_profile' calid=asset.calid %}" class="me-1">Back to Structure</a>
43
- <a role="button" class="button btn btn-outline-primary"
44
- href="{% url 'asset_sensors' calid=asset.calid %}" class="me-1">Back to Sensors</a>
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
- <legend>Sensor Group</legend>
58
- {{ group_form.as_p }}
59
- <div id="datum-info" class="mb-4 p-2 border rounded bg-light" style="display: none;">
60
- <strong>Datum Location (x;y;z):</strong> <span id="datum-location">_, _, _</span> <br>
61
- <strong>Datum Orientation (dx;dy;dz):</strong> <span id="datum-orientation">_, _, _</span>
62
- </div>
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
- <legend>Sensors</legend>
68
+ <legend>Sensors</legend>
67
69
  {{ formset.management_form }}
68
- <div id="formset-container" class="container">
69
- {% for form in formset %}
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
- <div class="input-group">
73
- <span class="input-group-text col-md-2 text-dark border-dark">{{ form.name.label }}</span>
74
- <input id="{{form.name.html_name}}" type="text" name="{{form.name.html_name}}" class="form-control col-md-4 text-dark border-dark" required></input>
75
- </div>
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
- <span class="input-group-text col-md-4 text-gray">{{ form.x.label }}</span>
80
- <input id="{{form.x.html_name}}" type="number" step="any" name="{{form.x.html_name}}" class="form-control col-md-8 text-gray" required></input>
81
- </div>
82
- <div class="input-group">
83
- <span class="input-group-text col-md-4 text-gray">{{ form.y.label }}</span>
84
- <input id="{{form.y.html_name}}" type="number" step="any" name="{{form.y.html_name}}" class="form-control col-md-8 text-gray" required></input>
85
- </div>
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
- <span class="input-group-text col-md-5 text-gray">{{ form.dy.label }}</span>
98
- <input id="{{form.dy.html_name}}" type="number" step="any" name="{{form.dy.html_name}}" class="form-control col-md-8 text-gray" required></input>
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
- <span class="input-group-text col-md-5 text-gray">{{ form.dz.label }}</span>
102
- <input id="{{form.dz.html_name}}" type="number" step="any" name="{{form.dz.html_name}}" class="form-control col-md-8 text-gray" required></input>
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></div>
105
-
106
- <button class="remove-form btn btn-danger btn-sm ml-2">Remove</button>
139
+ </div>
107
140
  </div>
108
- {% endfor %}
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
- <button class="btn {%if predictor.active %}btn-outline-success{%else%}btn-outline-dark{%endif%}" type="button">Active</button>
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 (if asset.rendering is not empty)
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": (None, json.dumps(eval_data)),
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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: irie
3
- Version: 0.0.55
3
+ Version: 0.0.56
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
@@ -34,6 +34,8 @@ Requires-Dist: veux
34
34
  Requires-Dist: xara
35
35
  Requires-Dist: bottle
36
36
  Requires-Dist: openbim
37
+ Requires-Dist: xsection
38
+ Requires-Dist: xcsi
37
39
  Requires-Dist: folium
38
40
  Requires-Dist: pandas
39
41
  Requires-Dist: numpy
@@ -61,11 +61,11 @@ irie/apps/inventory/apps.py,sha256=bZ6qYIwPMG4_4IeLfg9N4WuZAEgEVj84oOswV-7_MAI,4
61
61
  irie/apps/inventory/fields.py,sha256=J3nTImPsuCeiOWBizSL4tnuKs36sPfXALNTKEZY-wVg,79
62
62
  irie/apps/inventory/filters.py,sha256=MlLX6_mm53CdFdhaqdp3S-sSZAM9VdS_95Bqc-WDi88,1856
63
63
  irie/apps/inventory/forms.py,sha256=y8tcIGInXDg7KCf1OWd1jtc4umJsm8rf8-4O8nDhNd4,1244
64
- irie/apps/inventory/models.py,sha256=VdJ_5mEb6lBk21NalK8bhOy0u6SFdWmhXpcQ4vRs3Pg,6131
64
+ irie/apps/inventory/models.py,sha256=M4V72jg3Skb5AfnFhhyBIafQPD2tRsl2Sp9K8cP9_gE,6642
65
65
  irie/apps/inventory/sitemaps.py,sha256=Nha1MTsIH_ad7JyoxwonPytp7MNuEhDNszkEUOmlN0o,826
66
66
  irie/apps/inventory/tables.py,sha256=vZdPOcbN1ibuWXqLwbBUoQw9iavwa1GJ5fd83k8bu7Y,27874
67
- irie/apps/inventory/urls.py,sha256=1VQIo0oCMHa112q-zJBP5mOBxsdI2upfqnTRHe9IirE,1577
68
- irie/apps/inventory/views.py,sha256=zSjaBh3gogeHNbvLSzkbiybC5Y8ao8p4l4ujXQsioxw,21933
67
+ irie/apps/inventory/urls.py,sha256=BZYoetdHBVlKROz9sPuAkjx5OI-BQY5H7sXeQ4QAmKU,1696
68
+ irie/apps/inventory/views.py,sha256=bd3EKBNo3bTYk8fFlkotsRdR84G3CY8kVTUJVVSZNvo,24209
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
@@ -97,10 +97,10 @@ irie/apps/prediction/admin.py,sha256=QR9eK3JivwPJ1dqtVeBB1YlT6oa8DjE9Sx1Hu6rnJ7c
97
97
  irie/apps/prediction/apps.py,sha256=sejLu4xx8_IwQQKTnxC_DNK-vhjiqeG0_uk2Zg1ga-M,422
98
98
  irie/apps/prediction/forms.py,sha256=3alwgkBhjnJsDmyh2zDAU1Z-2ZIfdV8f_dXUVMj6atI,650
99
99
  irie/apps/prediction/metrics.py,sha256=Zh1utUZTGddQEVn4e1rLO74tbIz7bVvZli8sgmuB_X0,1410
100
- irie/apps/prediction/models.py,sha256=zYNY_brXriuaJATwpndMtiveK-ejxwKW-0ZNaIQjDL0,2925
100
+ irie/apps/prediction/models.py,sha256=06yXUH2JtKAsMn9BCJe0nlwOXdjNOXkl9UnSw8wJ6F4,3048
101
101
  irie/apps/prediction/predictor.py,sha256=-x_4kHWnfUxiX2aQfbl3dsbVAG4lRKAFbo1CqfZNCIc,831
102
102
  irie/apps/prediction/urls.py,sha256=V41EjswrZ4FGPMetHzxkL4m0wNJvPEuV0UrwxLWqgkA,1012
103
- irie/apps/prediction/views.py,sha256=4KbDlGBWBDP5BawrPkIZRzSd4f-g2PqLtqSyUjH5j2k,10071
103
+ irie/apps/prediction/views.py,sha256=bcjgp9Nz989fBCtqM-pwYS4x25NLik2K6n60vgDJEXY,10021
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
@@ -112,8 +112,8 @@ irie/apps/prediction/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm
112
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
114
  irie/apps/prediction/runners/ssid.py,sha256=_5TZrbWtt-Mid-PXiUu33QOQ7rUK2FLkyAg_B957RLc,18811
115
- irie/apps/prediction/runners/opensees/__init__.py,sha256=hjyKM2ZGh6eMNgfpic2tTVAWtx5yB1z_HV2CjkSix2I,23195
116
- irie/apps/prediction/runners/opensees/metrics.py,sha256=HU1V0RYQDXrhTcHqwpnU2KOSl4UPNo9S6QP3sz2VcUY,6428
115
+ irie/apps/prediction/runners/opensees/__init__.py,sha256=gD366xj0BndXpDmJaNQiqrN92Gs_DINeA8dEkGojTyM,22770
116
+ irie/apps/prediction/runners/opensees/metrics.py,sha256=6dyoBXBx9_itF83rculpuE7B__blG5AIMfQpa-srulU,6431
117
117
  irie/apps/prediction/runners/opensees/utilities.py,sha256=1cajnV6gWkJ5obYixfbHZKwxi1ECpR0sBWquAAGhseE,9032
118
118
  irie/apps/prediction/runners/opensees/xmlutils.py,sha256=Q3i5L0Dp_5nRsKRGMr-m_bS03Mxa36Ujb-RvwAmResc,7510
119
119
  irie/apps/prediction/runners/opensees/zipped.py,sha256=ou2BnxY4WzAzVp3cL9XJUeSJqdijRs-rbcagOsX_Ed0,942
@@ -389,7 +389,7 @@ irie/apps/templates/events/events.html,sha256=0PIELQsPVj1iv4moWKEOMfp4zbcSfkj5BC
389
389
  irie/apps/templates/events/login.html,sha256=00rGrQsHXwQXbh2qF7WzEgIA4LjcbvcefALmD9EQCRg,550
390
390
  irie/apps/templates/events/react_and_bootstrap.html,sha256=mwxjUMD5OMEI1JMNcWYxz7Ju5rq5R2spf6y_G7mYAUs,802
391
391
  irie/apps/templates/home/asset.html,sha256=nqzMy59L2yDalJbbK4j-MCFcBtXTUSMTkqkGwmlSriU,22323
392
- irie/apps/templates/includes/asset-event-table.html,sha256=5mOsTQienIQb1dXS2_3Wc2Deahbkd3yNmyNPFea1MYg,4241
392
+ irie/apps/templates/includes/asset-event-table.html,sha256=ec784WzqKyaOh552gP376bxVLaNGoABsVgxjGy83vhI,4248
393
393
  irie/apps/templates/includes/footer.html,sha256=dnfLJUYN70gdHFY_Xzkj5KuISD4ve-kKp6vwn4h8hDE,714
394
394
  irie/apps/templates/includes/modal-report.html,sha256=iqD6g9R4R7G426wLVL46H5fufWYAA3K8Acav9b0DQoU,3592
395
395
  irie/apps/templates/includes/navigation.html,sha256=iUblmqRGBT0GRCsvOUKy6a1O1buq-IkJRKSlmbhevb4,13670
@@ -400,8 +400,8 @@ irie/apps/templates/includes/sidebar.html,sha256=DDwvNQI0SYNSsxBe_3MbrY3A-xR859R
400
400
  irie/apps/templates/inventory/asset-evals.html,sha256=KzbdJJ7ildMpfO4IQDuXqGBcPzUTlYpJ_Y3Wg4payVc,2700
401
401
  irie/apps/templates/inventory/asset-event-summary.html,sha256=5G7uZVf7kVL0wBaAfsEtTEEA5HRuBCzx8NrgDFheWI4,51357
402
402
  irie/apps/templates/inventory/asset-on-map.html,sha256=9k896EyQPNybxEW0nAfuA8fCEDyn63a3ZrRO0CHjO7E,17038
403
- irie/apps/templates/inventory/asset-profile.html,sha256=oJiHwQ7ilmRUQy31PMXJgZUPbefJKBNWhjV6IF8UgR0,13576
404
- irie/apps/templates/inventory/asset-sensors.html,sha256=qLnlhnmOeT5uL1xH67mFPOgufXV_PJ31KEx5Aqt0TTw,2406
403
+ irie/apps/templates/inventory/asset-profile.html,sha256=uFNmipF1_st-syRTlAy4BO87-gqqwUJObxHjHltSbxQ,13811
404
+ irie/apps/templates/inventory/asset-sensors.html,sha256=ChaWjUs4_NBScA5P-Z6FCE7Jy2VgXBLALO7RtPYTJZ4,4049
405
405
  irie/apps/templates/inventory/asset-table.html,sha256=QAziJ_VKc_BOmJ6YCrNbm_QUd9qqMwFZsWNieIVLlq4,13202
406
406
  irie/apps/templates/inventory/bridge-dashboard.html,sha256=67zrDlih3LOi9xFVwPVZZkgRT3DO-lE_qRL7q8Uz9GY,45472
407
407
  irie/apps/templates/inventory/bridge.html,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
@@ -413,7 +413,7 @@ irie/apps/templates/inventory/map-single-asset2.html,sha256=57UjCuHke_ftcMIzqooh
413
413
  irie/apps/templates/inventory/map-terrain.html,sha256=XAvFzJM06k4b5zVmHbseSD7hQAhkvF05K4UCtXD4sOU,9493
414
414
  irie/apps/templates/inventory/preamble.tex,sha256=TmRhIWg2-Pxj_e2OBctANRZPwU8RWMT3EZJFSa3R8HY,3547
415
415
  irie/apps/templates/inventory/report.tex,sha256=A1XKpwknlBrAZjFzzxVIDwypjXteqzoCQiuo1tQANfw,45228
416
- irie/apps/templates/inventory/sensor-upload.html,sha256=dw0kCjG0x-AEFhNGnD-hvprv8xqJJk1yRc3PsCY1rC4,12826
416
+ irie/apps/templates/inventory/sensor-upload.html,sha256=cQNbhz4R6H6q9SWYYUDeB9lGB7P9eJVdXelGL_kxj_U,14366
417
417
  irie/apps/templates/inventory/three-maps.html,sha256=OUqF59SdAndul7eSDDaS9MYTlNhJDfLU87bM532omfc,8548
418
418
  irie/apps/templates/layouts/base-fullscreen.html,sha256=q1nKewLnQ8inBxsUcHlq2Iv_s_qrw6k6bumX7mLR1mI,2579
419
419
  irie/apps/templates/layouts/base.html,sha256=ua-PwkH11AVeSbRYnMeAwAlXgXrQWGcFsqhtGbDSiVo,2411
@@ -422,7 +422,7 @@ irie/apps/templates/networks/_networks.html,sha256=FHKgVadZhnoxREYhnaiXWjL6x1iG6
422
422
  irie/apps/templates/networks/corridor_table.html,sha256=SW6WMmxGsw2li1BXqvCRj1CFJ3IPUulfk-KHJBIMFx0,876
423
423
  irie/apps/templates/networks/networks.js,sha256=KsTnwiPXv0WYTd3GiejHz1gWiBkOVfIuCC7jZVYlRwg,7479
424
424
  irie/apps/templates/networks/styled_inputs.html,sha256=4IqtA4oQw6zAc2oypEYspIn_dS0syvVtZvkshhj1Tco,118
425
- irie/apps/templates/prediction/asset-predictors.html,sha256=JdaQHTVtRyYttUl1esZi34CqRiK6hiMGrIfOxxr6NPA,4823
425
+ irie/apps/templates/prediction/asset-predictors.html,sha256=x11FmsMw-Vl_P077SxxqHGEu7hUDqPtmbSy1N_fA2to,4923
426
426
  irie/apps/templates/prediction/create-mdof.html,sha256=QVuZGz3E5iwYvOQk_kkitAt5qxfP5zmr2zyVQBWKQzs,4602
427
427
  irie/apps/templates/prediction/create-model.html,sha256=MmP7HoWfDr0z22euwAMTMUGcEEZZqXGtLF-eGZeQI7I,3954
428
428
  irie/apps/templates/prediction/new-runner.html,sha256=7gMXrrD-CylMDUelIltB9JnmnqlBr4euqktTfRFnhdU,1586
@@ -433,7 +433,7 @@ irie/apps/templates/prediction/hazus/history.html,sha256=zvnwP0gxSV9JNBbYACnKlML
433
433
  irie/apps/templates/prediction/hazus/history.js,sha256=blHRXzlEfMBCezPE-2dZCpt2rVgTiGHkYlY1t-clOE8,1101
434
434
  irie/apps/templates/prediction/veux/navigator.html,sha256=Ev8iv-sQ2W4RpPY_yH_KsjNeKAN5PIiIuBWcZ1Orcew,4914
435
435
  irie/apps/templates/prediction/veux/navigator.js,sha256=JWiDxupaqhtMLzOd82tuGoxoFdLpmZ3lgQ8-uIv6nbc,6181
436
- irie/apps/templates/sensors/render-sensors.js,sha256=u05VQ7dBDhUMsTYs0_xgdltA2V5DAqenVKgYhAlBxw0,5570
436
+ irie/apps/templates/sensors/render-sensors.js,sha256=xndpjEJ2WnUsZl4lXa5e8ozH6ELCal4_7lQXf5MTBzU,5536
437
437
  irie/apps/templates/site/about.html,sha256=5hS5taj3XF-F8z-uIn53ZFXVHVS4apLRMg39OyvMvRs,610
438
438
  irie/apps/templates/site/asset_map.html,sha256=rnTjeYMc8NESIo6Uuq8fgZ_xcKNuKdt4zcqoUTDI8Xg,387
439
439
  irie/apps/templates/site/components-forms.html,sha256=FKOiR-3e9iw-xOHeaP2RB3O2gP10R-Mt8wdXfb1rDBQ,13865
@@ -495,10 +495,10 @@ irie/init/management/commands/init_corridors.py,sha256=EzLk0HUiFxlco-2u0rypewOc9
495
495
  irie/init/management/commands/init_predictors.py,sha256=edCf7d36cwl4YitXLtvOfsPee-BiPF55_Gr73OvTPcU,2368
496
496
  irie/init/management/commands/make_asset.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
497
497
  irie/pull/nbi.py,sha256=KpBjJ9GEU72Qk1t4bGN9cg0QBeVJ8k9XcI3Y1oSgIR0,11478
498
- irie/rest/__main__.py,sha256=6Nf_-Rr9zGmMyp_wqCFDO7ls9QPnPd9UyUgN17rIGYw,3680
498
+ irie/rest/__main__.py,sha256=AJIcioUAfG1Lj_tyxHXo1Z7qFXxa9PqxCyaqZSkIZYg,3829
499
499
  irie/usgs/__main__.py,sha256=HiSvPn5IW5IqRiCk1qRRq5dCy3-7iISw7v1P_w2rLrk,5049
500
- irie-0.0.55.dist-info/METADATA,sha256=BYa5IFlEM_6ZrCuKczXPymD4NOtsrbdW5rOhKwpyI2U,3205
501
- irie-0.0.55.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
502
- irie-0.0.55.dist-info/entry_points.txt,sha256=A_3h9wPBGfxGQ78_MGa-nO6Z0foxOYeAnIE47jxEztg,44
503
- irie-0.0.55.dist-info/top_level.txt,sha256=zVCxi5E2nkISZPzKq8VEhWe_dGuPcefLYV1tYqQdwlY,5
504
- irie-0.0.55.dist-info/RECORD,,
500
+ irie-0.0.56.dist-info/METADATA,sha256=uSyT5avnQ_mO5WVkFfFnDIicjUIms_dFtUdOydN7WGo,3249
501
+ irie-0.0.56.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
502
+ irie-0.0.56.dist-info/entry_points.txt,sha256=A_3h9wPBGfxGQ78_MGa-nO6Z0foxOYeAnIE47jxEztg,44
503
+ irie-0.0.56.dist-info/top_level.txt,sha256=zVCxi5E2nkISZPzKq8VEhWe_dGuPcefLYV1tYqQdwlY,5
504
+ irie-0.0.56.dist-info/RECORD,,
File without changes