wolfhece 2.2.6__py3-none-any.whl → 2.2.8__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.
- wolfhece/PyVertex.py +43 -0
- wolfhece/__init__.py +12 -1
- wolfhece/apps/version.py +1 -1
- wolfhece/drowning_victims/drowning_functions.py +47 -47
- wolfhece/lifewatch.py +4 -0
- wolfhece/wolf_array.py +133 -12
- wolfhece/wolfresults_2D.py +7 -7
- {wolfhece-2.2.6.dist-info → wolfhece-2.2.8.dist-info}/METADATA +1 -1
- {wolfhece-2.2.6.dist-info → wolfhece-2.2.8.dist-info}/RECORD +12 -12
- {wolfhece-2.2.6.dist-info → wolfhece-2.2.8.dist-info}/WHEEL +0 -0
- {wolfhece-2.2.6.dist-info → wolfhece-2.2.8.dist-info}/entry_points.txt +0 -0
- {wolfhece-2.2.6.dist-info → wolfhece-2.2.8.dist-info}/top_level.txt +0 -0
wolfhece/PyVertex.py
CHANGED
@@ -178,6 +178,28 @@ class wolfvertex:
|
|
178
178
|
self.values = {}
|
179
179
|
self.values[id] = value
|
180
180
|
|
181
|
+
def add_value(self, id, value):
|
182
|
+
"""
|
183
|
+
Add a set of values to the vertex
|
184
|
+
|
185
|
+
:param id: key of the value
|
186
|
+
:param value: value to add
|
187
|
+
"""
|
188
|
+
|
189
|
+
self.addvalue(id, value)
|
190
|
+
|
191
|
+
def add_values(self, values:dict):
|
192
|
+
"""
|
193
|
+
Add a set of values to the vertex
|
194
|
+
|
195
|
+
:param values: dictionary of values to add
|
196
|
+
"""
|
197
|
+
|
198
|
+
if self.values is None:
|
199
|
+
self.values = {}
|
200
|
+
for key, value in values.items():
|
201
|
+
self.values[key] = value
|
202
|
+
|
181
203
|
def getvalue(self, id):
|
182
204
|
"""
|
183
205
|
Return a value from the vertex
|
@@ -191,6 +213,27 @@ class wolfvertex:
|
|
191
213
|
else:
|
192
214
|
return None
|
193
215
|
|
216
|
+
def get_value(self, id):
|
217
|
+
"""
|
218
|
+
Return a set of values from the vertex
|
219
|
+
|
220
|
+
:param id: key of the value
|
221
|
+
"""
|
222
|
+
|
223
|
+
return self.getvalue(id)
|
224
|
+
|
225
|
+
def get_values(self, ids:list) -> dict:
|
226
|
+
"""
|
227
|
+
Return a set of values from the vertex
|
228
|
+
"""
|
229
|
+
|
230
|
+
ret = {}
|
231
|
+
for id in ids:
|
232
|
+
if id in self.values.keys():
|
233
|
+
ret[id] = self.values[id]
|
234
|
+
|
235
|
+
return ret
|
236
|
+
|
194
237
|
def limit2bounds(self, bounds=None):
|
195
238
|
"""
|
196
239
|
Limit the vertex to a set of bounds
|
wolfhece/__init__.py
CHANGED
@@ -1 +1,12 @@
|
|
1
|
-
from . import _add_path
|
1
|
+
from . import _add_path
|
2
|
+
|
3
|
+
try:
|
4
|
+
from osgeo import gdal, osr
|
5
|
+
gdal.UseExceptions()
|
6
|
+
except ImportError as e:
|
7
|
+
print(e)
|
8
|
+
raise Exception(_('Error importing GDAL library'))
|
9
|
+
|
10
|
+
from .apps.version import WolfVersion
|
11
|
+
|
12
|
+
__version__ = WolfVersion().get_version()
|
wolfhece/apps/version.py
CHANGED
@@ -4,7 +4,6 @@ import math
|
|
4
4
|
from scipy.stats import beta
|
5
5
|
from scipy.optimize import fsolve
|
6
6
|
import random
|
7
|
-
from wolfgpu.glsimulation import ResultsStore
|
8
7
|
from pathlib import Path
|
9
8
|
import json
|
10
9
|
import wx
|
@@ -12,6 +11,11 @@ import queue
|
|
12
11
|
import os
|
13
12
|
import logging
|
14
13
|
|
14
|
+
try:
|
15
|
+
from wolfgpu.glsimulation import ResultsStore
|
16
|
+
except ImportError:
|
17
|
+
print("wolfgpu not available")
|
18
|
+
|
15
19
|
EPS = 0.15
|
16
20
|
G = [0, 0, -9.81]
|
17
21
|
P_ATM = 101325 # Pa
|
@@ -19,7 +23,7 @@ RHO_F = 1000
|
|
19
23
|
|
20
24
|
def beta_find(x, *data):
|
21
25
|
"""
|
22
|
-
Iterative function that finds the parameters alpha and beta defining a beta distribution and scales it in a range.
|
26
|
+
Iterative function that finds the parameters alpha and beta defining a beta distribution and scales it in a range.
|
23
27
|
The function fits the parameters based on two given percentiles of the data.
|
24
28
|
|
25
29
|
:param x: Array containing initial guesses for alpha and beta.
|
@@ -47,7 +51,7 @@ def beta_find(x, *data):
|
|
47
51
|
|
48
52
|
def Body_motion(a_RK, batch_turb, CFL, Delta, epsilon, H_pre, H_post, Human, k, NbX, NbY, Pos_bp, resurface, sinking, time_b, t_Wolf_pre, t_Wolf_post, time_goal, U_bp, Ux_pre, Ux_post, Uy_pre, Uy_post, Z_param):
|
49
53
|
"""
|
50
|
-
Function calculating the motion of the body at each time step using a Runge-Kutta method.
|
54
|
+
Function calculating the motion of the body at each time step using a Runge-Kutta method.
|
51
55
|
From body position, velocity and flow environment, the function determines the flow velocity at the body position and calculates its new velocities, checking for collisions with walls.
|
52
56
|
|
53
57
|
:param a_RK: Runge-Kutta coefficient.
|
@@ -115,7 +119,7 @@ def Body_motion(a_RK, batch_turb, CFL, Delta, epsilon, H_pre, H_post, Human, k,
|
|
115
119
|
|
116
120
|
## Get the velocity at exact time and horizontal position of each run, most time consuming function of the drowning calculation
|
117
121
|
[du_insta,_,_,H_f,k_f,U_x_vec,U_y_vec,walls] = interp_mailles_mat(Delta,epsilon,H_pre,H_post,index_bp,k,NbX,NbY,Pos_RK[j,:,:],t_Wolf_perc,t_Wolf_perc_insta,Ux_pre,Ux_post,Uy_pre,Uy_post)
|
118
|
-
|
122
|
+
|
119
123
|
## Parameters and calculations to have the velocity at the body vertical position and its relative velocity
|
120
124
|
l_tilde = EPS/H_f
|
121
125
|
z = np.clip(Pos_RK[j, :, -1],EPS, H_f)
|
@@ -144,12 +148,12 @@ def Body_motion(a_RK, batch_turb, CFL, Delta, epsilon, H_pre, H_post, Human, k,
|
|
144
148
|
|
145
149
|
t_Wolf_perc += dt/dt_Wolf
|
146
150
|
|
147
|
-
|
151
|
+
|
148
152
|
U_b = (1-a_RK)*U_RK[0,:,:] + a_RK*U_RK[1,:,:]
|
149
153
|
Pos_b = (1-a_RK)*Pos_RK[0,:,:] + a_RK*Pos_RK[1,:,:]
|
150
154
|
|
151
155
|
time_b += dt
|
152
|
-
|
156
|
+
|
153
157
|
## Check and corrections for collisions with walls
|
154
158
|
index_b = ((np.floor(Pos_b[:,:2].T / Delta[0:2,None])).T).astype(int)
|
155
159
|
walls = (H_pre[index_b[:,1], index_b[:,0]] < EPS)
|
@@ -161,11 +165,11 @@ def Body_motion(a_RK, batch_turb, CFL, Delta, epsilon, H_pre, H_post, Human, k,
|
|
161
165
|
ind_walls = np.where(walls)[0]
|
162
166
|
U_b[ind_walls,0:2] = 0
|
163
167
|
|
164
|
-
|
168
|
+
|
165
169
|
## Storage of times when bodies sank and resurfaced
|
166
170
|
sinking[:,0] = sinking[:,0] + (sinking[:,0]==0)*(Pos_b[:,2] == EPS)*(U_b[:,2]==0) * Pos_b[:,0]
|
167
171
|
sinking[:,1] = sinking[:,1] + (sinking[:,1]==0)*(Pos_b[:,2] == EPS)*(U_b[:,2]==0) * time_b
|
168
|
-
|
172
|
+
|
169
173
|
H_f = H_f.ravel()
|
170
174
|
V_b = V_b.ravel()
|
171
175
|
resurface[:,0] = resurface[:,0] + (resurface[:,0]==0)*(Pos_b[:,2] >= H_f-0.5)*(m_b/V_b/RHO_F<1) * Pos_b[:,0]
|
@@ -196,14 +200,14 @@ def Body_temperature(BSA, mass, T_w, t):
|
|
196
200
|
Res = 3000
|
197
201
|
|
198
202
|
T_b = T_w + (T_body_ini - T_w)*np.exp(-t/Res)
|
199
|
-
|
203
|
+
|
200
204
|
ADD = ((T_body_ini - T_w) * Res * (1 - np.exp(-t / Res)) + T_w * t)/3600/24 #Integral of the body temperature as a function of time, ADD in [°C.day]
|
201
205
|
|
202
206
|
return ADD,T_b
|
203
207
|
|
204
208
|
def Body_volume_variation(alpha_1, BSA, FRC, H_f, m_b, time_b, T_w, TLC, V_b0, V_clothes1, V_clothes2, z):
|
205
209
|
"""
|
206
|
-
Function calculating the body volume variation due to the putrefaction gases.
|
210
|
+
Function calculating the body volume variation due to the putrefaction gases.
|
207
211
|
The method is described in Delhez et al. 2025, "Predicting the buoyancy and Postmortem Submersion Interval of victims of river drowning".
|
208
212
|
|
209
213
|
:param alpha_1: Alpha parameter.
|
@@ -225,18 +229,18 @@ def Body_volume_variation(alpha_1, BSA, FRC, H_f, m_b, time_b, T_w, TLC, V_b0, V
|
|
225
229
|
p_ext = P_ATM+p_hydro
|
226
230
|
V_s = V_b0 - FRC #fraction of FRC on the whole body volume
|
227
231
|
n_0 = P_ATM*FRC/(8.3144621*(37+273.15)) #initial amount of gas in the lungs, perfect gas law
|
228
|
-
|
232
|
+
|
229
233
|
ADD = time_b/60/60/24 * T_w
|
230
234
|
_,T_b = Body_temperature(BSA,m_b,T_w,time_b) #Consideration of the actual body temperature
|
231
235
|
ratio_ADD = ADD/alpha_1
|
232
|
-
|
236
|
+
|
233
237
|
n_1 = 2*P_ATM * TLC/(8.3144621*(T_w+273.15))
|
234
238
|
coef_eta = [10,-15,6]
|
235
239
|
eta = n_1*(coef_eta[2]*(ratio_ADD)**5+coef_eta[1]*(ratio_ADD)**4+coef_eta[0]*(ratio_ADD)**3)
|
236
240
|
eta = np.minimum(eta,n_1)
|
237
|
-
|
241
|
+
|
238
242
|
V_clothes = np.where(T_w < 15, V_clothes1, V_clothes2)
|
239
|
-
|
243
|
+
|
240
244
|
V_comp = (n_0+eta/n_1*(n_1-n_0))*8.3144621*(T_b+273.15)/(p_ext) #Compressible Volume
|
241
245
|
V_b = V_s + V_comp + V_clothes
|
242
246
|
|
@@ -287,7 +291,7 @@ def Flow_time_t(batch_turb, dt, epsilon, H_f, k, turb_type, U_bp, U_x_vec, U_y_v
|
|
287
291
|
"""
|
288
292
|
U_x_dif = (U_x_vec-U_bp[:,0])
|
289
293
|
U_y_dif = (U_y_vec-U_bp[:,1])
|
290
|
-
U_x_vec,U_y_vec = U_turbulence(batch_turb,dt,epsilon,H_f,k,turb_type,U_x_vec,U_x_dif,U_y_vec,U_y_dif,z,z_0)
|
294
|
+
U_x_vec,U_y_vec = U_turbulence(batch_turb,dt,epsilon,H_f,k,turb_type,U_x_vec,U_x_dif,U_y_vec,U_y_dif,z,z_0)
|
291
295
|
U_x_dif = (U_x_vec-U_bp[:,0])
|
292
296
|
U_y_dif = (U_y_vec-U_bp[:,1])
|
293
297
|
U_x_sign = np.sign(U_x_dif)
|
@@ -297,7 +301,7 @@ def Flow_time_t(batch_turb, dt, epsilon, H_f, k, turb_type, U_bp, U_x_vec, U_y_v
|
|
297
301
|
|
298
302
|
def interp_mailles_mat(Delta, epsilon, H_0, H_1, index_b, k, NbX, NbY, Pos_b, t_WOLF_perc, t_Wolf_perc_insta, Ux_0, Ux_1, Uy_0, Uy_1):
|
299
303
|
"""
|
300
|
-
Determines the flow velocity and height at the body position based on the value of the cells in which the body is and the next cells in x, y and xy.
|
304
|
+
Determines the flow velocity and height at the body position based on the value of the cells in which the body is and the next cells in x, y and xy.
|
301
305
|
It is a spatial bi-linear and temporal linear interpolation.
|
302
306
|
Method described in Delhez et al. 2025, Lagrangian modelling of the drift of a victim of river drowning.
|
303
307
|
|
@@ -377,7 +381,7 @@ def interp_mailles_mat(Delta, epsilon, H_0, H_1, index_b, k, NbX, NbY, Pos_b, t_
|
|
377
381
|
# var[index_b[ind_walls,1],index_bo_x[ind_walls]] +
|
378
382
|
# var[index_bo_y[ind_walls],index_b[ind_walls,0]] +
|
379
383
|
# var[index_bo_y[ind_walls],index_bo_x[ind_walls]))
|
380
|
-
|
384
|
+
|
381
385
|
Ux_v[ind_walls] = sum_vars(Ux_0) / active_cells[ind_walls]
|
382
386
|
Uy_v[ind_walls] = sum_vars(Uy_0) / active_cells[ind_walls]
|
383
387
|
H_v[ind_walls] = sum_vars(H_0) / active_cells[ind_walls]
|
@@ -458,9 +462,9 @@ def Loading(Path_loading, Pos_b, time_b, U_b):
|
|
458
462
|
|
459
463
|
def Loop_management(progress_queue, process_id, a_RK, BC_cells, count, count_Wolf, CFL, Delta, Human_np, i_initial, n_b, n_saved, n_t, NbX, NbY, Path_Saving, Path_Wolf, Pos, Pos_b, resurface, sinking, time, time_b, time_goal, U, U_b, wanted_time, wanted_Wolf, Z_param_np):
|
460
464
|
"""
|
461
|
-
Main loop of the code. Calculates the motion of each body at each time in the loop and updates the flow when needed.
|
462
|
-
Everything is based on the array "still" which contains the index of all the bodies that need more calculations, as we work with variable time step for each body.
|
463
|
-
If a body is out of the domain, it is out of still; if a body reaches a time for which we need a save, it is out of still;
|
465
|
+
Main loop of the code. Calculates the motion of each body at each time in the loop and updates the flow when needed.
|
466
|
+
Everything is based on the array "still" which contains the index of all the bodies that need more calculations, as we work with variable time step for each body.
|
467
|
+
If a body is out of the domain, it is out of still; if a body reaches a time for which we need a save, it is out of still;
|
464
468
|
if a body reaches a time for which the flow needs to be updated, it is out of still.
|
465
469
|
|
466
470
|
:param progress_queue: Queue for progress updates.
|
@@ -516,7 +520,7 @@ def Loop_management(progress_queue, process_id, a_RK, BC_cells, count, count_Wol
|
|
516
520
|
sp = 0 + i%2
|
517
521
|
|
518
522
|
# Body position calculation at each time step
|
519
|
-
(Human_np[still,:],Pos[still,:,s],resurface[still,:],sinking[still,:],time[still],U[still,:,s]) = Body_motion(a_RK,batch_turb,CFL,Delta,epsilon,H_pre,H_post,Human_np[still,:],k,NbX,NbY,Pos[still,:,sp],resurface[still,:],sinking[still,:],time[still],t_Wolf-wanted_Wolf[count_Wolf_ini],wanted_Wolf[count_Wolf+1]-wanted_Wolf[count_Wolf_ini],t_for,U[still,:,sp],Ux_pre,Ux_post,Uy_pre,Uy_post,Z_param_np[still,:])
|
523
|
+
(Human_np[still,:],Pos[still,:,s],resurface[still,:],sinking[still,:],time[still],U[still,:,s]) = Body_motion(a_RK,batch_turb,CFL,Delta,epsilon,H_pre,H_post,Human_np[still,:],k,NbX,NbY,Pos[still,:,sp],resurface[still,:],sinking[still,:],time[still],t_Wolf-wanted_Wolf[count_Wolf_ini],wanted_Wolf[count_Wolf+1]-wanted_Wolf[count_Wolf_ini],t_for,U[still,:,sp],Ux_pre,Ux_post,Uy_pre,Uy_post,Z_param_np[still,:])
|
520
524
|
index = np.floor_divide(Pos[:, :2, s], Delta[:2]).astype(int)
|
521
525
|
still = np.where((time < t_for) & (time < t_Wolf) & (~np.any(np.all(index[:, None] == BC_cells, axis=2), axis=1)))[0]
|
522
526
|
|
@@ -567,7 +571,7 @@ def Loop_management(progress_queue, process_id, a_RK, BC_cells, count, count_Wol
|
|
567
571
|
|
568
572
|
# pbar.update(int(time[0] - pbar.n))
|
569
573
|
i += 1
|
570
|
-
|
574
|
+
|
571
575
|
return Pos_b,resurface,sinking,time_b,U_b
|
572
576
|
|
573
577
|
def Motion_equations(CAM, CDA, CLA, CSA, dt, du_insta, m_b, mu, U_bp, U_x_dif, U_x_sign, U_y_dif, U_y_sign, V_b, vertical):
|
@@ -599,7 +603,7 @@ def Motion_equations(CAM, CDA, CLA, CSA, dt, du_insta, m_b, mu, U_bp, U_x_dif, U
|
|
599
603
|
|
600
604
|
m_added = (CAM * RHO_F * V_b).T
|
601
605
|
# m_added = ((1+CAM) * RHO_F * V_b).T
|
602
|
-
|
606
|
+
|
603
607
|
# Initialisation of the forces arrays
|
604
608
|
F_fb = zeros_n_b_3.copy()
|
605
609
|
F_g = zeros_n_b_3.copy()
|
@@ -607,7 +611,7 @@ def Motion_equations(CAM, CDA, CLA, CSA, dt, du_insta, m_b, mu, U_bp, U_x_dif, U
|
|
607
611
|
F_A = zeros_n_b_3.copy()
|
608
612
|
|
609
613
|
#Rotation matrix to apply to the hydrodynamic coefficients, see article Delhez et al., 2025 for the detail computation of the resultant matrix
|
610
|
-
angle_rel = np.arctan2(U_y_dif, U_x_dif)
|
614
|
+
angle_rel = np.arctan2(U_y_dif, U_x_dif)
|
611
615
|
angle_rel[(U_y_dif == 0) & (U_x_dif == 0)] = 0
|
612
616
|
|
613
617
|
cos_angle_rel_2 = np.cos(2*angle_rel)
|
@@ -640,7 +644,7 @@ def Motion_equations(CAM, CDA, CLA, CSA, dt, du_insta, m_b, mu, U_bp, U_x_dif, U
|
|
640
644
|
|
641
645
|
# Friction forces, calculation of value and direction
|
642
646
|
F_fr_tot = mu * np.abs(Forces_but_friction[:,2]) * (Forces_but_friction[:,2]<0) #mu depends on the depth (activating the friction only at the bottom)
|
643
|
-
angle = np.arctan2(U_bp[:,1], U_bp[:,0])
|
647
|
+
angle = np.arctan2(U_bp[:,1], U_bp[:,0])
|
644
648
|
angle[(U_bp[:, 1] == 0) & (U_bp[:, 0] == 0)] = np.arctan2(Forces_but_friction[(U_bp[:, 1] == 0) & (U_bp[:, 0] == 0), 1], Forces_but_friction[(U_bp[:, 1] == 0) & (U_bp[:, 0] == 0), 0]) #Force the angle to be 0 also when both speed are -0.0 which gives -pi by convention
|
645
649
|
cos_angle = np.abs(np.cos(angle))# + 1*(angle*180/pi==90)
|
646
650
|
sin_angle = np.abs(np.sin(angle))# + 1*(angle*180/pi==0)
|
@@ -713,9 +717,9 @@ def Preparation_parallelisation(progress_queue, a_RK, BC_cells, count, count_Wol
|
|
713
717
|
end_idx = (i + 1) * chunk_size if i != n_parallel - 1 else n_b # Prend tout jusqu'à la fin au dernier
|
714
718
|
|
715
719
|
# Préparation des arguments pour chaque processus avec sous-vecteurs
|
716
|
-
task = (progress_queue,i,a_RK,BC_cells, count,count_Wolf, CFL, Delta, Human_np[start_idx:end_idx,:], i_initial, chunk_size, n_saved, n_t, NbX, NbY,
|
717
|
-
Path_saving,Path_Wolf, Pos[start_idx:end_idx,:,:], Pos_b[start_idx:end_idx,:,:], resurface[start_idx:end_idx],
|
718
|
-
sinking[start_idx:end_idx,:], time[start_idx:end_idx], time_b[start_idx:end_idx,:], time_goal,
|
720
|
+
task = (progress_queue,i,a_RK,BC_cells, count,count_Wolf, CFL, Delta, Human_np[start_idx:end_idx,:], i_initial, chunk_size, n_saved, n_t, NbX, NbY,
|
721
|
+
Path_saving,Path_Wolf, Pos[start_idx:end_idx,:,:], Pos_b[start_idx:end_idx,:,:], resurface[start_idx:end_idx],
|
722
|
+
sinking[start_idx:end_idx,:], time[start_idx:end_idx], time_b[start_idx:end_idx,:], time_goal,
|
719
723
|
U[start_idx:end_idx,:,:], U_b[start_idx:end_idx,:,:], wanted_time, wanted_Wolf, Z_param_np[start_idx:end_idx,:])
|
720
724
|
TASKS.append(task)
|
721
725
|
|
@@ -811,13 +815,13 @@ def Skinfold(n_b, known, Human):
|
|
811
815
|
ind_40_m = np.where((Human.Age.to_numpy()<=40)&(Human.Age.to_numpy()>30) & (Human.gender.to_numpy()==1))
|
812
816
|
ind_50_m = np.where((Human.Age.to_numpy()<=50)&(Human.Age.to_numpy()>40) & (Human.gender.to_numpy()==1))
|
813
817
|
ind_max_m = np.where((Human.Age.to_numpy()>50) & (Human.gender.to_numpy() ==1))
|
814
|
-
|
818
|
+
|
815
819
|
ind_20_w = np.where((Human.Age.to_numpy()<=20) & (Human.gender.to_numpy()==2))
|
816
820
|
ind_30_w = np.where((Human.Age.to_numpy()<=30)&(Human.Age.to_numpy()>20) & (Human.gender.to_numpy()==2))
|
817
821
|
ind_40_w = np.where((Human.Age.to_numpy()<=40)&(Human.Age.to_numpy()>30) & (Human.gender.to_numpy()==2))
|
818
822
|
ind_50_w = np.where((Human.Age.to_numpy()<=50)&(Human.Age.to_numpy()>40) & (Human.gender.to_numpy()==2))
|
819
823
|
ind_max_w = np.where((Human.Age.to_numpy()>50) & (Human.gender.to_numpy() ==2))
|
820
|
-
|
824
|
+
|
821
825
|
ind_20 = np.where(Human.Age.to_numpy()<=24)
|
822
826
|
ind_30 = np.where((Human.Age.to_numpy()<=34)&(Human.Age.to_numpy()>24))
|
823
827
|
ind_40 = np.where((Human.Age.to_numpy()<=44)&(Human.Age.to_numpy()>34))
|
@@ -825,45 +829,45 @@ def Skinfold(n_b, known, Human):
|
|
825
829
|
ind_60 = np.where((Human.Age.to_numpy()<=64)&(Human.Age.to_numpy()>54))
|
826
830
|
ind_70 = np.where((Human.Age.to_numpy()<=74)&(Human.Age.to_numpy()>64))
|
827
831
|
ind_max = np.where(Human.Age.to_numpy()>74)
|
828
|
-
|
832
|
+
|
829
833
|
BMI_25 = [20, 21.3, 22.5, 23.3, 22.9, 23.7, 23.1]
|
830
834
|
BMI_50 = [21.7, 23.4, 24.8, 25.7, 25.9, 26.3, 25.3]
|
831
835
|
BMI_75 = [24.3, 26.4, 28, 29, 29.1, 29.7, 28]
|
832
836
|
|
833
|
-
|
837
|
+
|
834
838
|
change = [ind_20,ind_30,ind_40,ind_50,ind_60,ind_70,ind_max]
|
835
839
|
|
836
840
|
ind_Age = np.minimum(math.floor(np.mean(Human.Age.to_numpy())/10)-1,6)
|
837
841
|
|
838
842
|
if known == 0:
|
839
|
-
|
843
|
+
|
840
844
|
for i in range(7):
|
841
845
|
ind = np.array((change[i]))
|
842
846
|
(aBMI,bBMI) = known_1(3,16,40,BMI_25[i],BMI_50[i],0.25,0.5)
|
843
847
|
Human.loc[ind[0,:],'BMI'] = rnd.beta(aBMI,bBMI,size=(len(ind[:][0])))*(40-16)+16
|
844
|
-
|
848
|
+
|
845
849
|
error_perc_fat = (rnd.beta(2,2,size=(n_b))*(2*std_perc_fat_m[ind_Age]+2*std_perc_fat_m[ind_Age])-2*std_perc_fat_m[ind_Age])*(Human.gender.to_numpy()==1) + (rnd.beta(2,2,size=(n_b))*(2*std_perc_fat_w[ind_Age]+2*std_perc_fat_w[ind_Age])-2*std_perc_fat_w[ind_Age])*(Human.gender.to_numpy()==2)
|
846
|
-
|
850
|
+
|
847
851
|
Human.loc[:,'mass'] = Human.BMI * Human.height**2
|
848
|
-
|
852
|
+
|
849
853
|
perc_fat = -32.515 + 12.409*(Human.gender.to_numpy()-1) + 3.306*Human.BMI.to_numpy() - 0.03*Human.BMI.to_numpy()**2 - 0.006*Human.Age.to_numpy() + 0.033*Human.Age.to_numpy()*(Human.gender.to_numpy()-1) - 0.001*Human.Age.to_numpy()*Human.BMI.to_numpy() #Meeuwsen et al
|
850
854
|
perc_fat = perc_fat*(perc_fat+error_perc_fat<45) + (perc_fat-(perc_fat+error_perc_fat-45-random.randint(-100,200))/100)*(perc_fat+error_perc_fat>=45)
|
851
855
|
perc_fat = np.maximum(perc_fat+error_perc_fat,8)
|
852
856
|
Human.rho = 4.95/(perc_fat/100+4.5) * 1000#Siri's equation
|
853
857
|
Human.Volume = Human.mass/Human.rho
|
854
|
-
|
858
|
+
|
855
859
|
else: #if known != 3:
|
856
860
|
|
857
861
|
ind_Age = np.minimum(math.floor(np.mean(Human.Age.to_numpy())/10)-1,6)
|
858
862
|
|
859
863
|
error_perc_fat = rnd.beta(2,2,size=(n_b))*(2*std_perc_fat_m[ind_Age]+2*std_perc_fat_m[ind_Age])-(2*std_perc_fat_m[ind_Age])*(Human.gender.to_numpy()==1) + (rnd.beta(2,2,size=(n_b))*(2*std_perc_fat_w[ind_Age]+2*std_perc_fat_w[ind_Age])-2*std_perc_fat_w[ind_Age])*(Human.gender.to_numpy()==2)
|
860
|
-
|
864
|
+
|
861
865
|
perc_fat = -32.515 + 12.409*(Human.gender.to_numpy()-1) + 3.306*Human.BMI.to_numpy() - 0.03*Human.BMI.to_numpy()**2 - 0.006*Human.Age.to_numpy() + 0.033*Human.Age.to_numpy()*(Human.gender.to_numpy()-1) - 0.001*Human.Age.to_numpy()*Human.BMI.to_numpy() #Meeuwsen et al
|
862
866
|
perc_fat = perc_fat*(perc_fat+error_perc_fat<45) + (perc_fat-(perc_fat+error_perc_fat-45-random.randint(-100,200))/100)*(perc_fat+error_perc_fat>=45)
|
863
867
|
perc_fat = np.maximum(perc_fat+error_perc_fat,8)
|
864
868
|
Human.rho = 4.95/(perc_fat/100+4.5) * 1000;#Siri's equation
|
865
869
|
Human.Volume = Human.mass.to_numpy()/Human.rho.to_numpy()
|
866
|
-
|
870
|
+
|
867
871
|
return Human,error_perc_fat
|
868
872
|
|
869
873
|
def state_of_run(progress_queue, frame, interval):
|
@@ -886,7 +890,7 @@ def state_of_run(progress_queue, frame, interval):
|
|
886
890
|
continue # Pas de mise à jour dispo, on continue
|
887
891
|
except (EOFError, BrokenPipeError):
|
888
892
|
break
|
889
|
-
|
893
|
+
|
890
894
|
# Close window when all processes are done
|
891
895
|
# if all(value is not None for value in progress_dict.values()):
|
892
896
|
# wx.CallAfter(frame.Close) # Close the frame after all tasks are complete
|
@@ -921,7 +925,7 @@ def U_turbulence(batch, dt, epsilon, H, k, turb_type, U_x, U_x_dif, U_y, U_y_dif
|
|
921
925
|
|
922
926
|
mask_zero = (H >= 0) & (z >= 0)
|
923
927
|
|
924
|
-
U_shear_x[mask_zero] = np.abs(U_x[mask_zero])*n*np.sqrt(9.81)/(H[mask_zero]**(1/6)) #based on the combination of Manning equation and definition of bed shear stress and shear velocity
|
928
|
+
U_shear_x[mask_zero] = np.abs(U_x[mask_zero])*n*np.sqrt(9.81)/(H[mask_zero]**(1/6)) #based on the combination of Manning equation and definition of bed shear stress and shear velocity
|
925
929
|
U_shear_y[mask_zero] = np.abs(U_y[mask_zero])*n*np.sqrt(9.81)/(H[mask_zero]**(1/6))
|
926
930
|
|
927
931
|
U_x_sign[mask_zero] = np.sign(U_x[mask_zero])
|
@@ -977,7 +981,7 @@ def U_turbulence(batch, dt, epsilon, H, k, turb_type, U_x, U_x_dif, U_y, U_y_dif
|
|
977
981
|
|
978
982
|
#U_y_shear = (U_y / factor) * ln_z_z0 #Log law of the wall
|
979
983
|
K_H = 0.6*H*np.abs(U_shear_y)#np.abs(U_y_shear) #Turbulent diffusion coefficient (or turbulent diffusivity coefficient)
|
980
|
-
U_y_turb = R*np.sqrt(2*K_H*dt)
|
984
|
+
U_y_turb = R*np.sqrt(2*K_H*dt)
|
981
985
|
U_y = U_shear_y/ kappa * ln_z_z0 + U_y_turb/dt
|
982
986
|
|
983
987
|
elif turb_type ==3: #See Bocksell & Loth (2001), Eqs. 16 to 21, based on k-eps
|
@@ -995,7 +999,7 @@ def U_turbulence(batch, dt, epsilon, H, k, turb_type, U_x, U_x_dif, U_y, U_y_dif
|
|
995
999
|
C_delta = 1.6 #Table 2 of the reference
|
996
1000
|
C_mu = 0.09 #After Eq. 17 of reference
|
997
1001
|
C_tau = 0.27 #Table 2 of the reference
|
998
|
-
|
1002
|
+
|
999
1003
|
Delta = np.array([C_c_x,C_c_y])*C_delta*C_mu**(3/4)*(k**(3/2)/epsilon) #Eq. 17
|
1000
1004
|
|
1001
1005
|
tau_delta = C_tau*eps_01_09*(k/epsilon) #Eq. 17
|
@@ -1013,7 +1017,3 @@ def U_turbulence(batch, dt, epsilon, H, k, turb_type, U_x, U_x_dif, U_y, U_y_dif
|
|
1013
1017
|
##At this time, compatible only with Wolf CPU because no k-eps given by GPU
|
1014
1018
|
|
1015
1019
|
return U_x,U_y
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
wolfhece/lifewatch.py
CHANGED
@@ -72,6 +72,10 @@ class LifeWatch_Legend(Enum):
|
|
72
72
|
# NODATA46 = (46, (246,146,246,255)) # Not used
|
73
73
|
NODATA_BLACK = (100, (0, 0, 0), 'Nodata', '') # Outside Belgium/Wallonia
|
74
74
|
|
75
|
+
@property
|
76
|
+
def code(self) -> int:
|
77
|
+
return self.value[0]
|
78
|
+
|
75
79
|
@classmethod
|
76
80
|
def reference(cls) -> str:
|
77
81
|
"""
|
wolfhece/wolf_array.py
CHANGED
@@ -1256,7 +1256,9 @@ class header_wolf():
|
|
1256
1256
|
def _rasterize_segment(self,
|
1257
1257
|
x1:float, y1:float,
|
1258
1258
|
x2:float, y2:float,
|
1259
|
-
xstart:float=None,
|
1259
|
+
xstart:float=None,
|
1260
|
+
ystart:float=None,
|
1261
|
+
n_packet:int = 10) -> list[list[float]]:
|
1260
1262
|
"""
|
1261
1263
|
Rasterize a segment according to the grid
|
1262
1264
|
where the grid is defined by the borders of the array.
|
@@ -1288,11 +1290,55 @@ class header_wolf():
|
|
1288
1290
|
while length >= prec:
|
1289
1291
|
|
1290
1292
|
if np.abs(direction[0])>= np.abs(direction[1]):
|
1291
|
-
|
1293
|
+
|
1294
|
+
if length > n_packet*prec:
|
1295
|
+
# I we are far from the end of the segment, we can use the n_packet to rasterize
|
1296
|
+
# this will be used to avoid to many straight lines
|
1297
|
+
nx = np.abs(int(direction[0] * (n_packet-1))) # number of points in x direction
|
1298
|
+
ny = np.abs(int(direction[1] * (n_packet-1))) # number of points in y direction
|
1299
|
+
|
1300
|
+
n_common = min(nx, ny) # number of common points
|
1301
|
+
|
1302
|
+
for i in range(n_common):
|
1303
|
+
xstart += self.dx * np.sign(direction[0])
|
1304
|
+
points.append([xstart, ystart])
|
1305
|
+
ystart += self.dy * np.sign(direction[1])
|
1306
|
+
points.append([xstart, ystart])
|
1307
|
+
|
1308
|
+
for i in range(nx - n_common):
|
1309
|
+
xstart += self.dx * np.sign(direction[0])
|
1310
|
+
points.append([xstart, ystart])
|
1311
|
+
|
1312
|
+
for j in range(ny - n_common):
|
1313
|
+
ystart += self.dy * np.sign(direction[1])
|
1314
|
+
points.append([xstart, ystart])
|
1315
|
+
else:
|
1316
|
+
xstart += self.dx * np.sign(direction[0])
|
1317
|
+
points.append([xstart, ystart])
|
1292
1318
|
else:
|
1293
|
-
|
1319
|
+
if length > n_packet*prec:
|
1320
|
+
nx = np.abs(int(direction[0] * (n_packet-1)))
|
1321
|
+
ny = np.abs(int(direction[1] * (n_packet-1)))
|
1322
|
+
|
1323
|
+
n_common = min(nx, ny)
|
1294
1324
|
|
1295
|
-
|
1325
|
+
for j in range(n_common):
|
1326
|
+
ystart += self.dy * np.sign(direction[1])
|
1327
|
+
points.append([xstart, ystart])
|
1328
|
+
xstart += self.dx * np.sign(direction[0])
|
1329
|
+
points.append([xstart, ystart])
|
1330
|
+
|
1331
|
+
for j in range(ny - n_common):
|
1332
|
+
ystart += self.dy * np.sign(direction[1])
|
1333
|
+
points.append([xstart, ystart])
|
1334
|
+
|
1335
|
+
for i in range(nx - n_common):
|
1336
|
+
xstart += self.dx * np.sign(direction[0])
|
1337
|
+
points.append([xstart, ystart])
|
1338
|
+
|
1339
|
+
else:
|
1340
|
+
ystart += self.dy * np.sign(direction[1])
|
1341
|
+
points.append([xstart, ystart])
|
1296
1342
|
|
1297
1343
|
direction = np.array([x2-xstart, y2-ystart])
|
1298
1344
|
|
@@ -1302,7 +1348,7 @@ class header_wolf():
|
|
1302
1348
|
|
1303
1349
|
return points
|
1304
1350
|
|
1305
|
-
def
|
1351
|
+
def rasterize_vector_along_grid(self, vector2raster:vector, outformat:Union[np.ndarray, vector]=vector) -> Union[np.ndarray,vector]:
|
1306
1352
|
"""
|
1307
1353
|
Rasterize a vector according to the grid
|
1308
1354
|
|
@@ -1337,6 +1383,14 @@ class header_wolf():
|
|
1337
1383
|
|
1338
1384
|
return newvector
|
1339
1385
|
|
1386
|
+
def rasterize_vector(self, vector2raster:vector, outformat:Union[np.ndarray, vector]=vector) -> Union[np.ndarray,vector]:
|
1387
|
+
""" DEPRECATED since 2.2.8 -- use rasterize_vector_along_grid instead.
|
1388
|
+
|
1389
|
+
Will be removed in 2.3.0
|
1390
|
+
"""
|
1391
|
+
logging.warning(_('rasterize_vector is deprecated since 2.2.8 -- use rasterize_vector_along_grid instead'))
|
1392
|
+
return self.rasterize_vector_along_grid(vector2raster, outformat=outformat)
|
1393
|
+
|
1340
1394
|
def get_xy_infootprint_vect(self, myvect: vector | Polygon, eps:float = 0.) -> tuple[np.ndarray,np.ndarray]:
|
1341
1395
|
"""
|
1342
1396
|
Return the coordinates of the cells in the footprint of a vector
|
@@ -5397,7 +5451,7 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
5397
5451
|
assert np_source.shape == (self.nbx, self.nby), _('Shape of np_source is not compatible with header')
|
5398
5452
|
|
5399
5453
|
if self.dtype != np_source.dtype:
|
5400
|
-
logging.warning(_(
|
5454
|
+
logging.warning(_(f"dtype of np_source is not compatible with header -- Conversion will be done to match wolf header's type {self.dtype}"))
|
5401
5455
|
np_source = np_source.astype(self.dtype)
|
5402
5456
|
|
5403
5457
|
self.array = ma.MaskedArray(np_source, mask= np_source[:,:] == self.nullvalue, copy=False, order='C')
|
@@ -6771,6 +6825,7 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
6771
6825
|
return
|
6772
6826
|
|
6773
6827
|
destij = self.xy2ij_np(destxy)
|
6828
|
+
|
6774
6829
|
elif self.mngselection.myselection == 'all':
|
6775
6830
|
destij = np.where(self.array.mask == False)
|
6776
6831
|
destij = np.array(destij).transpose()
|
@@ -6792,9 +6847,6 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
6792
6847
|
|
6793
6848
|
destij = self.xy2ij_np(destxy)
|
6794
6849
|
|
6795
|
-
# if convert_xy2ij:
|
6796
|
-
# destij = np.asarray([list(self.get_ij_from_xy(x, y)) for x, y in destxy])
|
6797
|
-
|
6798
6850
|
xyz = working_vector.asnparray3d()
|
6799
6851
|
|
6800
6852
|
newvalues = griddata(xyz[:, :2], xyz[:, 2], destxy, method=method, fill_value=-99999.)
|
@@ -6802,6 +6854,62 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
6802
6854
|
locmask = np.where(newvalues != -99999.)
|
6803
6855
|
self.array.data[destij[locmask][:, 0], destij[locmask][:, 1]] = newvalues[locmask]
|
6804
6856
|
|
6857
|
+
def rasterize_vector_valuebyid(self, working_vector: vector, id,
|
6858
|
+
method:Literal["nearest", "linear", "cubic"]="linear"):
|
6859
|
+
"""
|
6860
|
+
Rasterize a vector using the value of the id
|
6861
|
+
"""
|
6862
|
+
|
6863
|
+
if not isinstance(working_vector, vector):
|
6864
|
+
logging.error(_('working_vector must be a vector. You provided a {}').format(type(working_vector)))
|
6865
|
+
return
|
6866
|
+
|
6867
|
+
if working_vector.get_value(id) is None:
|
6868
|
+
logging.error(_('No value for id {}').format(id))
|
6869
|
+
return
|
6870
|
+
|
6871
|
+
val = working_vector.get_value(id)
|
6872
|
+
if val is None:
|
6873
|
+
logging.error(_('No value for id {}').format(id))
|
6874
|
+
return
|
6875
|
+
|
6876
|
+
try:
|
6877
|
+
val = float(val)
|
6878
|
+
except:
|
6879
|
+
logging.error(_('Value for id {} is not a number').format(id))
|
6880
|
+
return
|
6881
|
+
|
6882
|
+
newvec = working_vector.deepcopy()
|
6883
|
+
newvec.z = val
|
6884
|
+
|
6885
|
+
self.interpolate_on_polygon(newvec, method)
|
6886
|
+
|
6887
|
+
def rasterize_zone_valuebyid(self, working_zone: zone, id,
|
6888
|
+
method:Literal["nearest", "linear", "cubic"]="linear"):
|
6889
|
+
"""
|
6890
|
+
Rasterize a zone using the value of the id
|
6891
|
+
"""
|
6892
|
+
|
6893
|
+
if not isinstance(working_zone, zone):
|
6894
|
+
logging.error(_('working_zone must be a zone. You provided a {}').format(type(working_zone)))
|
6895
|
+
return
|
6896
|
+
|
6897
|
+
for curvec in working_zone.myvectors:
|
6898
|
+
self.rasterize_vector_valuebyid(curvec, id, method)
|
6899
|
+
|
6900
|
+
def rasterize_zones_valuebyid(self, working_zones: Zones, id,
|
6901
|
+
method:Literal["nearest", "linear", "cubic"]="linear"):
|
6902
|
+
"""
|
6903
|
+
Rasterize a zone using the value of the id
|
6904
|
+
"""
|
6905
|
+
|
6906
|
+
if not isinstance(working_zones, Zones):
|
6907
|
+
logging.error(_('working_zone must be a zone. You provided a {}').format(type(working_zones)))
|
6908
|
+
return
|
6909
|
+
|
6910
|
+
for curzone in working_zones.myzones:
|
6911
|
+
self.rasterize_zone_valuebyid(curzone, id, method)
|
6912
|
+
|
6805
6913
|
def interpolate_on_polygons(self, working_zone:zone, method:Literal["nearest", "linear", "cubic"]="linear"):
|
6806
6914
|
"""
|
6807
6915
|
Interpolation sous plusieurs polygones d'une même zone
|
@@ -9468,11 +9576,20 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
9468
9576
|
'classic']='scipyfft',
|
9469
9577
|
inplace:bool=True) -> "WolfArray":
|
9470
9578
|
"""
|
9471
|
-
Convolve the array with a filter
|
9579
|
+
Convolve the array with a filter.
|
9580
|
+
|
9581
|
+
The array and the filter should have the same dtype. If not, a warning is issued and the array dtype is used.
|
9582
|
+
|
9583
|
+
Thus:
|
9584
|
+
|
9585
|
+
- An int8 array convolved with float32 filter will be converted to int8.
|
9586
|
+
- A float32 array convolved with int8 filter will be converted to float32.
|
9587
|
+
|
9588
|
+
**User should be careful with the dtype of both the array AND the filter.**
|
9472
9589
|
|
9473
9590
|
:param filter: filter to convolve with
|
9474
9591
|
:param method: method to use for convolution ('scipyfft', 'jaxfft', 'classic')
|
9475
|
-
:param inplace: if True, the array is modified in place, otherwise a new array is returned
|
9592
|
+
:param inplace: if True, the array is modified in place, otherwise a new array is returned -- same type as the original one
|
9476
9593
|
:return: convolved array, WolfArray instance
|
9477
9594
|
|
9478
9595
|
"""
|
@@ -9487,6 +9604,10 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
9487
9604
|
logging.error("Filter must be a WolfArray or a numpy array")
|
9488
9605
|
return None
|
9489
9606
|
|
9607
|
+
if self.dtype != _filter.dtype:
|
9608
|
+
logging.warning(_("Filter and array should have the same dtype - {} - {}").format(self.dtype, _filter.dtype))
|
9609
|
+
logging.warning(_("Convolution result will have the dtype - {}").format(self.dtype))
|
9610
|
+
|
9490
9611
|
if method == 'classic':
|
9491
9612
|
from scipy.signal import convolve2d
|
9492
9613
|
convolved = convolve2d(self.array.data, _filter, mode='same', fillvalue=0.0)
|
@@ -9508,7 +9629,7 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
9508
9629
|
self.array.data[:,:] = convolved
|
9509
9630
|
return self
|
9510
9631
|
else:
|
9511
|
-
newWolfArray = WolfArray(mold=self)
|
9632
|
+
newWolfArray = WolfArray(mold=self, whichtype=self.wolftype)
|
9512
9633
|
newWolfArray.array.data[:,:] = convolved
|
9513
9634
|
newWolfArray.array.mask[:,:] = self.array.mask[:,:]
|
9514
9635
|
newWolfArray.count()
|
wolfhece/wolfresults_2D.py
CHANGED
@@ -3797,7 +3797,7 @@ class Wolfresults_2D(Element_To_Draw):
|
|
3797
3797
|
|
3798
3798
|
myhead = self.get_header_block(1)
|
3799
3799
|
if to_rasterize:
|
3800
|
-
myvect = myhead.
|
3800
|
+
myvect = myhead.rasterize_vector_along_grid(myvect)
|
3801
3801
|
|
3802
3802
|
mynormals = myvect.get_normal_segments()
|
3803
3803
|
xy_center = myvect.get_center_segments()
|
@@ -3877,7 +3877,7 @@ class Wolfresults_2D(Element_To_Draw):
|
|
3877
3877
|
for i in tqdm(range(nb)):
|
3878
3878
|
if i == 0:
|
3879
3879
|
myhead = self.get_header_block(1)
|
3880
|
-
vect_raster = myhead.
|
3880
|
+
vect_raster = myhead.rasterize_vector_along_grid(vect)
|
3881
3881
|
self.read_oneresult(i)
|
3882
3882
|
q.append(self._plot_one_q_raster_splitting(vect_raster, True, to_rasterize=False))
|
3883
3883
|
|
@@ -3892,7 +3892,7 @@ class Wolfresults_2D(Element_To_Draw):
|
|
3892
3892
|
|
3893
3893
|
for i in range(len(vect)):
|
3894
3894
|
q[vect[i].myname] = []
|
3895
|
-
vect_raster.append(myhead.
|
3895
|
+
vect_raster.append(myhead.rasterize_vector_along_grid(vect[i]))
|
3896
3896
|
|
3897
3897
|
for i in tqdm(range(nb)):
|
3898
3898
|
self.read_oneresult(i)
|
@@ -3982,7 +3982,7 @@ class Wolfresults_2D(Element_To_Draw):
|
|
3982
3982
|
elif x_or_y == 'border':
|
3983
3983
|
if i==0:
|
3984
3984
|
myhead = self.get_header_block(1)
|
3985
|
-
vect_raster = myhead.
|
3985
|
+
vect_raster = myhead.rasterize_vector_along_grid(vect)
|
3986
3986
|
q.append(self._plot_one_q_raster_splitting(vect_raster, absolute, to_rasterize = False))
|
3987
3987
|
|
3988
3988
|
ax.plot(times,q, c='blue', label=vect.myname)
|
@@ -4000,7 +4000,7 @@ class Wolfresults_2D(Element_To_Draw):
|
|
4000
4000
|
for i in range(len(vect)):
|
4001
4001
|
q[i]= []
|
4002
4002
|
if x_or_y[i] == 'border':
|
4003
|
-
vect_raster.append(myhead.
|
4003
|
+
vect_raster.append(myhead.rasterize_vector_along_grid(vect[i]))
|
4004
4004
|
|
4005
4005
|
for i in tqdm(range(nb)):
|
4006
4006
|
self.read_oneresult(i)
|
@@ -4063,7 +4063,7 @@ class Wolfresults_2D(Element_To_Draw):
|
|
4063
4063
|
elif x_or_y == 'border':
|
4064
4064
|
if i==0:
|
4065
4065
|
myhead = self.get_header_block(1)
|
4066
|
-
vect_raster = myhead.
|
4066
|
+
vect_raster = myhead.rasterize_vector_along_grid(vect)
|
4067
4067
|
q.append(self._plot_one_q_raster_splitting(vect_raster, absolute, to_rasterize = False))
|
4068
4068
|
|
4069
4069
|
fig.plot(times,q, c='blue', label=vect.myname)
|
@@ -4081,7 +4081,7 @@ class Wolfresults_2D(Element_To_Draw):
|
|
4081
4081
|
for i in range(len(vect)):
|
4082
4082
|
q[i]= []
|
4083
4083
|
if x_or_y[i] == 'border':
|
4084
|
-
vect_raster.append(myhead.
|
4084
|
+
vect_raster.append(myhead.rasterize_vector_along_grid(vect[i]))
|
4085
4085
|
|
4086
4086
|
for i in tqdm(range(nb)):
|
4087
4087
|
self.read_oneresult(i)
|
@@ -16,7 +16,7 @@ wolfhece/PyPalette.py,sha256=k9b_95GYD0USQ8DS5zGXeZ577712U6772kmhEbJtlXw,35406
|
|
16
16
|
wolfhece/PyParams.py,sha256=Dh9C_WYICMjo3m9roRySsu8ZgFzzYhSr6RpbaXZni0M,99423
|
17
17
|
wolfhece/PyPictures.py,sha256=m1kY0saW6Y9Q0bDCo47lW6XxDkBrbQG-Fd8uVn8G5ic,2514
|
18
18
|
wolfhece/PyTranslate.py,sha256=4appkmNeHHZLFmUtaA_k5_5QL-5ymxnbVN4R2OblmtE,622
|
19
|
-
wolfhece/PyVertex.py,sha256=
|
19
|
+
wolfhece/PyVertex.py,sha256=WboSqzI0fYI7wLk-jtgQ0ykX5QBKuVJuoavc8NnjEoo,46593
|
20
20
|
wolfhece/PyVertexvectors.py,sha256=0lt0YyHIz_IxgXqdqPlTDruDwjeP6L1Dw6B2Q35a8kQ,325801
|
21
21
|
wolfhece/PyWMS.py,sha256=LWkQk3R7miiVal-n5K5P5ClSQJA_vi5ImBxYGuxCx9A,9122
|
22
22
|
wolfhece/RatingCurve.py,sha256=bUjIrQjvIjkD4V-z8bZmA6pe1ILtYNM0-3fT6YUY1RU,22498
|
@@ -24,7 +24,7 @@ wolfhece/RatingCurveData.py,sha256=5UvnIm89BwqjnEbLCcY3CA8WoFd_xHJbooNy62fX5iY,5
|
|
24
24
|
wolfhece/RatingCurve_xml.py,sha256=cUjReVMHFKtakA2wVey5zz6lCgHlSr72y7ZfswZDvTM,33891
|
25
25
|
wolfhece/ReadDataDCENN.py,sha256=vm-I4YMryvRldjXTvRYEUCxZsjb_tM7U9yj6OaPyD0k,1538
|
26
26
|
wolfhece/Results2DGPU.py,sha256=45bLAkWvqHcw60QIP7qXyizbmS7buoDC7ndzOVfiWXg,26302
|
27
|
-
wolfhece/__init__.py,sha256=
|
27
|
+
wolfhece/__init__.py,sha256=kw2zFam1CqCH6CHgRHCZt7YXzsGaOQ-PwNkIi_E2H-Y,272
|
28
28
|
wolfhece/_add_path.py,sha256=nudniS-lsgHwXXq5o626XRDzIeYj76GoGKYt6lcu2Nc,616
|
29
29
|
wolfhece/analyze_vect.py,sha256=3lkMwaQ4KRddBVRvlP9PcM66wZwwC0eCmypP91AW-os,6015
|
30
30
|
wolfhece/cli.py,sha256=U8D7e_OezfrRfgMsa4TyQ7rI4voLKSY3RK-c8fb6rrw,3156
|
@@ -41,7 +41,7 @@ wolfhece/ins.py,sha256=uUeLMS1n3GPnfJhxl0Z2l-UXpmPUgthuwct282OOEzk,36184
|
|
41
41
|
wolfhece/irm_qdf.py,sha256=DMdDEAYbgYxApObm6w-dZbBmA8ec6PghBLXR2lUEZLc,27457
|
42
42
|
wolfhece/ismember.py,sha256=fkLvaH9fhx-p0QrlEzqa6ySO-ios3ysjAgXVXzLgSpY,2482
|
43
43
|
wolfhece/lagrange_multiplier.py,sha256=0G-M7b2tGzLx9v0oNYYq4_tLAiHcs_39B4o4W3TUVWM,6567
|
44
|
-
wolfhece/lifewatch.py,sha256=
|
44
|
+
wolfhece/lifewatch.py,sha256=Q_Wy6VGkrD-xxY0fv3PKpT8U8oXxNMgiLlrAE3bMheo,16340
|
45
45
|
wolfhece/matplotlib_fig.py,sha256=vnFI6sghw9N9jKhR8X1Z4aWli_5fPNylZQtFuujFJDY,84075
|
46
46
|
wolfhece/multiprojects.py,sha256=Sd6Bl6YP33jlR79A6rvSLu23vq8sqbFYL8lWuVPkEpE,21549
|
47
47
|
wolfhece/picc.py,sha256=0X_pzhSBoVxgtTfJ37pkOQO3Vbr9yurPaD1nVeurx8k,8531
|
@@ -58,13 +58,13 @@ wolfhece/rain_SPWMI.py,sha256=qCfcmF7LajloOaCwnTrrSMzyME03YyilmRUOqrPrv3U,13846
|
|
58
58
|
wolfhece/textpillow.py,sha256=map7HsGYML_o5NHRdFg2s_TVQed_lDnpYNDv27MM0Vw,14130
|
59
59
|
wolfhece/tools2d_dll.py,sha256=oU0m9XYAf4CZsMoB68IuKeE6SQh-AqY7O5NVED8r9uw,13125
|
60
60
|
wolfhece/tools_mpl.py,sha256=gQ3Jg1iuZiecmMqa5Eli2ZLSkttu68VXL8YmMDBaEYU,564
|
61
|
-
wolfhece/wolf_array.py,sha256=
|
61
|
+
wolfhece/wolf_array.py,sha256=HwOejG8kYTQ1l6c3RX8nuFwMAuySTWfgsxIvZl_Ivcg,496150
|
62
62
|
wolfhece/wolf_hist.py,sha256=7jeVrgSkM3ErJO6SRMH_PGzfLjIdw8vTy87kesldggk,3582
|
63
63
|
wolfhece/wolf_texture.py,sha256=IvFtekT5iLU2sivZOOlJXpE4CevjTQYSxHaOp4cH_wI,17723
|
64
64
|
wolfhece/wolf_tiles.py,sha256=v-HohqaWuMYdn75XLnA22dlloAG90iwnIqrgnB0ASQ4,10488
|
65
65
|
wolfhece/wolf_vrt.py,sha256=wbxXVN7TL9zgdyF79S-4e3pje6wJEAgBEfF_Y8kkzxs,14271
|
66
66
|
wolfhece/wolf_zi_db.py,sha256=baE0niMCzybWGSvPJc5FNxo9ZxsGfU4p-FmfiavFHAs,12967
|
67
|
-
wolfhece/wolfresults_2D.py,sha256=
|
67
|
+
wolfhece/wolfresults_2D.py,sha256=N-L9gmurQEMUjrC23HJjWRRaIxvcdhk6R8KKcb94LJw,218231
|
68
68
|
wolfhece/xyz_file.py,sha256=1pzLFmmdHca4yBVR9Jitic6N82rY28mRytGC1zMbY28,6615
|
69
69
|
wolfhece/acceptability/Parallels.py,sha256=2wVkfJYor4yl7VYiAZiGGTFwtAab2z66ZfRtBliVweE,4088
|
70
70
|
wolfhece/acceptability/__init__.py,sha256=hfgoPKLDpX7drN1Vpvux-_5Lfyc_7feT2C2zQr5v-Os,258
|
@@ -86,7 +86,7 @@ wolfhece/apps/curvedigitizer.py,sha256=lEJJwgAfulrrWQc-U6ij6sj59hWN3SZl4Yu1kQxVz
|
|
86
86
|
wolfhece/apps/hydrometry.py,sha256=lhhJsFeb4zGL4bNQTs0co85OQ_6ssL1Oy0OUJCzhfYE,656
|
87
87
|
wolfhece/apps/isocurrent.py,sha256=dagmGR8ja9QQ1gwz_8fU-N052hIw-W0mWGVkzLu6C7I,4247
|
88
88
|
wolfhece/apps/splashscreen.py,sha256=eCPAUYscZPWDYKBHDBWum_VIcE7WXOCBe1GLHL3KUmU,3088
|
89
|
-
wolfhece/apps/version.py,sha256=
|
89
|
+
wolfhece/apps/version.py,sha256=VLekoececzg7H4Z0hu97fb37nDVx-7ndJhfqA8urYqc,387
|
90
90
|
wolfhece/apps/wolf.py,sha256=j_CgvsL8rwixbVvVD5Z0s7m7cHZ86gmFLojKGuetMls,729
|
91
91
|
wolfhece/apps/wolf2D.py,sha256=4z_OPQ3IgaLtjexjMKX9ppvqEYyjFLt1hcfFABy3-jU,703
|
92
92
|
wolfhece/apps/wolf_logo.bmp,sha256=ruJ4MA51CpGO_AYUp_dB4SWKHelvhOvd7Q8NrVOjDJk,3126
|
@@ -114,7 +114,7 @@ wolfhece/coupling/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
|
|
114
114
|
wolfhece/coupling/hydrology_2d.py,sha256=QBIcgujfOX1xX3ARF2PQz6Uqwu3j6EaRw0QlGjG_H7k,53090
|
115
115
|
wolfhece/drowning_victims/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
116
116
|
wolfhece/drowning_victims/drowning_class.py,sha256=xWr_SoFqpodQ51x2CqCRbfIiL903kk2YqIRoU35xZy0,93482
|
117
|
-
wolfhece/drowning_victims/drowning_functions.py,sha256=
|
117
|
+
wolfhece/drowning_victims/drowning_functions.py,sha256=6VP9KBqZWVfEwUcvwOErxRDaDjVNjHAZso5U_Ox1mw8,47369
|
118
118
|
wolfhece/eva/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
119
119
|
wolfhece/eva/bootstrap.py,sha256=Ys4xTDIvG_QtxCKWLYzb3_XAZU441jGX7fHIbd9Mvr0,840
|
120
120
|
wolfhece/eva/hydrogramme_mono.py,sha256=uZFIgJJ-JogMFzt7D7OnyVaHvgxCQJPZz9W9FgnuthA,8138
|
@@ -314,8 +314,8 @@ wolfhece/ui/wolf_multiselection_collapsiblepane.py,sha256=8PlMYrb_8jI8h9F0_EagpM
|
|
314
314
|
wolfhece/ui/wolf_times_selection_comparison_models.py,sha256=ORy7fz4dcp691qKzaOZHrRLZ0uXNhL-LIHxmpDGL6BI,5007
|
315
315
|
wolfhece/wintab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
316
316
|
wolfhece/wintab/wintab.py,sha256=8A-JNONV6ujgsgG3lM5Uw-pVgglPATwKs86oBzzljoc,7179
|
317
|
-
wolfhece-2.2.
|
318
|
-
wolfhece-2.2.
|
319
|
-
wolfhece-2.2.
|
320
|
-
wolfhece-2.2.
|
321
|
-
wolfhece-2.2.
|
317
|
+
wolfhece-2.2.8.dist-info/METADATA,sha256=SZScGuzekEdz_ReMj94rQMIwrfNH3QMhDq0eEb-of9k,2744
|
318
|
+
wolfhece-2.2.8.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
|
319
|
+
wolfhece-2.2.8.dist-info/entry_points.txt,sha256=ZZ-aSfbpdcmo-wo84lRFzBN7LaSnD1XRGSaAKVX-Gpc,522
|
320
|
+
wolfhece-2.2.8.dist-info/top_level.txt,sha256=EfqZXMVCn7eILUzx9xsEu2oBbSo9liWPFWjIHik0iCI,9
|
321
|
+
wolfhece-2.2.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|