wolfhece 2.0.48__py3-none-any.whl → 2.0.50__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/PyDraw.py CHANGED
@@ -6943,7 +6943,11 @@ class WolfMapViewer(wx.Frame):
6943
6943
  if r == wx.ID_YES:
6944
6944
  self.active_vector.close_force()
6945
6945
 
6946
- self.active_vector.parentzone.plot(prep = True)
6946
+ # force to prepare OpenGL to accelerate the plot
6947
+ # Le test not(self in self.linkedList) permet de ne pas créer le liste OpenGL en cas de multi-viewers
6948
+ # car une liste OpenGL ne sera pas tracée sur les autres fenêtres
6949
+ # C'est donc plus lent mais plus sûr pour que l'affichage dynamique soit correct
6950
+ self.active_vector.parentzone.plot(prep = not(self in self.linkedList))
6947
6951
 
6948
6952
  elif self.action == 'modify vertices':
6949
6953
 
@@ -6951,7 +6955,10 @@ class WolfMapViewer(wx.Frame):
6951
6955
  self.end_action(_('End of vertices modification'))
6952
6956
 
6953
6957
  # force to prepare OpenGL to accelerate the plot
6954
- self.active_vector.parentzone.plot(prep = True)
6958
+ # Le test not(self in self.linkedList) permet de ne pas créer le liste OpenGL en cas de multi-viewers
6959
+ # car une liste OpenGL ne sera pas tracée sur les autres fenêtres
6960
+ # C'est donc plus lent mais plus sûr pour que l'affichage dynamique soit correct
6961
+ self.active_vector.parentzone.plot(prep = not(self in self.linkedList))
6955
6962
  self.active_zones.find_minmax(True)
6956
6963
 
6957
6964
  self.active_vertex = None
@@ -6960,7 +6967,10 @@ class WolfMapViewer(wx.Frame):
6960
6967
  self.end_action(_('End of vertices insertion'))
6961
6968
 
6962
6969
  # force to prepare OpenGL to accelerate the plot
6963
- self.active_vector.parentzone.plot(prep = True)
6970
+ # Le test not(self in self.linkedList) permet de ne pas créer le liste OpenGL en cas de multi-viewers
6971
+ # car une liste OpenGL ne sera pas tracée sur les autres fenêtres
6972
+ # C'est donc plus lent mais plus sûr pour que l'affichage dynamique soit correct
6973
+ self.active_vector.parentzone.plot(prep = not(self in self.linkedList))
6964
6974
  self.active_zones.find_minmax(True)
6965
6975
 
6966
6976
  self.active_vertex = None
@@ -6973,7 +6983,10 @@ class WolfMapViewer(wx.Frame):
6973
6983
  self.active_zones.find_minmax(True)
6974
6984
 
6975
6985
  # force to prepare OpenGL to accelerate the plot
6976
- self.active_vector.parentzone.plot(prep = True)
6986
+ # Le test not(self in self.linkedList) permet de ne pas créer le liste OpenGL en cas de multi-viewers
6987
+ # car une liste OpenGL ne sera pas tracée sur les autres fenêtres
6988
+ # C'est donc plus lent mais plus sûr pour que l'affichage dynamique soit correct
6989
+ self.active_vector.parentzone.plot(prep = not(self in self.linkedList))
6977
6990
 
6978
6991
  self.active_vertex = None
6979
6992
 
wolfhece/PyGui.py CHANGED
@@ -543,7 +543,7 @@ class Wolf2DModel(GenMapManager):
543
543
  if dir != '':
544
544
  # Either a directory or a file "/_/_/_/dir/simul" for example.
545
545
 
546
- assert exists(dir) or dirname(dir), f"'{dir}' does nto exists"
546
+ assert exists(dir) or dirname(dir), f"'{dir}' does not exists"
547
547
 
548
548
  if dir=='':
549
549
  if self.wx_exists:
wolfhece/PyPalette.py CHANGED
@@ -136,9 +136,9 @@ class wolfpalette(wx.Frame,LinearSegmentedColormap):
136
136
  dlg.Destroy()
137
137
 
138
138
  if step==0:
139
- self.values = np.linspace(self.values[0], self.values[-1], num=self.nb, endpoint=True)
139
+ self.values = np.linspace(self.values[0], self.values[-1], num=self.nb, endpoint=True)[0:self.nb]
140
140
  else:
141
- self.values = np.arange(self.values[0], self.values[0]+(self.nb)*step, step)
141
+ self.values = np.arange(self.values[0], self.values[0]+(self.nb)*step, step)[0:self.nb]
142
142
 
143
143
  self.fill_segmentdata()
144
144
 
@@ -130,6 +130,9 @@ class Triangulation(Element_To_Draw):
130
130
  buffer = gltf.buffers[bufferView.buffer]
131
131
  data = gltf.get_data_from_buffer_uri(buffer.uri)
132
132
 
133
+ logging.info(_('Importing GLTF file : {}').format(fn))
134
+ logging.info(_('Number of vertices : {}').format(accessor.count))
135
+
133
136
  # pull each vertex from the binary buffer and convert it into a tuple of python floats
134
137
  points = np.zeros([accessor.count, 3], order='F', dtype=np.float64)
135
138
  for i in range(accessor.count):
@@ -139,6 +142,9 @@ class Triangulation(Element_To_Draw):
139
142
 
140
143
  points[i, :] = np.asarray([v[0], -v[2], v[1]])
141
144
 
145
+ if np.mod(i,100000)==0:
146
+ logging.info(_('Reading vertex {}').format(i))
147
+
142
148
  accessor = gltf.accessors[primitive.indices]
143
149
 
144
150
  bufferView = gltf.bufferViews[accessor.bufferView]
@@ -153,6 +159,7 @@ class Triangulation(Element_To_Draw):
153
159
  size=12
154
160
  format='<LLL'
155
161
 
162
+ logging.info(_('Number of triangles : {}').format(int(accessor.count/3)))
156
163
  for i in range(int(accessor.count/3)):
157
164
 
158
165
  index = bufferView.byteOffset + accessor.byteOffset + i*size # the location in the buffer of this vertex
@@ -160,6 +167,9 @@ class Triangulation(Element_To_Draw):
160
167
  v = struct.unpack(format, d) # convert from base64 to three floats
161
168
  triangles.append(list(v))
162
169
 
170
+ if np.mod(i,100000)==0:
171
+ logging.info(_('Reading triangle {}').format(i))
172
+
163
173
  # On souhaite obtenir une triangulation du type :
164
174
  # - liste de coordonnées des sommets des triangles
165
175
  # - par triangle, liste de 3 indices, un pour chaque sommet
@@ -167,7 +177,9 @@ class Triangulation(Element_To_Draw):
167
177
  # Si le fichier GLTF vient de Blender, il y aura des informations de normales ...
168
178
  # Il est donc préférable de filtrer les points pour ne garder que des valeurs uniques
169
179
  # On ne souhaite pas gérer le GLTF dans toute sa généralité mais uniquement la triangulation de base
180
+ logging.info(_('Sorting information ...'))
170
181
  xyz_u,indices = np.unique(np.array(points),return_inverse=True,axis=0)
182
+ logging.info(_('Creating triangles ...'))
171
183
  triangles = [[indices[curtri[0]],indices[curtri[1]],indices[curtri[2]]] for curtri in list(triangles)]
172
184
 
173
185
  self.pts = xyz_u
@@ -1543,7 +1555,7 @@ class vector:
1543
1555
  return
1544
1556
 
1545
1557
  if self.myprop.imagevisible:
1546
-
1558
+
1547
1559
  if self.myprop.textureimage is None:
1548
1560
  self.myprop.load_unload_image()
1549
1561
 
wolfhece/apps/version.py CHANGED
@@ -5,7 +5,7 @@ class WolfVersion():
5
5
 
6
6
  self.major = 2
7
7
  self.minor = 0
8
- self.patch = 48
8
+ self.patch = 50
9
9
 
10
10
  def __str__(self):
11
11
 
wolfhece/irm_qdf.py CHANGED
@@ -167,18 +167,19 @@ class Qdf_IRM():
167
167
 
168
168
  Exemple d'utilisation :
169
169
 
170
- #Pour importer les fichiers depuis le site web de l'IRM meteo.be
171
- import wolfhece.irm_qdf as qdf
170
+ Pour importer les fichiers depuis le site web de l'IRM meteo.be
171
+ from wolfhece.irm_qdf import Qdf_IRM
172
172
  qdf = Qdf_IRM(force_import=True)
173
173
 
174
174
  Il est possible de spécifier le répertoire de stockage des fichiers Excel
175
175
  Par défaut, il s'agit d'un sous-répertoire 'irm' du répertoire courant qui sera créé s'il n'exsiste pas
176
176
 
177
- Une fois importé, il est possible de charger une commune sur base de l'INS ou de son nom
177
+ Une fois importé/téléchargé, il est possible de charger une commune sur base de l'INS ou de son nom
178
178
 
179
- myqdf = qdf.Qdf_IRM(name='Jalhay')
179
+ myqdf = Qdf_IRM(name='Jalhay')
180
180
 
181
181
  Les données sont ensuite disponibles dans les propriétés, qui sont des "dataframes" pandas (https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html) :
182
+
182
183
  - qdf : les relation Quantité/durée/fréquence
183
184
  - standarddev : l'écart-type de l'erreur
184
185
  - confintlow : la valeur inférieure de l'intervalle de confiance (-2*stddev)
wolfhece/wolf_array.py CHANGED
@@ -2015,7 +2015,7 @@ class Ops_Array(wx.Frame):
2015
2015
  if self.mapviewer is not None:
2016
2016
  if self.mapviewer.linked:
2017
2017
  if self.mapviewer.link_shareopsvect:
2018
- if self.myzones.parent in self.mapviewer.linkedList:
2018
+ if self.myzones.get_mapviewer() in self.mapviewer.linkedList:
2019
2019
  self.myzones.showstructure()
2020
2020
  return
2021
2021
 
@@ -2466,6 +2466,13 @@ class SelectionData():
2466
2466
  logging.error(_('Selection {} does not exist').format(which))
2467
2467
  return ''
2468
2468
 
2469
+ if len(curlist) == 0:
2470
+ return ''
2471
+
2472
+ if curlist == 'all':
2473
+ txt += 'all\n'
2474
+ return txt
2475
+
2469
2476
  for cur in curlist:
2470
2477
  txt += str(cur[0]) + '\t' + str(cur[1]) + '\n'
2471
2478
 
@@ -2495,6 +2502,9 @@ class SelectionData():
2495
2502
  logging.error(_('Selection {} does not exist').format(which))
2496
2503
  return ''
2497
2504
 
2505
+ if len(curlist) == 0:
2506
+ return ''
2507
+
2498
2508
  txt += '# For boundary conditions :\n'
2499
2509
  for cur in curlist:
2500
2510
  i,j = self.parent.get_ij_from_xy(cur[0], cur[1], aswolf=True)
@@ -4541,25 +4551,37 @@ class WolfArray(Element_To_Draw, header_wolf):
4541
4551
 
4542
4552
  fromarray: WolfArray
4543
4553
 
4554
+ # Récupération des bornes de la matrice source dans la matrice de destination
4544
4555
  i1, j1 = self.get_ij_from_xy(fromarray.origx, fromarray.origy)
4545
4556
  i2, j2 = self.get_ij_from_xy(fromarray.origx + fromarray.nbx * fromarray.dx,
4546
4557
  fromarray.origy + fromarray.nby * fromarray.dy)
4547
4558
 
4559
+ # Limitation des bornes à la matrice de destination
4548
4560
  i1 = max(0, i1)
4549
4561
  j1 = max(0, j1)
4550
4562
  i2 = min(self.nbx, i2)
4551
4563
  j2 = min(self.nby, j2)
4552
4564
 
4565
+ # Conversion des bornes utiles en coordonnées
4553
4566
  x1, y1 = self.get_xy_from_ij(i1, j1)
4554
4567
  x2, y2 = self.get_xy_from_ij(i2, j2)
4555
4568
 
4556
- i3, j3 = self.get_ij_from_xy(x1, y1)
4557
- i4, j4 = self.get_ij_from_xy(x2, y2)
4569
+ # Récupération des bornes utiles dans la matrice source
4570
+ i3, j3 = fromarray.get_ij_from_xy(x1, y1)
4571
+ i4, j4 = fromarray.get_ij_from_xy(x2, y2)
4558
4572
 
4573
+ # Sélection des valeurs non masquées
4574
+ # Attention : le résultat est en indices relatifs à [i3,j3] --> demande une conversion en indices absolus pour retrouver les valeurs dans la matrice complète
4559
4575
  usefulij = np.where(np.logical_not(fromarray.array.mask[i3:i4, j3:j4]))
4560
- usefulij[0][:] += i1
4561
- usefulij[1][:] += j1
4562
- self.array.data[usefulij] = fromarray.array.data[usefulij]
4576
+
4577
+ i5, j5 = self.get_ij_from_xy(x1, y1)
4578
+
4579
+ # Décalage des indices pour la matrice de destination
4580
+ usefulij_dest = (usefulij[0] + i5, usefulij[1] + j5)
4581
+ usefulij[0][:] += i3
4582
+ usefulij[1][:] += j3
4583
+
4584
+ self.array.data[usefulij_dest] = fromarray.array.data[usefulij]
4563
4585
 
4564
4586
  self.mask_data(self.nullvalue)
4565
4587
  self.reset_plot()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wolfhece
3
- Version: 2.0.48
3
+ Version: 2.0.50
4
4
  Author-email: Pierre Archambeau <pierre.archambeau@uliege.be>
5
5
  License: AGPL-v3 License
6
6
  Project-URL: Homepage, https://uee.uliege.be/hece
@@ -6,16 +6,16 @@ wolfhece/ManageParams.py,sha256=Wgt5Zh7QBtyiwTAltPHunSLqt4XuVuRH76GTUrXabS4,219
6
6
  wolfhece/Model1D.py,sha256=-cMz-ePSYzrKVVDidiDOz6cojEZ3y6u9gIb7RPwT6Y8,476593
7
7
  wolfhece/PyConfig.py,sha256=oGSL1WsLM9uinlNP4zGBLK3uHPmBfduUi7R-VtWuRFA,8034
8
8
  wolfhece/PyCrosssections.py,sha256=f4dNYRUGZKePruaaBiTcn5vlrw8TFTj9XwTDrdiF_uU,112450
9
- wolfhece/PyDraw.py,sha256=Zz2pcBUGA7s3FURP-4CPdoBqENtSrf-RLH1o-xZ6qrA,343578
10
- wolfhece/PyGui.py,sha256=Dv8i0aMXXGUcTVuav-jedqH4IHVMFnUC_ndeZydETRg,59795
9
+ wolfhece/PyDraw.py,sha256=nUHEMpTG0zJvBJYOnreTvAISeP7cLsx14Qyrv-y32OY,344956
10
+ wolfhece/PyGui.py,sha256=LZtmQuEa0p-67iYyvLHJRK8uBs1zKmA3UqDzejWogy8,59795
11
11
  wolfhece/PyGuiHydrology.py,sha256=wKhR-KthPRyzJ887NmsozmUpm2CIQIwO3IbYORCYjrE,7290
12
12
  wolfhece/PyHydrographs.py,sha256=GKK8U0byI45H9O_e4LAOOi7Aw0Tg7Q0Lx322stPg5IQ,3453
13
- wolfhece/PyPalette.py,sha256=Yjivc_Z3i6zpyTBM3U1Gd00bOqqM4D3CVkjs-oW3K3Q,22230
13
+ wolfhece/PyPalette.py,sha256=SYKYx_vxF_FVuceLhcIqFQsivGD6EoO_Xu-EGN9Ivko,22252
14
14
  wolfhece/PyParams.py,sha256=-0cax_Db6kFTe46BAgT24Ga2Xyp2Dm3gpuI-5uUSMxw,84758
15
15
  wolfhece/PyPictures.py,sha256=-mJB0JL2YYiEK3D7_ssDkvYiMWK4ve9kXhozQXNeSx8,2216
16
16
  wolfhece/PyTranslate.py,sha256=4appkmNeHHZLFmUtaA_k5_5QL-5ymxnbVN4R2OblmtE,622
17
17
  wolfhece/PyVertex.py,sha256=OFo8VFxTSViWSTzv2paHeJ9O5BkFUyamXrRPFamlWoU,39630
18
- wolfhece/PyVertexvectors.py,sha256=T3k8gIZA5Z89hfgJaV90sNeUbc31Shw3ZiOlmcTwl4g,217423
18
+ wolfhece/PyVertexvectors.py,sha256=fnUsCYZHL9WPweW_fBkq16MiyxWb6Kklwupwd5Y25qs,217974
19
19
  wolfhece/PyWMS.py,sha256=t6jVZpTxTNSLJxABk8A79cEMWTKoRM_S_SXRipsHLzw,4493
20
20
  wolfhece/RatingCurve.py,sha256=YSQvSvdMHE6hSlWVBF5Oe0-Fh3waNMpOdmcymaCCTis,21706
21
21
  wolfhece/RatingCurveData.py,sha256=5UvnIm89BwqjnEbLCcY3CA8WoFd_xHJbooNy62fX5iY,57660
@@ -32,7 +32,7 @@ wolfhece/friction_law.py,sha256=vMr6BgVVV2JqhPDjBtZBtosDIZcbykZxw-fKxiJzd4M,5200
32
32
  wolfhece/gpuview.py,sha256=Lq17jV2ytQShUuvi1UE_A1-6Q0IojsKxrKhkYHRf_8w,23437
33
33
  wolfhece/import_ascfiles.py,sha256=jg4urcLdSgFS1Knvh7AVGJqM44qc_uYDNrR568tMh-A,4167
34
34
  wolfhece/ins.py,sha256=0aU1mo4tYbw64Gwzrqbh-NCTH1tukmk0mpPHjRPHZXU,12661
35
- wolfhece/irm_qdf.py,sha256=0nOU_usEZuWMwYOPV9qtZoWsQTn2x2DxOuk7VlYMkbo,15419
35
+ wolfhece/irm_qdf.py,sha256=749SlAXiN1oXp5tfBJoPNJWxydQlY55K0qvIM5YexlM,15436
36
36
  wolfhece/ismember.py,sha256=fkLvaH9fhx-p0QrlEzqa6ySO-ios3ysjAgXVXzLgSpY,2482
37
37
  wolfhece/multiprojects.py,sha256=AMwEQZqo1Twh6tSPP-4L29-Fa8cI9d6dWce7l88awws,14675
38
38
  wolfhece/picc.py,sha256=KKPNk1BEe7QBzo2icIsdsxUopJ1LXYTomfdfeG2gCeA,7419
@@ -48,7 +48,7 @@ wolfhece/rain_SPWMI.py,sha256=YqsF-yFro3y_a6MfVRFfr-Rxi7NR1gl_i8VX7scmzes,13548
48
48
  wolfhece/test_Results2DGPU.py,sha256=NOJ_hFXrcLSQXS1dtsqXRQltqIZtDSHMz_EgAJ2_FHU,307
49
49
  wolfhece/textpillow.py,sha256=zEfLrKhfCDyMaVuQOUjHqz6MGKeQ4aewMxOsWi5-wKI,13832
50
50
  wolfhece/tools_mpl.py,sha256=q8Yc4aukPPiUcEzREvZRM_em67XqXaahdoaNt0DETfE,266
51
- wolfhece/wolf_array.py,sha256=yklT2lQaBBgnPCh-e3qFBSpKcOSsSPwkG-ECFCLBzXw,288267
51
+ wolfhece/wolf_array.py,sha256=E6u0d6kABsegIZxPUZjtWS88lOrVc2d-lyW0uJgj6qo,289157
52
52
  wolfhece/wolf_hist.py,sha256=JpRXvzJLUP-RkSkvth3DQWglgTMFI2ZEUDb4RYOfeeI,3284
53
53
  wolfhece/wolf_texture.py,sha256=llQ7aV8scWXIkhpri9XjaPejzoBJsGfsln2ZnlRbFkU,16270
54
54
  wolfhece/wolf_tiles.py,sha256=F2JsJHdAP8fIffNJdG_J26bonCIRtIwMmxKFqdSCRDA,10088
@@ -66,7 +66,7 @@ wolfhece/apps/check_install.py,sha256=jrKR-njqnpIh6ZJqvP6KbDUPVCfwTNQj4glQhcyzs9
66
66
  wolfhece/apps/curvedigitizer.py,sha256=avWERHuVxPnJBOD_ibczwW_XG4vAenqWS8W1zjhBox8,4898
67
67
  wolfhece/apps/isocurrent.py,sha256=4XnNWPa8mYUK7V4zdDRFrHFIXNG2AN2og3TqWKKcqjY,3811
68
68
  wolfhece/apps/splashscreen.py,sha256=m9hMTqzhSUcTudApyNNjoAK9e2u5vgEkJVV79xmfM1s,2118
69
- wolfhece/apps/version.py,sha256=zx6pHDczskz0pAlVKXX5izabGKi7jpL-tk87LMvinSA,388
69
+ wolfhece/apps/version.py,sha256=UgOyKKZeqMHM9SHuLgbqUwonY2i_7DM-vnaX7DYSfFE,388
70
70
  wolfhece/apps/wolf.py,sha256=gqfm-ZaUJqNsfCzmdtemSeqLw-GVdSVix-evg5WArJI,293
71
71
  wolfhece/apps/wolf2D.py,sha256=gWD9ee2-1pw_nUxjgRaJMuSe4kUT-RWhOeoTt_Lh1mM,267
72
72
  wolfhece/apps/wolf_logo.bmp,sha256=ruJ4MA51CpGO_AYUp_dB4SWKHelvhOvd7Q8NrVOjDJk,3126
@@ -256,8 +256,8 @@ wolfhece/sounds/sonsw2.wav,sha256=pFLVt6By0_EPQNt_3KfEZ9a1uSuYTgQSX1I_Zurv9Rc,11
256
256
  wolfhece/ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
257
257
  wolfhece/ui/wolf_multiselection_collapsiblepane.py,sha256=yGbU_JsF56jsmms0gh7mxa7tbNQ_SxqhpAZxhm-mTy4,14860
258
258
  wolfhece/ui/wolf_times_selection_comparison_models.py,sha256=wCxGRnE3kzEkWlWA6-3X8ADOFux_B0a5QWJ2GnXTgJw,4709
259
- wolfhece-2.0.48.dist-info/METADATA,sha256=lKkb-xiticGSdZUyiECndzvwo3_x_X9KoVVfGEFSbXQ,2233
260
- wolfhece-2.0.48.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
261
- wolfhece-2.0.48.dist-info/entry_points.txt,sha256=AIu1KMswrdsqNq_2jPtrRIU4tLjuTnj2dCY-pxIlshw,276
262
- wolfhece-2.0.48.dist-info/top_level.txt,sha256=EfqZXMVCn7eILUzx9xsEu2oBbSo9liWPFWjIHik0iCI,9
263
- wolfhece-2.0.48.dist-info/RECORD,,
259
+ wolfhece-2.0.50.dist-info/METADATA,sha256=qy49InLZbsZEYnSKj_5fYK31CxxJZHDDHlA_1Y3Y16c,2233
260
+ wolfhece-2.0.50.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
261
+ wolfhece-2.0.50.dist-info/entry_points.txt,sha256=AIu1KMswrdsqNq_2jPtrRIU4tLjuTnj2dCY-pxIlshw,276
262
+ wolfhece-2.0.50.dist-info/top_level.txt,sha256=EfqZXMVCn7eILUzx9xsEu2oBbSo9liWPFWjIHik0iCI,9
263
+ wolfhece-2.0.50.dist-info/RECORD,,