wolfhece 2.0.45__py3-none-any.whl → 2.0.47__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.
@@ -317,27 +317,30 @@ class Triangulation(Element_To_Draw):
317
317
  def plot(self, sx=None, sy=None, xmin=None, ymin=None, xmax=None, ymax=None, size=None ):
318
318
 
319
319
  if self.id_list == -99999:
320
- self.id_list = glGenLists(1)
320
+ try:
321
+ self.id_list = glGenLists(1)
321
322
 
322
- glNewList(self.id_list, GL_COMPILE)
323
+ glNewList(self.id_list, GL_COMPILE)
323
324
 
324
- glPolygonMode(GL_FRONT_AND_BACK,GL_LINE)
325
+ glPolygonMode(GL_FRONT_AND_BACK,GL_LINE)
325
326
 
326
- for curtri in self.tri:
327
- glBegin(GL_LINE_STRIP)
327
+ for curtri in self.tri:
328
+ glBegin(GL_LINE_STRIP)
328
329
 
329
- glColor3ub(int(0),int(0),int(0))
330
+ glColor3ub(int(0),int(0),int(0))
330
331
 
331
- glVertex2d(self.pts[curtri[0]][0], self.pts[curtri[0]][1])
332
- glVertex2d(self.pts[curtri[1]][0], self.pts[curtri[1]][1])
333
- glVertex2d(self.pts[curtri[2]][0], self.pts[curtri[2]][1])
334
- glVertex2d(self.pts[curtri[0]][0], self.pts[curtri[0]][1])
332
+ glVertex2d(self.pts[curtri[0]][0], self.pts[curtri[0]][1])
333
+ glVertex2d(self.pts[curtri[1]][0], self.pts[curtri[1]][1])
334
+ glVertex2d(self.pts[curtri[2]][0], self.pts[curtri[2]][1])
335
+ glVertex2d(self.pts[curtri[0]][0], self.pts[curtri[0]][1])
335
336
 
336
- glEnd()
337
+ glEnd()
337
338
 
338
- glPolygonMode(GL_FRONT_AND_BACK,GL_LINE)
339
+ glPolygonMode(GL_FRONT_AND_BACK,GL_LINE)
339
340
 
340
- glEndList()
341
+ glEndList()
342
+ except:
343
+ logging.warning('Problem with OpenGL plot - Triangulation.plot')
341
344
  else:
342
345
  glCallList(self.id_list)
343
346
 
@@ -1539,9 +1542,15 @@ class vector:
1539
1542
  logging.warning(_('No mapviewer available for image plot'))
1540
1543
  return
1541
1544
 
1542
- if self.myprop.imagevisible and self.myprop.textureimage is not None:
1545
+ if self.myprop.imagevisible:
1546
+
1547
+ if self.myprop.textureimage is None:
1548
+ self.myprop.load_unload_image()
1543
1549
 
1544
- self.myprop.textureimage.paint()
1550
+ if self.myprop.textureimage is not None:
1551
+ self.myprop.textureimage.paint()
1552
+ else:
1553
+ logging.warning(_('No image texture available for plot'))
1545
1554
 
1546
1555
  def _get_textfont(self):
1547
1556
  """ Retunr a 'Text_Infos' instance for the legend """
@@ -2434,18 +2443,21 @@ class zone:
2434
2443
  :param prep: True = préparation des listes OpenGL ; False = affichage direct
2435
2444
  """
2436
2445
  if prep:
2437
- if self.idgllist==-99999:
2438
- self.idgllist = glGenLists(1)
2446
+ try:
2447
+ if self.idgllist==-99999:
2448
+ self.idgllist = glGenLists(1)
2439
2449
 
2440
- self.has_legend = False
2441
- self.has_image = False
2450
+ self.has_legend = False
2451
+ self.has_image = False
2442
2452
 
2443
- glNewList(self.idgllist,GL_COMPILE)
2444
- for curvect in self.myvectors:
2445
- curvect.plot()
2446
- self.has_legend |= curvect.myprop.legendvisible
2447
- self.has_image |= curvect.myprop.imagevisible
2448
- glEndList()
2453
+ glNewList(self.idgllist,GL_COMPILE)
2454
+ for curvect in self.myvectors:
2455
+ curvect.plot()
2456
+ self.has_legend |= curvect.myprop.legendvisible
2457
+ self.has_image |= curvect.myprop.imagevisible
2458
+ glEndList()
2459
+ except:
2460
+ logging.error(_('OpenGL error in zone.plot'))
2449
2461
  else:
2450
2462
  if self.idgllist!=-99999:
2451
2463
  glCallList(self.idgllist)
@@ -3794,7 +3806,7 @@ class Zones(wx.Frame, Element_To_Draw):
3794
3806
  if find_minmax:
3795
3807
  self.find_minmax(True)
3796
3808
 
3797
- if plotted and self.has_OGLContext:
3809
+ if plotted and self.has_OGLContext:
3798
3810
  self.prep_listogl()
3799
3811
 
3800
3812
  @property
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 = 45
8
+ self.patch = 47
9
9
 
10
10
  def __str__(self):
11
11
 
@@ -66,11 +66,11 @@ class Comparison:
66
66
  def compare_now(self):
67
67
 
68
68
  # Check and run all the functions to use
69
- if(int(self.dictToCompar['hydro subbasin']['value']) == 1):
69
+ if(int(self.dictToCompar['hydro subbasin'][key_Param.VALUE]) == 1):
70
70
  self.hydro_subbasin()
71
- if(int(self.dictToCompar['hydro junction']['value']) == 1):
71
+ if(int(self.dictToCompar['hydro junction'][key_Param.VALUE]) == 1):
72
72
  self.hydro_junction()
73
- if(int(self.dictToCompar['hydro final']['value']) == 1):
73
+ if(int(self.dictToCompar['hydro final'][key_Param.VALUE]) == 1):
74
74
  self.hydro_final()
75
75
 
76
76
 
@@ -955,8 +955,10 @@ class Comparison:
955
955
  beginDateRB = []
956
956
  endDateRB = []
957
957
  for ii in range(nbCatchment):
958
- beginDateRB.append(beginDate[ii] - timeDelay[ii]) # A ameliorer!!!
959
- endDateRB.append(endDate[ii] - timeDelay[ii])
958
+ # beginDateRB.append(beginDate[ii] - timeDelay[ii]) # A ameliorer!!!
959
+ # endDateRB.append(endDate[ii] - timeDelay[ii])
960
+ beginDateRB.append(beginDate[ii]) # A ameliorer!!!
961
+ endDateRB.append(endDate[ii])
960
962
 
961
963
 
962
964
  if("Station Name" in plotDict[RBNames[id]]):
@@ -378,35 +378,35 @@ class Optimisation(wx.Frame):
378
378
  print("ERROR : in path of launcherDir")
379
379
  newCase.read_param(launcherDir, copyDefault=False, callback=self.update_parameters_launcher)
380
380
  # FIXME TO CHANGE when seperation with the GUI
381
- # if self.wx_exists:
382
- # newId = wx.Window.NewControlId()
383
- # iMenu = self.MenuBar.FindMenu('Param files')
384
- # paramMenu = self.MenuBar.Menus[iMenu][0]
385
- # curName = 'Case '+str(i+1)
386
- # iItem = self.MenuBar.FindMenuItem('Param files', curName)
387
- # if(iItem==wx.NOT_FOUND):
388
- # caseMenu = wx.Menu()
389
- # paramCaseFile = caseMenu.Append(wx.ID_ANY, 'launcher.param')
390
- # self.Bind(wx.EVT_MENU, newCase.show_launcherParam, paramCaseFile)
391
- # guiHydroCase = caseMenu.Append(wx.ID_ANY, 'GUI Hydro')
392
- # refDir = newCase.launcherParam.get_param("Calculs","Répertoire simulation de référence")
393
- # isOk, refDir = check_path(refDir, prefix=launcherDir, applyCWD=True)
394
- # if isOk<0:
395
- # print("ERROR : in path of launcherDir")
396
- # newCase.mydro = HydrologyModel(dir=refDir)
397
- # newCase.mydro.Hide()
398
- # self.Bind(wx.EVT_MENU, newCase.show_mydro, guiHydroCase)
399
- # curCase = paramMenu.Append(newId, curName, caseMenu)
400
- # else:
401
- # print("WARNING : this scenario was not implemented yet. This might induce an error!")
402
- # # iItem =
403
- # curCase = paramMenu.Replace(iItem)
404
- # else:
405
- # refDir = newCase.launcherParam.get_param("Calculs","Répertoire simulation de référence")
406
- # isOk, refDir = check_path(refDir, prefix=launcherDir, applyCWD=True)
407
- # newCase.mydro = HydrologyModel(dir=refDir)
408
- # self.Bind(wx.EVT_MENU, newCase.show_launcherParam, curCase)
409
- # newCase.idMenuItem = newId
381
+ if self.wx_exists:
382
+ newId = wx.Window.NewControlId()
383
+ iMenu = self.MenuBar.FindMenu('Param files')
384
+ paramMenu = self.MenuBar.Menus[iMenu][0]
385
+ curName = 'Case '+str(i+1)
386
+ iItem = self.MenuBar.FindMenuItem('Param files', curName)
387
+ if(iItem==wx.NOT_FOUND):
388
+ caseMenu = wx.Menu()
389
+ paramCaseFile = caseMenu.Append(wx.ID_ANY, 'launcher.param')
390
+ self.Bind(wx.EVT_MENU, newCase.show_launcherParam, paramCaseFile)
391
+ guiHydroCase = caseMenu.Append(wx.ID_ANY, 'GUI Hydro')
392
+ refDir = newCase.launcherParam.get_param("Calculs","Répertoire simulation de référence")
393
+ isOk, refDir = check_path(refDir, prefix=launcherDir, applyCWD=True)
394
+ if isOk<0:
395
+ print("ERROR : in path of launcherDir")
396
+ newCase.mydro = HydrologyModel(dir=refDir)
397
+ newCase.mydro.Hide()
398
+ self.Bind(wx.EVT_MENU, newCase.show_mydro, guiHydroCase)
399
+ curCase = paramMenu.Append(newId, curName, caseMenu)
400
+ else:
401
+ print("WARNING : this scenario was not implemented yet. This might induce an error!")
402
+ # iItem =
403
+ curCase = paramMenu.Replace(iItem)
404
+ else:
405
+ refDir = newCase.launcherParam.get_param("Calculs","Répertoire simulation de référence")
406
+ isOk, refDir = check_path(refDir, prefix=launcherDir, applyCWD=True)
407
+ newCase.mydro = HydrologyModel(dir=refDir)
408
+ self.Bind(wx.EVT_MENU, newCase.show_launcherParam, curCase)
409
+ newCase.idMenuItem = newId
410
410
  self.myCases.append(newCase)
411
411
 
412
412
 
@@ -387,10 +387,10 @@ class RetentionBasin():
387
387
  self.inlets += curObj.get_outFlow(typeOutFlow="Net", whichOutFlow=nameOutFlow, lag=deltaTr)
388
388
  self.inletsRaw += curObj.get_outFlow(typeOutFlow="Raw", whichOutFlow=nameOutFlow, lag=deltaTr)
389
389
  elif(givenInlet != []):
390
- if(len(givenInlet)!=len(self.time)-1):
390
+ if(len(givenInlet)!=len(self.time)):
391
391
  print("ERROR: the dimension of the time array and the given inlet are not the same!")
392
392
  print("Length optained = ", len(givenInlet))
393
- print("Length expected = ", len(self.time)-1)
393
+ print("Length expected = ", len(self.time))
394
394
  sys.exit()
395
395
  self.inlets = givenInlet
396
396
  self.inletsRaw = givenInlet
@@ -468,10 +468,10 @@ class RetentionBasin():
468
468
 
469
469
  elif(givenDirectFluxIn != []):
470
470
  # FIXME The following line to potentially change !!!
471
- if(len(givenDirectFluxIn)!=len(self.time)-1):
471
+ if(len(givenDirectFluxIn)!=len(self.time)):
472
472
  print("ERROR: the dimension of the time array and the given inlet are not the same!")
473
473
  print("Length optained = ", len(givenDirectFluxIn))
474
- print("Length expected = ", len(self.time)-1)
474
+ print("Length expected = ", len(self.time))
475
475
  sys.exit()
476
476
  self.directFluxInRB = givenDirectFluxIn
477
477
  self.directFluxInRB_Raw = givenDirectFluxIn
@@ -1,10 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wolfhece
3
- Version: 2.0.45
4
- Author-email: Stéphane Champailler <stephane.champailler@uliege.be>, Pierre Archambeau <pierre.archambeau@uliege.be>
3
+ Version: 2.0.47
4
+ Author-email: Pierre Archambeau <pierre.archambeau@uliege.be>
5
+ License: AGPL-v3 License
5
6
  Project-URL: Homepage, https://uee.uliege.be/hece
6
7
  Project-URL: Issues, https://uee.uliege.be/hece
7
- Classifier: Programming Language :: Python :: 3.9
8
+ Classifier: Programming Language :: Python :: 3.10
8
9
  Classifier: Operating System :: Microsoft :: Windows :: Windows 10
9
10
  Classifier: Operating System :: Microsoft :: Windows :: Windows 11
10
11
  Classifier: Topic :: Scientific/Engineering :: Physics
@@ -15,7 +15,7 @@ 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=D3de7UejUy4GB2cnML06Lsijcr5_gvh5TqVETP4cus4,216885
18
+ wolfhece/PyVertexvectors.py,sha256=T3k8gIZA5Z89hfgJaV90sNeUbc31Shw3ZiOlmcTwl4g,217423
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
@@ -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=HLi1f5dAiipcutPIZt-xMDmEV3Wly3tlHP0xTFqjT94,388
69
+ wolfhece/apps/version.py,sha256=GU02tpPFaQBxJ6d59qXIRFZRbAPKUWA_xhCGwFLwzi0,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
@@ -91,13 +91,13 @@ wolfhece/fonts/sanserif.ttf,sha256=Nvv5eMgTl5-bWgV37B7E1-vZpAZPNJwjtJSzMNDrl9A,4
91
91
  wolfhece/ftp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
92
92
  wolfhece/ftp/downloader.py,sha256=NANzxSzdcp25dFMYin5QA9UnFexNe6-W2AqqTzUE4f4,5223
93
93
  wolfhece/hydrology/Catchment.py,sha256=1ZrAPyXhy23ENbhSf9e2-D-Y-jNkof--L6R6B-BgHBo,135021
94
- wolfhece/hydrology/Comparison.py,sha256=TxWTRmJ7qDfdCZ9ciPpANqTYcaoRVezkpByon8_IgiU,82064
94
+ wolfhece/hydrology/Comparison.py,sha256=vO9ogoZA8qzG57pg1AdHNL9HWgCCY8-5wqPyCgj1ucg,82209
95
95
  wolfhece/hydrology/Dumping.py,sha256=GKYvkKgCfJQT1XEF1ceh7evdhlpZRPcuf6VlBdH-TaM,2085
96
- wolfhece/hydrology/Optimisation.py,sha256=RKbHCzzFcLsccIsnHCA7M6i4Ok0TiIYJrMPBIih3Rlk,138794
96
+ wolfhece/hydrology/Optimisation.py,sha256=kpfR-krMRzANU96Mn4H2kroIuEmMWns8quEnLSFGB8E,138736
97
97
  wolfhece/hydrology/Outlet.py,sha256=fpetH2ZKnTKIBNuVclxrncc5OAxWUGI5_ed9gXh6fD4,10201
98
98
  wolfhece/hydrology/PostProcessHydrology.py,sha256=SiW5FIf8FeQL9ItWG8ODt612k5m59aogSLgpsXinr8I,6944
99
99
  wolfhece/hydrology/PyWatershed.py,sha256=K6yz8UquJi51v2nGqWmeo8qs82-QHoa2LYaxwoUBTxM,73914
100
- wolfhece/hydrology/RetentionBasin.py,sha256=LbIvJxIyRG_r2YLJiBZWtQBWvoUnCLgzh5oCrWz37P4,71513
100
+ wolfhece/hydrology/RetentionBasin.py,sha256=UZiHvygNEMfNdaK49CX3y8jzqwkThwwniS9ob1BTECs,71505
101
101
  wolfhece/hydrology/SubBasin.py,sha256=ZXEJwUDAsa6nGtdPVuzjEH3CCZu6V4fZhRCujWr1ACY,169749
102
102
  wolfhece/hydrology/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
103
103
  wolfhece/hydrology/constant.py,sha256=nRn4IuQ1FZakQtS6z9IpVHeudMfU_7KQ66LCxY6NX4k,1227
@@ -158,8 +158,6 @@ wolfhece/lazviewer/viewer/viewer.exe,sha256=pF5nwE8vMWlEzkk-SOekae9zpOsPhTWhZbqa
158
158
  wolfhece/lazviewer/viewer/viewer.py,sha256=8_MQCaQOS0Z_oRPiGoRy1lq-aCirReX3hWEBjQID0ig,24665
159
159
  wolfhece/libs/MSVCP140.dll,sha256=2GrBWBI6JFuSdZLIDMAg_qKcjErdwURGbEYloAypx3o,565640
160
160
  wolfhece/libs/WolfDll.dll,sha256=3--r0CVWTsb_st6oMf0AyP6OyTNPj9b4kl0g_-cAwi0,132934144
161
- wolfhece/libs/WolfDll_CD.dll,sha256=kC1svCwD1qSmppsiVfHwDkIvoJO_1l6TG1GfIxgiqQQ,131415040
162
- wolfhece/libs/WolfDll_debug.dll,sha256=-vrycGENtxj_GxX1n1vWBoamAfVCicPETKovk1LrIbU,74528256
163
161
  wolfhece/libs/WolfOGL.c,sha256=tBWGfpFFe8gfRjImUUlqdxhcRpQ6ytEWU7Z6PC0v9as,1085242
164
162
  wolfhece/libs/WolfOGL.pyx,sha256=kc1uxbO2wQx0Qoe7BVQnqTJgUWYx_Vtf1wzXMxzf8bI,65911
165
163
  wolfhece/libs/api-ms-win-crt-heap-l1-1-0.dll,sha256=r0euvgZa8vBFoZ8g7H5Upuc8DD6aUQimMJWnIyt1OBo,19720
@@ -258,8 +256,8 @@ wolfhece/sounds/sonsw2.wav,sha256=pFLVt6By0_EPQNt_3KfEZ9a1uSuYTgQSX1I_Zurv9Rc,11
258
256
  wolfhece/ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
259
257
  wolfhece/ui/wolf_multiselection_collapsiblepane.py,sha256=yGbU_JsF56jsmms0gh7mxa7tbNQ_SxqhpAZxhm-mTy4,14860
260
258
  wolfhece/ui/wolf_times_selection_comparison_models.py,sha256=wCxGRnE3kzEkWlWA6-3X8ADOFux_B0a5QWJ2GnXTgJw,4709
261
- wolfhece-2.0.45.dist-info/METADATA,sha256=e9hmw9J3Mu4IQcCW2FiI2cJwYUAaHGCRCUf2gvSwnro,2262
262
- wolfhece-2.0.45.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
263
- wolfhece-2.0.45.dist-info/entry_points.txt,sha256=AIu1KMswrdsqNq_2jPtrRIU4tLjuTnj2dCY-pxIlshw,276
264
- wolfhece-2.0.45.dist-info/top_level.txt,sha256=EfqZXMVCn7eILUzx9xsEu2oBbSo9liWPFWjIHik0iCI,9
265
- wolfhece-2.0.45.dist-info/RECORD,,
259
+ wolfhece-2.0.47.dist-info/METADATA,sha256=dJFIlRUAXTIyvBqN11Wi44FxC7LY6fILWOjeJjvDfqg,2233
260
+ wolfhece-2.0.47.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
261
+ wolfhece-2.0.47.dist-info/entry_points.txt,sha256=AIu1KMswrdsqNq_2jPtrRIU4tLjuTnj2dCY-pxIlshw,276
262
+ wolfhece-2.0.47.dist-info/top_level.txt,sha256=EfqZXMVCn7eILUzx9xsEu2oBbSo9liWPFWjIHik0iCI,9
263
+ wolfhece-2.0.47.dist-info/RECORD,,
Binary file
Binary file