py-pilecore 0.8.3__py3-none-any.whl → 0.9.1__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 py-pilecore might be problematic. Click here for more details.
- {py_pilecore-0.8.3.dist-info → py_pilecore-0.9.1.dist-info}/METADATA +2 -1
- py_pilecore-0.9.1.dist-info/RECORD +49 -0
- pypilecore/_version.py +1 -1
- pypilecore/api.py +89 -0
- pypilecore/common/piles/__init__.py +2 -0
- pypilecore/common/piles/geometry/materials.py +15 -0
- pypilecore/common/piles/grid.py +222 -0
- pypilecore/common/piles/main.py +15 -1
- pypilecore/common/piles/type.py +25 -0
- pypilecore/input/grouper_properties.py +3 -3
- pypilecore/input/soil_properties.py +19 -0
- pypilecore/input/tension.py +280 -0
- pypilecore/results/__init__.py +12 -4
- pypilecore/results/cases_multi_cpt_results.py +31 -26
- pypilecore/results/{multi_cpt_results.py → compression/multi_cpt_results.py} +26 -20
- pypilecore/results/{single_cpt_results.py → compression/single_cpt_results.py} +7 -7
- pypilecore/results/grouper_result.py +5 -3
- pypilecore/results/post_processing.py +1 -1
- pypilecore/results/result_definitions.py +20 -13
- pypilecore/results/soil_properties.py +50 -0
- pypilecore/results/tension/multi_cpt_results.py +393 -0
- pypilecore/results/tension/single_cpt_results.py +393 -0
- pypilecore/results/typing.py +44 -0
- pypilecore/viewers/interactive_figures/figure_cpt_results_plan_view.py +1 -1
- pypilecore/viewers/viewer_cpt_group_results.py +7 -3
- pypilecore/viewers/viewer_cpt_results.py +8 -3
- pypilecore/viewers/viewer_cpt_results_plan_view.py +7 -3
- py_pilecore-0.8.3.dist-info/RECORD +0 -44
- {py_pilecore-0.8.3.dist-info → py_pilecore-0.9.1.dist-info}/LICENSE +0 -0
- {py_pilecore-0.8.3.dist-info → py_pilecore-0.9.1.dist-info}/WHEEL +0 -0
- {py_pilecore-0.8.3.dist-info → py_pilecore-0.9.1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
from typing import Any, Optional, Sequence, Tuple, Union
|
|
5
|
+
|
|
6
|
+
import numpy as np
|
|
7
|
+
import pandas as pd
|
|
8
|
+
from matplotlib import pyplot as plt
|
|
9
|
+
from matplotlib.axes import Axes
|
|
10
|
+
from matplotlib.figure import Figure
|
|
11
|
+
from numpy.typing import NDArray
|
|
12
|
+
|
|
13
|
+
from pypilecore.common.piles import PileGridProperties
|
|
14
|
+
from pypilecore.results.soil_properties import (
|
|
15
|
+
CPTTable,
|
|
16
|
+
LayerTable,
|
|
17
|
+
SoilProperties,
|
|
18
|
+
get_soil_layer_handles,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
Number = Union[float, int]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@dataclass(frozen=True)
|
|
25
|
+
class CPTTensionResultsTable:
|
|
26
|
+
"""Object containing the results of a single CPT."""
|
|
27
|
+
|
|
28
|
+
pile_tip_level_nap: NDArray[np.float64]
|
|
29
|
+
"""The pile-tip level in [m] w.r.t. the reference."""
|
|
30
|
+
A: NDArray[np.float64]
|
|
31
|
+
"""The area of influence of the pile, that is, the area over which
|
|
32
|
+
the stress spreads around a pile within a pile group [m2]."""
|
|
33
|
+
R_t_d_plug: NDArray[np.float64]
|
|
34
|
+
"""The root ball weight, excluding the weight of the pile (7.6.3.3 (h) NEN
|
|
35
|
+
9997-1+C2:2017) [kN]."""
|
|
36
|
+
R_t_d: NDArray[np.float64]
|
|
37
|
+
"""The design value of the tensile resistance of a pile or pile group
|
|
38
|
+
(7.6.3.3 (a) NEN 9997-1+C2:2017) [kN]."""
|
|
39
|
+
R_t_k: NDArray[np.float64]
|
|
40
|
+
"""The characteristic value of the tensile resistance of a pile or pile
|
|
41
|
+
group (7.6.3.3 NEN 9997-1+C2:2017) [kN]."""
|
|
42
|
+
R_t_mob_ratio: NDArray[np.float64]
|
|
43
|
+
"""The mobilisation ratio of the shaft bearing capacity [-]."""
|
|
44
|
+
R_t_mob: NDArray[np.float64]
|
|
45
|
+
"""The mobilisation of the shaft bearing capacity [kN]."""
|
|
46
|
+
k_v_b: NDArray[np.float64]
|
|
47
|
+
"""The 1-dimensional stiffness modulus at pile bottom [kN/mm]."""
|
|
48
|
+
k_v_1: NDArray[np.float64]
|
|
49
|
+
"""The 1-dimensional stiffness modulus at pile head [MN/mm]."""
|
|
50
|
+
q_s_max_mean: NDArray[np.float64]
|
|
51
|
+
"""The computational value of shaft friction [MPa]."""
|
|
52
|
+
s_e: NDArray[np.float64]
|
|
53
|
+
"""The elastic shortening of the pile [mm]."""
|
|
54
|
+
s_b: NDArray[np.float64]
|
|
55
|
+
"""The settlement of the pile bottom [mm]."""
|
|
56
|
+
s_1: NDArray[np.float64]
|
|
57
|
+
"""The settlement of the pile [mm]."""
|
|
58
|
+
sand_clay_ratio: NDArray[np.float64]
|
|
59
|
+
"""Contributions to the bearing capacity from sandy layers [-]."""
|
|
60
|
+
|
|
61
|
+
def __post_init__(self) -> None:
|
|
62
|
+
dict_lengths = {}
|
|
63
|
+
for key, value in self.__dict__.items():
|
|
64
|
+
if not np.all(np.isnan(value)):
|
|
65
|
+
dict_lengths[key] = len(value)
|
|
66
|
+
if len(set(dict_lengths.values())) > 1:
|
|
67
|
+
raise ValueError(
|
|
68
|
+
f"Inputs for LayerTable must have same lengths, but got lengths: {dict_lengths}"
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
@classmethod
|
|
72
|
+
def from_sequences(
|
|
73
|
+
cls,
|
|
74
|
+
pile_tip_level_nap: Sequence[Number],
|
|
75
|
+
A: Sequence[Number],
|
|
76
|
+
R_t_d_plug: Sequence[Number],
|
|
77
|
+
R_t_d: Sequence[Number],
|
|
78
|
+
R_t_k: Sequence[Number],
|
|
79
|
+
R_t_mob_ratio: Sequence[Number],
|
|
80
|
+
R_t_mob: Sequence[Number],
|
|
81
|
+
k_v_b: Sequence[Number],
|
|
82
|
+
k_v_1: Sequence[Number],
|
|
83
|
+
q_s_max_mean: Sequence[Number],
|
|
84
|
+
s_e: Sequence[Number],
|
|
85
|
+
s_b: Sequence[Number],
|
|
86
|
+
s_1: Sequence[Number],
|
|
87
|
+
sand_clay_ratio: Sequence[Number],
|
|
88
|
+
) -> CPTTensionResultsTable:
|
|
89
|
+
return cls(
|
|
90
|
+
pile_tip_level_nap=np.array(pile_tip_level_nap).astype(np.float64),
|
|
91
|
+
A=np.array(A).astype(np.float64),
|
|
92
|
+
R_t_d_plug=np.array(R_t_d_plug).astype(np.float64),
|
|
93
|
+
R_t_d=np.array(R_t_d).astype(np.float64),
|
|
94
|
+
R_t_k=np.array(R_t_k).astype(np.float64),
|
|
95
|
+
R_t_mob_ratio=np.array(R_t_mob_ratio).astype(np.float64),
|
|
96
|
+
R_t_mob=np.array(R_t_mob).astype(np.float64),
|
|
97
|
+
k_v_b=np.array(k_v_b).astype(np.float64),
|
|
98
|
+
k_v_1=np.array(k_v_1).astype(np.float64),
|
|
99
|
+
q_s_max_mean=np.array(q_s_max_mean).astype(np.float64),
|
|
100
|
+
s_e=np.array(s_e).astype(np.float64),
|
|
101
|
+
s_b=np.array(s_b).astype(np.float64),
|
|
102
|
+
s_1=np.array(s_1).astype(np.float64),
|
|
103
|
+
sand_clay_ratio=np.array(sand_clay_ratio).astype(np.float64),
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
def to_pandas(self) -> pd.DataFrame:
|
|
107
|
+
"""Get the pandas.DataFrame representation"""
|
|
108
|
+
return pd.DataFrame(self.__dict__).dropna(axis=0, how="all")
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
class SingleCPTTensionBearingResults:
|
|
112
|
+
"""
|
|
113
|
+
Object that contains the results of a PileCore single-cpt calculation.
|
|
114
|
+
|
|
115
|
+
*Not meant to be instantiated by the user.*
|
|
116
|
+
"""
|
|
117
|
+
|
|
118
|
+
def __init__(
|
|
119
|
+
self,
|
|
120
|
+
soil_properties: SoilProperties,
|
|
121
|
+
pile_head_level_nap: float,
|
|
122
|
+
results_table: CPTTensionResultsTable,
|
|
123
|
+
pile_grid_properties: PileGridProperties,
|
|
124
|
+
) -> None:
|
|
125
|
+
"""
|
|
126
|
+
Parameters
|
|
127
|
+
----------
|
|
128
|
+
soil_properties
|
|
129
|
+
The object with soil properties
|
|
130
|
+
pile_head_level_nap
|
|
131
|
+
The elevation of the pile-head, in [m] w.r.t. NAP.
|
|
132
|
+
results_table
|
|
133
|
+
The object with CPT results.
|
|
134
|
+
"""
|
|
135
|
+
self._sp = soil_properties
|
|
136
|
+
self._pile_head_level_nap = pile_head_level_nap
|
|
137
|
+
self._results_table = results_table
|
|
138
|
+
self._pile_grid_properties = pile_grid_properties
|
|
139
|
+
|
|
140
|
+
@classmethod
|
|
141
|
+
def from_api_response(
|
|
142
|
+
cls,
|
|
143
|
+
cpt_results_dict: dict,
|
|
144
|
+
ref_height: float,
|
|
145
|
+
surface_level_ref: float,
|
|
146
|
+
x: float | None = None,
|
|
147
|
+
y: float | None = None,
|
|
148
|
+
) -> "SingleCPTTensionBearingResults":
|
|
149
|
+
results_table = cpt_results_dict["results_table"]
|
|
150
|
+
return cls(
|
|
151
|
+
soil_properties=SoilProperties(
|
|
152
|
+
cpt_table=CPTTable.from_api_response(
|
|
153
|
+
cpt_results_dict.get("cpt_chart", {})
|
|
154
|
+
),
|
|
155
|
+
layer_table=LayerTable.from_api_response(
|
|
156
|
+
cpt_results_dict["layer_table"]
|
|
157
|
+
),
|
|
158
|
+
test_id=cpt_results_dict.get("test_id"),
|
|
159
|
+
ref_height=ref_height,
|
|
160
|
+
surface_level_ref=surface_level_ref,
|
|
161
|
+
groundwater_level_ref=cpt_results_dict["groundwater_level_nap"],
|
|
162
|
+
x=x,
|
|
163
|
+
y=y,
|
|
164
|
+
),
|
|
165
|
+
pile_head_level_nap=cpt_results_dict["pile_head_level_nap"],
|
|
166
|
+
results_table=CPTTensionResultsTable.from_sequences(
|
|
167
|
+
pile_tip_level_nap=results_table["pile_tip_level_nap"],
|
|
168
|
+
k_v_b=results_table["k_v_b"],
|
|
169
|
+
k_v_1=results_table["k_v_1"],
|
|
170
|
+
A=results_table["A"],
|
|
171
|
+
R_t_d_plug=results_table["R_t_d_plug"],
|
|
172
|
+
R_t_d=results_table["R_t_d"],
|
|
173
|
+
R_t_k=results_table["R_t_k"],
|
|
174
|
+
R_t_mob_ratio=results_table["R_s_mob_ratio"],
|
|
175
|
+
R_t_mob=results_table["R_s_mob"],
|
|
176
|
+
q_s_max_mean=results_table["q_s_max_mean"],
|
|
177
|
+
s_e=results_table["s_e"],
|
|
178
|
+
s_b=results_table["s_b"],
|
|
179
|
+
s_1=results_table["s_1"],
|
|
180
|
+
sand_clay_ratio=results_table["sand_clay_ratio"],
|
|
181
|
+
),
|
|
182
|
+
pile_grid_properties=PileGridProperties.from_api_response(
|
|
183
|
+
cpt_results_dict["pile_grid"]
|
|
184
|
+
),
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
@property
|
|
188
|
+
def soil_properties(self) -> SoilProperties:
|
|
189
|
+
"""
|
|
190
|
+
The SoilProperties object.
|
|
191
|
+
"""
|
|
192
|
+
return self._sp
|
|
193
|
+
|
|
194
|
+
@property
|
|
195
|
+
def pile_grid_properties(self) -> PileGridProperties:
|
|
196
|
+
"""
|
|
197
|
+
The PileGridProperties object.
|
|
198
|
+
"""
|
|
199
|
+
return self._pile_grid_properties
|
|
200
|
+
|
|
201
|
+
@property
|
|
202
|
+
def pile_head_level_nap(self) -> float:
|
|
203
|
+
"""
|
|
204
|
+
The elevation of the pile-head in [m] w.r.t. NAP.
|
|
205
|
+
"""
|
|
206
|
+
return self._pile_head_level_nap
|
|
207
|
+
|
|
208
|
+
@property
|
|
209
|
+
def table(self) -> CPTTensionResultsTable:
|
|
210
|
+
"""The object with single-CPT results table traces."""
|
|
211
|
+
return self._results_table
|
|
212
|
+
|
|
213
|
+
def plot_bearing_capacities(
|
|
214
|
+
self,
|
|
215
|
+
axes: Optional[Axes] = None,
|
|
216
|
+
figsize: Tuple[float, float] = (8, 10),
|
|
217
|
+
add_legend: bool = True,
|
|
218
|
+
**kwargs: Any,
|
|
219
|
+
) -> Axes:
|
|
220
|
+
"""
|
|
221
|
+
Plot the bearing calculation results on an `Axes' object.
|
|
222
|
+
|
|
223
|
+
Parameters
|
|
224
|
+
----------
|
|
225
|
+
axes:
|
|
226
|
+
Optional `Axes` object where the bearing capacities can be plotted on.
|
|
227
|
+
If not provided, a new `plt.Figure` will be activated and the `Axes`
|
|
228
|
+
object will be created and returned.
|
|
229
|
+
figsize:
|
|
230
|
+
Size of the activate figure, as the `plt.figure()` argument.
|
|
231
|
+
add_legend:
|
|
232
|
+
Add a legend to the second axes object
|
|
233
|
+
**kwargs:
|
|
234
|
+
All additional keyword arguments are passed to the `pyplot.subplots()` call.
|
|
235
|
+
|
|
236
|
+
Returns
|
|
237
|
+
-------
|
|
238
|
+
axes:
|
|
239
|
+
The `Axes` object where the bearing capacities were plotted on.
|
|
240
|
+
"""
|
|
241
|
+
|
|
242
|
+
# Create axes objects if not provided
|
|
243
|
+
if axes is not None:
|
|
244
|
+
if not isinstance(axes, Axes):
|
|
245
|
+
raise ValueError(
|
|
246
|
+
"'axes' argument to plot_bearing_capacities() must be a `pyplot.axes.Axes` object or None."
|
|
247
|
+
)
|
|
248
|
+
else:
|
|
249
|
+
kwargs_subplot = {
|
|
250
|
+
"figsize": figsize,
|
|
251
|
+
"tight_layout": True,
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
kwargs_subplot.update(kwargs)
|
|
255
|
+
|
|
256
|
+
_, axes = plt.subplots(1, 1, **kwargs_subplot)
|
|
257
|
+
|
|
258
|
+
if not isinstance(axes, Axes):
|
|
259
|
+
raise ValueError(
|
|
260
|
+
"Could not create Axes objects. This is probably due to invalid matplotlib keyword arguments. "
|
|
261
|
+
)
|
|
262
|
+
|
|
263
|
+
# add horizontal lines
|
|
264
|
+
axes.axhline(
|
|
265
|
+
y=self.soil_properties.groundwater_level_ref,
|
|
266
|
+
color="tab:blue",
|
|
267
|
+
linestyle="--",
|
|
268
|
+
label="Groundwater level",
|
|
269
|
+
)
|
|
270
|
+
axes.axhline(
|
|
271
|
+
y=self.soil_properties.surface_level_ref,
|
|
272
|
+
color="tab:brown",
|
|
273
|
+
linestyle="--",
|
|
274
|
+
label="Surface level",
|
|
275
|
+
)
|
|
276
|
+
|
|
277
|
+
# add bearing result subplot
|
|
278
|
+
axes.plot(
|
|
279
|
+
np.array(self.table.R_t_d),
|
|
280
|
+
self.table.pile_tip_level_nap,
|
|
281
|
+
color="tab:orange",
|
|
282
|
+
label=r"$R_{t;d}$",
|
|
283
|
+
)
|
|
284
|
+
axes.plot(
|
|
285
|
+
np.array(self.table.R_t_d_plug),
|
|
286
|
+
self.table.pile_tip_level_nap,
|
|
287
|
+
label=r"$R_{t;d;kluit}$",
|
|
288
|
+
lw=3,
|
|
289
|
+
color="tab:blue",
|
|
290
|
+
)
|
|
291
|
+
axes.set_xlabel("Force [kN]")
|
|
292
|
+
axes.set_xlim(
|
|
293
|
+
np.floor(np.nanmin(np.array(self.table.R_t_d) / 10.0)) * 10,
|
|
294
|
+
np.ceil(np.nanmax(np.array(self.table.R_t_d) / 10.0)) * 10,
|
|
295
|
+
)
|
|
296
|
+
|
|
297
|
+
# add legend
|
|
298
|
+
if add_legend:
|
|
299
|
+
axes.legend(
|
|
300
|
+
loc="upper left",
|
|
301
|
+
bbox_to_anchor=(1, 1),
|
|
302
|
+
)
|
|
303
|
+
|
|
304
|
+
# set grid
|
|
305
|
+
axes.grid()
|
|
306
|
+
|
|
307
|
+
return axes
|
|
308
|
+
|
|
309
|
+
def plot_bearing_overview(
|
|
310
|
+
self,
|
|
311
|
+
figsize: Tuple[float, float] = (10.0, 12.0),
|
|
312
|
+
width_ratios: Tuple[float, float, float] = (1, 0.1, 2),
|
|
313
|
+
add_legend: bool = True,
|
|
314
|
+
**kwargs: Any,
|
|
315
|
+
) -> Figure:
|
|
316
|
+
"""
|
|
317
|
+
Plot an overview of the bearing-capacities, including the .
|
|
318
|
+
|
|
319
|
+
Parameters
|
|
320
|
+
----------
|
|
321
|
+
figsize:
|
|
322
|
+
Size of the activate figure, as the `plt.figure()` argument.
|
|
323
|
+
width_ratios:
|
|
324
|
+
Tuple of width-ratios of the subplots, as the `plt.GridSpec` argument.
|
|
325
|
+
add_legend:
|
|
326
|
+
Add a legend to the second axes object
|
|
327
|
+
**kwargs:
|
|
328
|
+
All additional keyword arguments are passed to the `pyplot.subplots()` call.
|
|
329
|
+
|
|
330
|
+
Returns
|
|
331
|
+
-------
|
|
332
|
+
fig:
|
|
333
|
+
The matplotlib Figure
|
|
334
|
+
"""
|
|
335
|
+
|
|
336
|
+
kwargs_subplot = {
|
|
337
|
+
"gridspec_kw": {"width_ratios": width_ratios},
|
|
338
|
+
"sharey": "row",
|
|
339
|
+
"figsize": figsize,
|
|
340
|
+
"tight_layout": True,
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
kwargs_subplot.update(kwargs)
|
|
344
|
+
|
|
345
|
+
fig, _ = plt.subplots(
|
|
346
|
+
1,
|
|
347
|
+
3,
|
|
348
|
+
**kwargs_subplot,
|
|
349
|
+
)
|
|
350
|
+
|
|
351
|
+
ax_qc, ax_layers, ax_bearing = fig.axes
|
|
352
|
+
ax_rf = ax_qc.twiny()
|
|
353
|
+
assert isinstance(ax_rf, Axes)
|
|
354
|
+
|
|
355
|
+
# Plot bearing capacities
|
|
356
|
+
self.soil_properties.cpt_table.plot_qc(ax_qc, add_legend=False)
|
|
357
|
+
bounds = ax_qc.get_ylim()
|
|
358
|
+
self.soil_properties.cpt_table.plot_friction_ratio(ax_rf, add_legend=False)
|
|
359
|
+
self.soil_properties.plot_layers(ax_layers, add_legend=False)
|
|
360
|
+
ax_layers.set_ylim(bounds)
|
|
361
|
+
|
|
362
|
+
self.plot_bearing_capacities(axes=ax_bearing, add_legend=False)
|
|
363
|
+
|
|
364
|
+
if add_legend:
|
|
365
|
+
ax_qc_legend_handles_list = ax_qc.get_legend_handles_labels()[0]
|
|
366
|
+
ax_rf_legend_handles_list = ax_rf.get_legend_handles_labels()[0]
|
|
367
|
+
ax_layers_legend_handles_list = get_soil_layer_handles()
|
|
368
|
+
|
|
369
|
+
# Omit last 2 duplicate "bearing" handles
|
|
370
|
+
# (groundwater_level and surface_level):
|
|
371
|
+
ax_bearing_legend_handles_list = ax_bearing.get_legend_handles_labels()[0][
|
|
372
|
+
2:
|
|
373
|
+
]
|
|
374
|
+
|
|
375
|
+
handles_list = [
|
|
376
|
+
*ax_qc_legend_handles_list,
|
|
377
|
+
*ax_rf_legend_handles_list,
|
|
378
|
+
*ax_layers_legend_handles_list,
|
|
379
|
+
*ax_bearing_legend_handles_list,
|
|
380
|
+
]
|
|
381
|
+
|
|
382
|
+
ax_bearing.legend(
|
|
383
|
+
handles=handles_list,
|
|
384
|
+
loc="upper left",
|
|
385
|
+
bbox_to_anchor=(1, 1),
|
|
386
|
+
title=(
|
|
387
|
+
"name: " + self.soil_properties.test_id
|
|
388
|
+
if self.soil_properties.test_id is not None
|
|
389
|
+
else "name: unknown"
|
|
390
|
+
),
|
|
391
|
+
)
|
|
392
|
+
|
|
393
|
+
return fig
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from typing import List, Protocol, TypeVar, runtime_checkable
|
|
2
|
+
|
|
3
|
+
from pypilecore.common.piles import PileProperties
|
|
4
|
+
from pypilecore.results.compression.multi_cpt_results import (
|
|
5
|
+
CPTCompressionGroupResultsTable,
|
|
6
|
+
SingleCPTCompressionBearingResultsContainer,
|
|
7
|
+
)
|
|
8
|
+
from pypilecore.results.tension.multi_cpt_results import (
|
|
9
|
+
CPTTensionGroupResultsTable,
|
|
10
|
+
SingleCPTTensionBearingResultsContainer,
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
T = TypeVar(
|
|
14
|
+
"T",
|
|
15
|
+
SingleCPTCompressionBearingResultsContainer,
|
|
16
|
+
SingleCPTTensionBearingResultsContainer,
|
|
17
|
+
)
|
|
18
|
+
S = TypeVar("S", CPTCompressionGroupResultsTable, CPTTensionGroupResultsTable)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@runtime_checkable
|
|
22
|
+
class MultiCPTBearingResults(Protocol):
|
|
23
|
+
"""
|
|
24
|
+
protocol classes for MultiCPTBearingResults from compression or tension endpoint response
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
def __init__(self) -> None:
|
|
28
|
+
...
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def pile_properties(self) -> PileProperties:
|
|
32
|
+
...
|
|
33
|
+
|
|
34
|
+
@property
|
|
35
|
+
def cpt_results(self) -> T:
|
|
36
|
+
...
|
|
37
|
+
|
|
38
|
+
@property
|
|
39
|
+
def cpt_names(self) -> List[str]:
|
|
40
|
+
...
|
|
41
|
+
|
|
42
|
+
@property
|
|
43
|
+
def group_results_table(self) -> S:
|
|
44
|
+
...
|
|
@@ -180,7 +180,7 @@ class FigureCPTResultsPlanView:
|
|
|
180
180
|
traces = []
|
|
181
181
|
for test_id in self.test_ids:
|
|
182
182
|
df = selected_data.loc[selected_data["test_id"] == test_id]
|
|
183
|
-
result = round(df["result"].values[0], 1)
|
|
183
|
+
result = 0 if df.empty else round(df["result"].values[0], 1)
|
|
184
184
|
color = get_continuous_color(
|
|
185
185
|
colorscale=colorscale,
|
|
186
186
|
intermed=(result - result_min) / (result_max - result_min),
|
|
@@ -2,11 +2,12 @@ from __future__ import annotations # noqa: F404
|
|
|
2
2
|
|
|
3
3
|
from typing import Any
|
|
4
4
|
|
|
5
|
+
import pandas as pd
|
|
5
6
|
from IPython.display import DisplayHandle, display
|
|
6
7
|
from ipywidgets import widgets
|
|
8
|
+
from natsort import natsorted
|
|
7
9
|
|
|
8
10
|
from pypilecore.results.cases_multi_cpt_results import CasesMultiCPTBearingResults
|
|
9
|
-
from pypilecore.results.result_definitions import CPTGroupResultDefinitions
|
|
10
11
|
from pypilecore.viewers.interactive_figures import FigureCPTGroupResultsVersusPtls
|
|
11
12
|
|
|
12
13
|
|
|
@@ -42,10 +43,13 @@ class ViewerCptGroupResults:
|
|
|
42
43
|
)
|
|
43
44
|
|
|
44
45
|
# Set up control widgets
|
|
46
|
+
_options = natsorted(
|
|
47
|
+
pd.unique(cases_multi_results.cpt_group_results_dataframe.result_name)
|
|
48
|
+
)
|
|
45
49
|
self._result_dropdown = widgets.Dropdown(
|
|
46
50
|
description="Result:",
|
|
47
|
-
value=
|
|
48
|
-
options=
|
|
51
|
+
value=_options[0],
|
|
52
|
+
options=_options,
|
|
49
53
|
)
|
|
50
54
|
|
|
51
55
|
# Update plot for initial selection of control widgets
|
|
@@ -2,11 +2,12 @@ from __future__ import annotations # noqa: F404
|
|
|
2
2
|
|
|
3
3
|
from typing import Any
|
|
4
4
|
|
|
5
|
+
import pandas as pd
|
|
5
6
|
from IPython.display import DisplayHandle, display
|
|
6
7
|
from ipywidgets import widgets
|
|
8
|
+
from natsort import natsorted
|
|
7
9
|
|
|
8
10
|
from pypilecore.results.cases_multi_cpt_results import CasesMultiCPTBearingResults
|
|
9
|
-
from pypilecore.results.result_definitions import CPTResultDefinitions
|
|
10
11
|
from pypilecore.viewers.interactive_figures import FigureCPTResultsVersusPtls
|
|
11
12
|
|
|
12
13
|
|
|
@@ -49,10 +50,14 @@ class ViewerCptResults:
|
|
|
49
50
|
value=self._figure_plts.cases[0],
|
|
50
51
|
options=self._figure_plts.cases,
|
|
51
52
|
)
|
|
53
|
+
|
|
54
|
+
_options = natsorted(
|
|
55
|
+
pd.unique(cases_multi_results.cpt_results_dataframe.result_name)
|
|
56
|
+
)
|
|
52
57
|
self._result_dropdown = widgets.Dropdown(
|
|
53
58
|
description="Result:",
|
|
54
|
-
value=
|
|
55
|
-
options=
|
|
59
|
+
value=_options[0],
|
|
60
|
+
options=_options,
|
|
56
61
|
)
|
|
57
62
|
|
|
58
63
|
# Update plot for initial selection of control widgets
|
|
@@ -2,11 +2,12 @@ from __future__ import annotations # noqa: F404
|
|
|
2
2
|
|
|
3
3
|
from typing import Any
|
|
4
4
|
|
|
5
|
+
import pandas as pd
|
|
5
6
|
from IPython.display import DisplayHandle, display
|
|
6
7
|
from ipywidgets import widgets
|
|
8
|
+
from natsort import natsorted
|
|
7
9
|
|
|
8
10
|
from pypilecore.results.cases_multi_cpt_results import CasesMultiCPTBearingResults
|
|
9
|
-
from pypilecore.results.result_definitions import CPTResultDefinitions
|
|
10
11
|
from pypilecore.viewers.interactive_figures.figure_cpt_results_plan_view import (
|
|
11
12
|
FigureCPTResultsPlanView,
|
|
12
13
|
)
|
|
@@ -53,10 +54,13 @@ class ViewerCptResultsPlanView:
|
|
|
53
54
|
value=self._figure_plan_view.cases[0],
|
|
54
55
|
options=self._figure_plan_view.cases,
|
|
55
56
|
)
|
|
57
|
+
_options = natsorted(
|
|
58
|
+
pd.unique(cases_multi_results.cpt_results_dataframe.result_name)
|
|
59
|
+
)
|
|
56
60
|
self._result_dropdown = widgets.Dropdown(
|
|
57
61
|
description="Result:",
|
|
58
|
-
value=
|
|
59
|
-
options=
|
|
62
|
+
value=_options[0],
|
|
63
|
+
options=_options,
|
|
60
64
|
)
|
|
61
65
|
self._pile_tip_level_dropdown = widgets.Dropdown(
|
|
62
66
|
description="Pile tip level NAP:",
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
pypilecore/__init__.py,sha256=oJvwYShj_7FyNVlUgQda4tTdYyLIi5H1asdiS_uYt9M,162
|
|
2
|
-
pypilecore/_version.py,sha256=CgH9e_v2XIcMMp7utsjodyLG4bkV8swPA_tatsVnXSw,175
|
|
3
|
-
pypilecore/api.py,sha256=QwwHXR6HYtrF-gCHQWLvMHZnTxf5fjTlWI2cGfYSkUc,7165
|
|
4
|
-
pypilecore/exceptions.py,sha256=-MZOfsxyHLCI0k1-wZFfVsMxc1lya5buuhLks5rxlCo,89
|
|
5
|
-
pypilecore/plot_utils.py,sha256=rK5_067-4-x7LzZgt_t6ahcGrZInxNrqHqsy0RzCnq8,954
|
|
6
|
-
pypilecore/utils.py,sha256=ib9LgJBIgWukL7zd_Zk1LP27UTMIZTRJ4RBB6ubn97o,1186
|
|
7
|
-
pypilecore/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
-
pypilecore/common/piles/__init__.py,sha256=xHP56HiBc1sHg2WZ9iG6CSJAgR072ZwD83lp8PSdTa4,114
|
|
9
|
-
pypilecore/common/piles/main.py,sha256=CKhPxWrI0KGhAPSBZRcaSR0stF5x65e7JIynJK3l5Mk,10583
|
|
10
|
-
pypilecore/common/piles/type.py,sha256=rxaJZ2MAybLdoGqb1KEBh8KYpaKEwnoebEq2bjBrahk,7227
|
|
11
|
-
pypilecore/common/piles/geometry/__init__.py,sha256=dFCVazEXnPCt5cQeHkSi5wp-yHRB9gKvtlQ3V5kBuOQ,438
|
|
12
|
-
pypilecore/common/piles/geometry/main.py,sha256=ant3y1ZTGRN2off5-dwz2024Xa7pC0K7auBbmjTy9p8,11231
|
|
13
|
-
pypilecore/common/piles/geometry/materials.py,sha256=4_lWwKPhW09tv--jLLwtTfku6dDTtsVXivpjcjXljiA,5199
|
|
14
|
-
pypilecore/common/piles/geometry/components/__init__.py,sha256=KugR37RWegxasqrf93h_PencnKzR4_Mi8s0GhEGzctM,326
|
|
15
|
-
pypilecore/common/piles/geometry/components/common.py,sha256=scYoF-4aE0Wknx9GgSO-qhaIJHfwV6vdIOdtfwExW4U,15127
|
|
16
|
-
pypilecore/common/piles/geometry/components/rectangle.py,sha256=591KyIejyjNAMnKg8yThFjbrPXAVHQdf08vaiQYHZdk,18411
|
|
17
|
-
pypilecore/common/piles/geometry/components/round.py,sha256=MX2_qGmxr1dTtodblFfkNGkoDYqd6xgXHJ57xFuz_Z0,14735
|
|
18
|
-
pypilecore/input/__init__.py,sha256=Gyqsp6zqc8AYnIp17SfqbBNjDaUkRgAam8x2r0XibwM,492
|
|
19
|
-
pypilecore/input/grouper_properties.py,sha256=4Rhea8pnrbWqIIiplHdPS-EioDRurCcLe6thHkGkBEM,11146
|
|
20
|
-
pypilecore/input/multi_cpt.py,sha256=b5poixEs5ex8WGcu3rJiFMdS5Q4DE807L6jmeqiFE64,17506
|
|
21
|
-
pypilecore/input/soil_properties.py,sha256=fsgkdvLsNf7LqiQh-gIDS9XSZBO7BJJ_qp6bIs8TLz0,9061
|
|
22
|
-
pypilecore/results/__init__.py,sha256=J6CHQ7BJRnUJxrKFe25br-BUCMrBATqmvRkjtaMkmkw,507
|
|
23
|
-
pypilecore/results/cases_multi_cpt_results.py,sha256=Svy26fEMuSLPzD0hdq3-aQD-6TK0oyAERkVQZFPcXrE,9948
|
|
24
|
-
pypilecore/results/grouper_result.py,sha256=HcjLbnD3wt28CtIACD1OSoyJRmfu5x8Qv2BdDMpvgyY,30952
|
|
25
|
-
pypilecore/results/load_settlement.py,sha256=EbfTrSvH_g96KE-x8ZjmO8D0mt5KFaQ_-AR8u4blLsU,9752
|
|
26
|
-
pypilecore/results/multi_cpt_results.py,sha256=dCV2VTRuReCt8J1MAfjqgboq2nNJ7r2OPPJ9DqTp4Io,30943
|
|
27
|
-
pypilecore/results/post_processing.py,sha256=UWXcdff5dhPFDwzKbVIayEIp3HX6pxW8oQR3Z7AHPn0,22262
|
|
28
|
-
pypilecore/results/result_definitions.py,sha256=Nb6AaJ6n5bVeC5awB1h-HO43_pknFVAZm-g5Zr8fpBU,8027
|
|
29
|
-
pypilecore/results/single_cpt_results.py,sha256=37zzsAO60JQX44cbqHoZgkdGdGIC_HvxM9em-oldo7o,17459
|
|
30
|
-
pypilecore/results/soil_properties.py,sha256=UfPdB3L1fCjp7iDr7b0iUs_RDBi8WhSPngF8rtfxqdo,20744
|
|
31
|
-
pypilecore/viewers/__init__.py,sha256=GjPAj7O_L5QsK2fhewi7yd5fZnbYeCvauDAD37I20Rg,330
|
|
32
|
-
pypilecore/viewers/viewer_cpt_group_results.py,sha256=iVwvm4JZeJ9v3r9Q5uWBAYJ7RQaYkQF0WOX0uUFMTgo,2530
|
|
33
|
-
pypilecore/viewers/viewer_cpt_results.py,sha256=EN9Qq8gGdvIz9rTuazmtVwLyI6NqcuzHv1gz2S3sgng,2956
|
|
34
|
-
pypilecore/viewers/viewer_cpt_results_plan_view.py,sha256=J1KOyUiG0tJJdpTAdEKYM-7aBhp9Kh4l-ceZnoOfqsA,3647
|
|
35
|
-
pypilecore/viewers/interactive_figures/__init__.py,sha256=u6fkLqDB35J2bdGvUewzRC8UEQUFF6AoXxR-_v8AX0A,481
|
|
36
|
-
pypilecore/viewers/interactive_figures/figure_cpt_group_results_versus_ptls.py,sha256=RzNOYQmP_yT8oYeIMW9aYNl7aAKU-uFQfygxP9AwDsU,6471
|
|
37
|
-
pypilecore/viewers/interactive_figures/figure_cpt_results_plan_view.py,sha256=y1no2w0zN0yUpkNB_-WAFwQfa-IS70hJMhc-c0pOeMs,9268
|
|
38
|
-
pypilecore/viewers/interactive_figures/figure_cpt_results_versus_ptls.py,sha256=6huCKcQ4bsBE-LNY-ZPa13IWuye0ENxPK4wT1dcCFRs,5964
|
|
39
|
-
pypilecore/viewers/interactive_figures/utils.py,sha256=B2X8hbbmJqjm8E2VrS2EoX5F1yQ5qOQnQUG_vbsseT8,1692
|
|
40
|
-
py_pilecore-0.8.3.dist-info/LICENSE,sha256=3OCAZXffN0Bettjeya8uF_ZYegyvvCfH1WUt6CrHb_0,1061
|
|
41
|
-
py_pilecore-0.8.3.dist-info/METADATA,sha256=w-8WsA6PS0p063zuYh6qW0K8F8UDL6mxaHPUTfwXzuc,5831
|
|
42
|
-
py_pilecore-0.8.3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
43
|
-
py_pilecore-0.8.3.dist-info/top_level.txt,sha256=7BKIWZuSkbQtJ0ho5P1JvcaEbHzqADCcBuOduZmIaiI,11
|
|
44
|
-
py_pilecore-0.8.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|