wolfhece 2.1.123__py3-none-any.whl → 2.1.124__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
@@ -6598,12 +6598,13 @@ class WolfMapViewer(wx.Frame):
6598
6598
  dlg = wx.SingleChoiceDialog(None, _("Pick a colormap"), "Choices", choices)
6599
6599
 
6600
6600
  if self.active_laz is not None:
6601
- dlg.SetSelection(ass_values.index(self.active_laz.associated_color))
6601
+ if self.active_laz.associated_color is not None:
6602
+ dlg.SetSelection(ass_values.index(self.active_laz.associated_color))
6602
6603
 
6603
6604
  ret = dlg.ShowModal()
6604
6605
  if ret == wx.ID_CANCEL:
6605
6606
  dlg.Destroy()
6606
- return
6607
+ return self.active_laz.associated_color
6607
6608
 
6608
6609
  colormap = dlg.GetStringSelection()
6609
6610
  idx = choices.index(colormap)
@@ -10249,7 +10250,10 @@ class WolfMapViewer(wx.Frame):
10249
10250
 
10250
10251
  xyz = self.selected_object.xyz_selected
10251
10252
  if xyz.shape[0] ==0:
10252
- logging.warning('No points selected')
10253
+ logging.warning(_('No points selected'))
10254
+
10255
+ if self.selected_object._myprops[('Selection', 'Codes')] != '':
10256
+ logging.info(_('You filtered the points with the codes : {}'.format(self.selected_object._myprops[('Selection', 'Codes')])))
10253
10257
  return
10254
10258
 
10255
10259
  if xyz.shape[0] > 100000:
@@ -11044,6 +11048,8 @@ class WolfMapViewer(wx.Frame):
11044
11048
  pos = e.GetPosition()
11045
11049
 
11046
11050
  ctrldown = e.ControlDown()
11051
+ altdown = e.AltDown()
11052
+ shiftdown = e.ShiftDown()
11047
11053
 
11048
11054
  x, y = self.getXY(pos)
11049
11055
 
@@ -11053,7 +11059,7 @@ class WolfMapViewer(wx.Frame):
11053
11059
  self.oneclick = False
11054
11060
  self.setbounds()
11055
11061
 
11056
- if ctrldown:
11062
+ if shiftdown:
11057
11063
  if self.active_array is not None:
11058
11064
  if self.active_viewer3d is not None:
11059
11065
  self.active_viewer3d.force_view(self.mousex, self.mousey, self.active_array.get_value(self.mousex, self.mousey))
wolfhece/apps/version.py CHANGED
@@ -5,7 +5,7 @@ class WolfVersion():
5
5
 
6
6
  self.major = 2
7
7
  self.minor = 1
8
- self.patch = 123
8
+ self.patch = 124
9
9
 
10
10
  def __str__(self):
11
11
 
@@ -123,7 +123,7 @@ class Classification_LAZ():
123
123
  def choices_laz_colormap() -> list[str]:
124
124
 
125
125
  choices = [cur.name for cur in Colors_Lazviewer]
126
- values = [cur.value for cur in Colors_Lazviewer]
126
+ values = [cur for cur in Colors_Lazviewer]
127
127
 
128
128
  return choices, values
129
129
 
@@ -699,8 +699,8 @@ class xyz_laz_grids():
699
699
  figmpl = MplFig(PRESET_LAYOUTS.DEFAULT)
700
700
 
701
701
  logging.info(_('Plotting'))
702
- figmpl.plot(up_s, up_z, c=up_color ,marker='.')
703
- figmpl.plot(down_s, down_z,c=down_color,marker='+')
702
+ figmpl.scatter(up_s, up_z, c=up_color ,marker='.')
703
+ figmpl.scatter(down_s, down_z,c=down_color,marker='+')
704
704
 
705
705
  if show:
706
706
  figmpl.Show()
@@ -764,7 +764,7 @@ class Wolf_LAZ_Data(Element_To_Draw):
764
764
  self.classification = Classification_LAZ() # Classification of LAZ data --> defining colors if codification is used
765
765
  self.classification.init_2023() # Default classification for LAZ data
766
766
 
767
- self._associated_color:int = Colors_Lazviewer.CODE_2023.value # Associated color type for LAZ data
767
+ self._associated_color:int = Colors_Lazviewer.CODE_2023 # Associated color type for LAZ data
768
768
 
769
769
  self.viewer:viewer = None # PPTK viewer
770
770
 
@@ -792,7 +792,7 @@ class Wolf_LAZ_Data(Element_To_Draw):
792
792
 
793
793
  def serialize(self):
794
794
  """ Serialize class : data and attributes """
795
- return {'bounds':self._bounds, 'data':str(self._filename) + '.npz', 'associated_color':self._associated_color,
795
+ return {'bounds':self._bounds, 'data':str(self._filename) + '.npz', 'associated_color':self._associated_color.value,
796
796
  'point_size':self._point_size, 'bg_color':self._bg_color, 'bg_color_top':self._bg_color_top,
797
797
  'bg_color_bottom':self._bg_color_bottom, 'floor_level':self._floor_level, 'floor_color':self._floor_color,
798
798
  'show_grid':self._show_grid, 'show_axis':self._show_axis, 'show_info':self._show_info}
@@ -838,8 +838,12 @@ class Wolf_LAZ_Data(Element_To_Draw):
838
838
  return self._associated_color
839
839
 
840
840
  @associated_color.setter
841
- def associated_color(self, value:int):
842
- self._associated_color = value
841
+ def associated_color(self, value:int | Colors_Lazviewer):
842
+
843
+ if isinstance(value, int):
844
+ self._associated_color = Colors_Lazviewer(value)
845
+ else:
846
+ self._associated_color = value
843
847
  self.set_colors()
844
848
 
845
849
  def merge(self, other:"Wolf_LAZ_Data"):
@@ -1331,9 +1335,9 @@ class Wolf_LAZ_Data(Element_To_Draw):
1331
1335
  ret = props.addparam('Floor', 'Level', self._floor_level, Type_Param.Float, 'Floor level')
1332
1336
  ret = props.addparam('Floor', 'Color', self._floor_color, Type_Param.Color, 'Floor color')
1333
1337
 
1334
- ret = props.addparam('Infos', 'Grid', self._show_grid, Type_Param.Logical, 'Show grid')
1335
- ret = props.addparam('Infos', 'Axis', self._show_axis, Type_Param.Logical, 'Show axis')
1336
- ret = props.addparam('Infos', 'values', self._show_info, Type_Param.Logical, 'Show info')
1338
+ # ret = props.addparam('Infos', 'Grid', self._show_grid, Type_Param.Logical, 'Show grid')
1339
+ # ret = props.addparam('Infos', 'Axis', self._show_axis, Type_Param.Logical, 'Show axis')
1340
+ # ret = props.addparam('Infos', 'values', self._show_info, Type_Param.Logical, 'Show info')
1337
1341
 
1338
1342
  ret = props.addparam('Points', 'Size', self._point_size, Type_Param.Float, 'Point size')
1339
1343
 
@@ -1426,7 +1430,7 @@ class Wolf_LAZ_Data(Element_To_Draw):
1426
1430
  xyz[i,0] = float(xls.GetCellValue(i,0))
1427
1431
  xyz[i,1] = float(xls.GetCellValue(i,1))
1428
1432
  xyz[i,2] = float(xls.GetCellValue(i,2))
1429
- codes[i] = int(xls.GetCellValue(i,3))
1433
+ codes[i] = float(xls.GetCellValue(i,3))
1430
1434
  except Exception as e:
1431
1435
  logging.error(e)
1432
1436
  logging.warning(_('Bad values in grid - Check your input'))
@@ -1556,9 +1560,9 @@ class Wolf_LAZ_Data(Element_To_Draw):
1556
1560
  color = np.asarray(props[('Floor', 'Color')])
1557
1561
  self.floor_color(color / 255.)
1558
1562
 
1559
- self.show_grid(props[('Infos', 'Grid')])
1560
- self.show_axis(props[('Infos', 'Axis')])
1561
- self.show_info(props[('Infos', 'values')])
1563
+ # self.show_grid(props[('Infos', 'Grid')])
1564
+ # self.show_axis(props[('Infos', 'Axis')])
1565
+ # self.show_info(props[('Infos', 'values')])
1562
1566
 
1563
1567
  self.point_size = props[('Points', 'Size')]
1564
1568
 
@@ -1568,7 +1572,7 @@ class Wolf_LAZ_Data(Element_To_Draw):
1568
1572
  self._select_only_codes = list(set([int(curcode) for curcode in codes_sel]))
1569
1573
  except Exception as e:
1570
1574
  logging.error(e)
1571
- logging.warning(_('Nullify selection filter - Check your input'))
1575
+ logging.warning(_('Nullify selection filter - Check your input - Must be a list of integers separated by commas'))
1572
1576
  self._select_only_codes = []
1573
1577
 
1574
1578
  def _fill_props(self, full:bool = False):
@@ -1599,9 +1603,9 @@ class Wolf_LAZ_Data(Element_To_Draw):
1599
1603
  props[('Floor', 'Level')] = self._floor_level
1600
1604
  props[('Floor', 'Color')] = self._floor_color
1601
1605
 
1602
- props[('Infos', 'Grid')] = self._show_grid
1603
- props[('Infos', 'Axis')] = self._show_axis
1604
- props[('Infos', 'values')] = self._show_info
1606
+ # props[('Infos', 'Grid')] = self._show_grid
1607
+ # props[('Infos', 'Axis')] = self._show_axis
1608
+ # props[('Infos', 'values')] = self._show_info
1605
1609
 
1606
1610
  props[('Points', 'Size')] = self._point_size
1607
1611
 
@@ -1610,6 +1614,15 @@ class Wolf_LAZ_Data(Element_To_Draw):
1610
1614
  def show_properties(self):
1611
1615
  """ Surcharged method (see Element_To_Draw) to show properties from MapViewer"""
1612
1616
  if self.viewer is None:
1617
+ logging.info(_('No viewer / No properties'))
1618
+ return
1619
+
1620
+ # test if a connexion exists
1621
+ try:
1622
+ lookat = self.viewer.get('lookat')
1623
+ except:
1624
+ self.viewer = None
1625
+ logging.info(_('No viewer / No properties'))
1613
1626
  return
1614
1627
 
1615
1628
  self._create_props()
@@ -2102,13 +2102,13 @@ class Matplotlib_Figure(wx.Frame):
2102
2102
 
2103
2103
  ax.scatter(x, y, **kwargs)
2104
2104
 
2105
- new_props = Matplolib_line_properties(ax.get_lines()[-1], self._axes_properties[idx_ax])
2105
+ # new_props = Matplolib_line_properties(ax.get_lines()[-1], self._axes_properties[idx_ax])
2106
2106
 
2107
- if self.wx_exists:
2108
- new_props.add_props_to_sizer(self._collaps_pane.GetPane(), self._sizer_grid_props)
2107
+ # if self.wx_exists:
2108
+ # new_props.add_props_to_sizer(self._collaps_pane.GetPane(), self._sizer_grid_props)
2109
2109
 
2110
2110
  ax_prop:Matplotlib_ax_properties = self._axes_properties[idx_ax]
2111
- ax_prop._lines.append(new_props)
2111
+ # ax_prop._lines.append(new_props)
2112
2112
  ax_prop.get_properties()
2113
2113
 
2114
2114
  if self.wx_exists:
@@ -150,7 +150,7 @@ class Update_Sim:
150
150
  """
151
151
  pass
152
152
 
153
- def update_deck(self, roof:WolfArray):
153
+ def update_deck(self, deck:WolfArray):
154
154
  """
155
155
  FR
156
156
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: wolfhece
3
- Version: 2.1.123
3
+ Version: 2.1.124
4
4
  Author-email: Pierre Archambeau <pierre.archambeau@uliege.be>
5
5
  License: Copyright (c) 2024 University of Liege. All rights reserved.
6
6
  Project-URL: Homepage, https://uee.uliege.be/hece
@@ -7,7 +7,7 @@ wolfhece/ManageParams.py,sha256=EeuUI5Vvh9ixCvYf8YShMC1s1Yacc7OxOCN7q81gqiQ,517
7
7
  wolfhece/Model1D.py,sha256=SI4oNF_J3MdjiWZoizS8kuRXLMVyymX9dYfYJNVCQVI,476989
8
8
  wolfhece/PyConfig.py,sha256=gyl1MesSJZaVpC1XtvD78PpnE1VD3hGM3HPQXTJ3eJg,12963
9
9
  wolfhece/PyCrosssections.py,sha256=igU_ELrg5VrHU6RNbF5tHxPyVImpR3xdpfopJYc7haw,114711
10
- wolfhece/PyDraw.py,sha256=_OikcvFSinpdfSA9PO8-lMbMSSMOz3IvSdqoThyU9QU,568144
10
+ wolfhece/PyDraw.py,sha256=d4VmLpDLnbR_jw1Bjp8Hd7GX-0MiABaRFFBZWTX6qhY,568550
11
11
  wolfhece/PyGui.py,sha256=5ANCUmsBwsx_h-GWqV9xwnSQyGJ16mSObOm-h3_7LIQ,144708
12
12
  wolfhece/PyGuiHydrology.py,sha256=f60E8K9eGTnRq5RDF6yvt-ahf2AYegwQ9t25zZ2Mk1A,14946
13
13
  wolfhece/PyHydrographs.py,sha256=jwtSNMMACwarxrtN1UeQYth99UNrhwPx1IGgUwcooHA,3774
@@ -37,7 +37,7 @@ wolfhece/import_ascfiles.py,sha256=6Zl8qBR9c6VtyziookQ8YE9KC0GtW_J9WFt5ubyGp-s,4
37
37
  wolfhece/ins.py,sha256=uUeLMS1n3GPnfJhxl0Z2l-UXpmPUgthuwct282OOEzk,36184
38
38
  wolfhece/irm_qdf.py,sha256=DMdDEAYbgYxApObm6w-dZbBmA8ec6PghBLXR2lUEZLc,27457
39
39
  wolfhece/ismember.py,sha256=fkLvaH9fhx-p0QrlEzqa6ySO-ios3ysjAgXVXzLgSpY,2482
40
- wolfhece/matplotlib_fig.py,sha256=iWtREWS-_e0DdWxMJsXBvLSwMprlAMY_gie7DZ6UIbw,84067
40
+ wolfhece/matplotlib_fig.py,sha256=vnFI6sghw9N9jKhR8X1Z4aWli_5fPNylZQtFuujFJDY,84075
41
41
  wolfhece/multiprojects.py,sha256=Sd6Bl6YP33jlR79A6rvSLu23vq8sqbFYL8lWuVPkEpE,21549
42
42
  wolfhece/picc.py,sha256=0X_pzhSBoVxgtTfJ37pkOQO3Vbr9yurPaD1nVeurx8k,8531
43
43
  wolfhece/pidcontroller.py,sha256=PHYenOdzfyPK2pXAhyRolCxMSMRd2AFza0eVMafpPHk,5205
@@ -80,7 +80,7 @@ wolfhece/apps/curvedigitizer.py,sha256=lEJJwgAfulrrWQc-U6ij6sj59hWN3SZl4Yu1kQxVz
80
80
  wolfhece/apps/hydrometry.py,sha256=lhhJsFeb4zGL4bNQTs0co85OQ_6ssL1Oy0OUJCzhfYE,656
81
81
  wolfhece/apps/isocurrent.py,sha256=dagmGR8ja9QQ1gwz_8fU-N052hIw-W0mWGVkzLu6C7I,4247
82
82
  wolfhece/apps/splashscreen.py,sha256=SrustmIQeXnsiD-92OzjdGhBi-S7c_j-cSvuX4T6rtg,2929
83
- wolfhece/apps/version.py,sha256=cMi7d7GBIK87fZLMv7WtfEiDFUJIcbCo_P83NQStVTU,389
83
+ wolfhece/apps/version.py,sha256=vKWzYKmXCd1RCcT66fDHO8Udxy0xzt6HlLaQF0NL_2w,389
84
84
  wolfhece/apps/wolf.py,sha256=j_CgvsL8rwixbVvVD5Z0s7m7cHZ86gmFLojKGuetMls,729
85
85
  wolfhece/apps/wolf2D.py,sha256=4z_OPQ3IgaLtjexjMKX9ppvqEYyjFLt1hcfFABy3-jU,703
86
86
  wolfhece/apps/wolf_logo.bmp,sha256=ruJ4MA51CpGO_AYUp_dB4SWKHelvhOvd7Q8NrVOjDJk,3126
@@ -154,7 +154,7 @@ wolfhece/lagrangian/particles.py,sha256=S52_-3rzgVhift6l4Gznvsf_RTggzvNaD1dPvQUr
154
154
  wolfhece/lagrangian/velocity_field.py,sha256=oGVjNm98gEpawreFIrC1lDyC5bEhkk2CsyYAlF1Kq50,10574
155
155
  wolfhece/lazviewer/__init__.py,sha256=lz60EpQOBZ-zjvYzff6Y11jzAmC7mjOaxRYAfoqizQs,473
156
156
  wolfhece/lazviewer/_add_path.py,sha256=XgMEXRhFhx9-B1hUsP7Zr199zNljYwT5dGMYSB9jRa4,639
157
- wolfhece/lazviewer/laz_viewer.py,sha256=QhLRTBbwsKHhRTVPdpUII75g4tSKLuBWwHth-IjwVII,76845
157
+ wolfhece/lazviewer/laz_viewer.py,sha256=QZbQLX0Kz0VdqGvdpCwA6-9_Q1kGi0DJ4u9ygA9luEY,77339
158
158
  wolfhece/lazviewer/libs/Qt5Core.dll,sha256=sTJ_ctYFY9KHMNytF-lzH_078zIvnKTjN-71FDkOWPw,4924928
159
159
  wolfhece/lazviewer/libs/Qt5Gui.dll,sha256=07BeaOeYByraGkKYeDiSDYLawHM8tyd55pVJlKbZ4Y0,5436416
160
160
  wolfhece/lazviewer/libs/Qt5Network.dll,sha256=U-9FiLE9LUKru8r8EQxTnwwlMpwS8JzUtenhkKTCox0,1038336
@@ -274,7 +274,7 @@ wolfhece/scenario/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
274
274
  wolfhece/scenario/check_scenario.py,sha256=d-LWa_FxmPxTSc_H1lDHwqLB6TCqj1IUrRJhatfPMMA,5623
275
275
  wolfhece/scenario/config_manager.py,sha256=HlMjAbyK9im0UrvVQIxc_MS7bakqO4OSV1c7JZrL5uk,113847
276
276
  wolfhece/scenario/imposebc_void.py,sha256=PqA_99hKcaqK5zsK6IRIc5Exgg3WVpgWU8xpwNL49zQ,5571
277
- wolfhece/scenario/update_void.py,sha256=8h7EwZskrgzuSClhBFWtZI948CV2B2MqBQmxQ5HNFR0,10033
277
+ wolfhece/scenario/update_void.py,sha256=Yb7TMIUx9Gzm9_6qRMJnF39Uqi17dIkMmscSXo2WaTs,10033
278
278
  wolfhece/shaders/fragment_shader_texture.glsl,sha256=w6h8d5mJqFaGbao0LGmjRcFFdcEQ3ICIl9JpuT71K5k,177
279
279
  wolfhece/shaders/geom_grid.glsl,sha256=7eAkutCrwoeJpIdF69Ar7K18YyClvVG8ArJJARcmC-Q,742
280
280
  wolfhece/shaders/quad_frag_shader.glsl,sha256=GYGg9q4vFXiMuLK-pxSLz7crAE3dvlzJ7-e7PMfwSq0,1227
@@ -295,8 +295,8 @@ wolfhece/ui/wolf_multiselection_collapsiblepane.py,sha256=8PlMYrb_8jI8h9F0_EagpM
295
295
  wolfhece/ui/wolf_times_selection_comparison_models.py,sha256=ORy7fz4dcp691qKzaOZHrRLZ0uXNhL-LIHxmpDGL6BI,5007
296
296
  wolfhece/wintab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
297
297
  wolfhece/wintab/wintab.py,sha256=8A-JNONV6ujgsgG3lM5Uw-pVgglPATwKs86oBzzljoc,7179
298
- wolfhece-2.1.123.dist-info/METADATA,sha256=M3L8dCCD8C9FEljWmL-SLZfETDY-ZNTx0P2W2y2uddM,2587
299
- wolfhece-2.1.123.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
300
- wolfhece-2.1.123.dist-info/entry_points.txt,sha256=ZZ-aSfbpdcmo-wo84lRFzBN7LaSnD1XRGSaAKVX-Gpc,522
301
- wolfhece-2.1.123.dist-info/top_level.txt,sha256=EfqZXMVCn7eILUzx9xsEu2oBbSo9liWPFWjIHik0iCI,9
302
- wolfhece-2.1.123.dist-info/RECORD,,
298
+ wolfhece-2.1.124.dist-info/METADATA,sha256=jCOH--k0Mh3lNE5lm5hjJkmMzisMo7oVWtFYJm1qw-Q,2587
299
+ wolfhece-2.1.124.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
300
+ wolfhece-2.1.124.dist-info/entry_points.txt,sha256=ZZ-aSfbpdcmo-wo84lRFzBN7LaSnD1XRGSaAKVX-Gpc,522
301
+ wolfhece-2.1.124.dist-info/top_level.txt,sha256=EfqZXMVCn7eILUzx9xsEu2oBbSo9liWPFWjIHik0iCI,9
302
+ wolfhece-2.1.124.dist-info/RECORD,,