wolfhece 2.1.10__py3-none-any.whl → 2.1.12__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/PyGui.py +38 -81
- wolfhece/PyPalette.py +21 -2
- wolfhece/apps/version.py +1 -1
- wolfhece/mesh2d/wolf2dprev.py +4 -0
- wolfhece/models/blue.pal +7 -7
- {wolfhece-2.1.10.dist-info → wolfhece-2.1.12.dist-info}/METADATA +1 -1
- {wolfhece-2.1.10.dist-info → wolfhece-2.1.12.dist-info}/RECORD +10 -10
- {wolfhece-2.1.10.dist-info → wolfhece-2.1.12.dist-info}/WHEEL +0 -0
- {wolfhece-2.1.10.dist-info → wolfhece-2.1.12.dist-info}/entry_points.txt +0 -0
- {wolfhece-2.1.10.dist-info → wolfhece-2.1.12.dist-info}/top_level.txt +0 -0
wolfhece/PyGui.py
CHANGED
@@ -34,22 +34,28 @@ from .CpGrid import CpGrid
|
|
34
34
|
GEOM_GROUP_NAME = _('Block geometry')
|
35
35
|
MAGN_GROUP_NAME = _('Magnetic grid')
|
36
36
|
|
37
|
-
# FIXME : Is it necessary to override wx.Frame ? WolfMapManager is a wx.Frame.
|
38
|
-
# Is it sufficient to run a wx.App ?
|
39
37
|
class GenMapManager(wx.Frame):
|
40
|
-
|
41
|
-
|
38
|
+
"""
|
39
|
+
Default class for a Wolf Map Manager.
|
40
|
+
|
41
|
+
Will be overriden by the specific classes MapManager, GPU2DModel, HydrologyModel, Wolf2DModel.
|
42
|
+
|
43
|
+
It is not suitable for direct use.
|
44
|
+
|
45
|
+
"""
|
42
46
|
|
43
47
|
def __init__(self, *args, **kw):
|
44
48
|
# `args` and `kwargs` represent parameters
|
45
49
|
# that have to be passed to `wx.Frame.__init__`
|
46
50
|
|
47
|
-
self.mapviewer = None
|
48
|
-
self.wx_exists = wx.App.Get() is not None # test if wx App is running
|
51
|
+
self.mapviewer:WolfMapViewer = None
|
52
|
+
self.wx_exists:bool = wx.App.Get() is not None # test if wx App is running
|
49
53
|
self.mylogs=None
|
50
54
|
|
51
55
|
if self.wx_exists:
|
52
56
|
|
57
|
+
super().__init__(parent = None)
|
58
|
+
|
53
59
|
if len(args) == 0:
|
54
60
|
# FIXME This is hackish. the parent parameter should be passed explicitely.
|
55
61
|
# I do it this way to not have to recheck the whole project
|
@@ -73,14 +79,13 @@ class GenMapManager(wx.Frame):
|
|
73
79
|
# Don't pollute the call to wf.Frame.__init__
|
74
80
|
kw.pop(SPLASH_PARAM, None)
|
75
81
|
|
76
|
-
super().__init__(*args)
|
82
|
+
# super().__init__(*args)
|
77
83
|
self.mylogs = create_wxlogwindow(_('Informations'))
|
78
84
|
|
79
85
|
|
80
|
-
def setup_mapviewer(self, title, wolfparent):
|
81
|
-
"""
|
82
|
-
|
83
|
-
"""
|
86
|
+
def setup_mapviewer(self, title:str, wolfparent):
|
87
|
+
""" Setup of a WolfMapViewer """
|
88
|
+
|
84
89
|
self.mapviewer = WolfMapViewer(None,
|
85
90
|
title=title,
|
86
91
|
wolfparent= wolfparent,
|
@@ -88,60 +93,15 @@ class GenMapManager(wx.Frame):
|
|
88
93
|
self.mapviewer.add_grid()
|
89
94
|
self.mapviewer.add_WMS()
|
90
95
|
|
91
|
-
def get_mapviewer(self):
|
92
|
-
|
96
|
+
def get_mapviewer(self) -> WolfMapViewer:
|
97
|
+
""" Retourne une instance WolfMapViewer """
|
98
|
+
|
93
99
|
return self.mapviewer
|
94
100
|
|
95
|
-
def get_configuration(self):
|
96
|
-
|
101
|
+
def get_configuration(self) -> WolfConfiguration:
|
102
|
+
""" Retourne la configuration de Wolf """
|
97
103
|
|
98
|
-
|
99
|
-
# """ Add a grid to the mapviewer """
|
100
|
-
# mygrid=Grid(1000.)
|
101
|
-
|
102
|
-
# if tomapviewer is None:
|
103
|
-
# tomapviewer = self.mapviewer
|
104
|
-
# tomapviewer.add_object('vector',newobj=mygrid,ToCheck=False,id='Grid')
|
105
|
-
|
106
|
-
# def add_WMS(self, tomapviewer:WolfMapViewer=None):
|
107
|
-
# """ Add WMS layers to the mapviewer """
|
108
|
-
# if tomapviewer is None:
|
109
|
-
# tomapviewer = self.mapviewer
|
110
|
-
|
111
|
-
# xmin=0
|
112
|
-
# xmax=0
|
113
|
-
# ymin=0
|
114
|
-
# ymax=0
|
115
|
-
# orthos={'IMAGERIE':{'1971':'ORTHO_1971','1994-2000':'ORTHO_1994_2000',
|
116
|
-
# '2006-2007':'ORTHO_2006_2007',
|
117
|
-
# '2009-2010':'ORTHO_2009_2010',
|
118
|
-
# '2012-2013':'ORTHO_2012_2013',
|
119
|
-
# '2015':'ORTHO_2015','2016':'ORTHO_2016','2017':'ORTHO_2017',
|
120
|
-
# '2018':'ORTHO_2018','2019':'ORTHO_2019','2020':'ORTHO_2020',
|
121
|
-
# '2021':'ORTHO_2021'}}
|
122
|
-
# for idx,(k,item) in enumerate(orthos.items()):
|
123
|
-
# for kdx,(m,subitem) in enumerate(item.items()):
|
124
|
-
# tomapviewer.add_object(which='wmsback',
|
125
|
-
# newobj=imagetexture('PPNC',m,k,subitem,
|
126
|
-
# tomapviewer,xmin,xmax,ymin,ymax,-99999,1024),
|
127
|
-
# ToCheck=False,id='PPNC '+m)
|
128
|
-
|
129
|
-
# tomapviewer.add_object(which='wmsback',
|
130
|
-
# newobj=imagetexture('PPNC','Orthos France','OI.OrthoimageCoverage.HR','',
|
131
|
-
# tomapviewer,xmin,xmax,ymin,ymax,-99999,1024,France=True,epsg='EPSG:27563'),
|
132
|
-
# ToCheck=False,id='Orthos France')
|
133
|
-
|
134
|
-
# forelist={'EAU':{'Aqualim':'RES_LIMNI_DGARNE','Alea':'ALEA_INOND','Lidaxes':'LIDAXES','Juillet 2021':'ZONES_INONDEES','Juillet 2021 IDW':'ZONES_INONDEES$IDW'},
|
135
|
-
# 'LIMITES':{'Secteurs Statistiques':'LIMITES_QS_STATBEL'},
|
136
|
-
# 'INSPIRE':{'Limites administratives':'AU_wms'},
|
137
|
-
# 'PLAN_REGLEMENT':{'Plan Percellaire':'CADMAP_2021_PARCELLES'}}
|
138
|
-
|
139
|
-
# for idx,(k,item) in enumerate(forelist.items()):
|
140
|
-
# for kdx,(m,subitem) in enumerate(item.items()):
|
141
|
-
# tomapviewer.add_object(which='wmsfore',
|
142
|
-
# newobj=imagetexture('PPNC',m,k,subitem,
|
143
|
-
# tomapviewer,xmin,xmax,ymin,ymax,-99999,1024),
|
144
|
-
# ToCheck=False,id=m)
|
104
|
+
return self._configuration
|
145
105
|
|
146
106
|
class MapManager(GenMapManager):
|
147
107
|
def __init__(self,*args, **kw):
|
@@ -155,11 +115,6 @@ class MapManager(GenMapManager):
|
|
155
115
|
|
156
116
|
self.setup_mapviewer(title = 'Wolf - main data manager', wolfparent=self)
|
157
117
|
|
158
|
-
try:
|
159
|
-
self.mylogs.GetFrame().SetIcon(icon)
|
160
|
-
except:
|
161
|
-
logging.error("No icon for the log window")
|
162
|
-
|
163
118
|
try:
|
164
119
|
self.mapviewer.mytooltip.SetIcon(icon)
|
165
120
|
except:
|
@@ -170,7 +125,14 @@ class MapManager(GenMapManager):
|
|
170
125
|
except:
|
171
126
|
logging.error("No icon for the mapviewer window")
|
172
127
|
|
173
|
-
|
128
|
+
if self.wx_exists:
|
129
|
+
try:
|
130
|
+
self.mylogs.GetFrame().SetIcon(icon)
|
131
|
+
except:
|
132
|
+
logging.error("No icon for the log window")
|
133
|
+
|
134
|
+
|
135
|
+
# Set directory for hydrometry data, relative to the current file
|
174
136
|
dir_hydro = Path(__file__).parent / "data/hydrometry"
|
175
137
|
if not exists(dir_hydro):
|
176
138
|
makedirs(dir_hydro, exist_ok=True)
|
@@ -241,19 +203,6 @@ class GPU2DModel(GenMapManager):
|
|
241
203
|
id='res1',
|
242
204
|
ToCheck=False)
|
243
205
|
|
244
|
-
"""self.files_results_array={}
|
245
|
-
self.files_results_array['H']=[]
|
246
|
-
idx=101
|
247
|
-
while path.exists(self.mydir+'//out'+str(idx)+'r.bin'):
|
248
|
-
self.files_results_array['H'].append(['out'+str(idx)+'r.bin','step '+str(idx)])
|
249
|
-
idx+=1
|
250
|
-
|
251
|
-
for curfile in self.files_results_array['H']:
|
252
|
-
curext=curfile[0]
|
253
|
-
curidx=curfile[1]
|
254
|
-
self.allviews.add_object(which='array',filename=self.mydir+'//'+curext,id=curidx,ToCheck=False)
|
255
|
-
"""
|
256
|
-
|
257
206
|
self.mapviewer.findminmax(True)
|
258
207
|
self.mapviewer.Autoscale(False)
|
259
208
|
|
@@ -1840,6 +1789,14 @@ class Wolf2DModel(GenMapManager):
|
|
1840
1789
|
if dlg.ShowModal() == wx.ID_OK:
|
1841
1790
|
try:
|
1842
1791
|
dx, dy = dlg.GetValue().split(',')
|
1792
|
+
|
1793
|
+
try:
|
1794
|
+
floatdx = float(dx)
|
1795
|
+
floatdy = float(dy)
|
1796
|
+
except:
|
1797
|
+
logging.error(_('Invalid fine resolution'))
|
1798
|
+
return
|
1799
|
+
|
1843
1800
|
self.sim.set_mesh_fine_size(float(dx), float(dy))
|
1844
1801
|
self._show_glob_properties()
|
1845
1802
|
except:
|
wolfhece/PyPalette.py
CHANGED
@@ -110,14 +110,25 @@ class wolfpalette(wx.Frame,LinearSegmentedColormap):
|
|
110
110
|
|
111
111
|
return self.nb,self.values,self._segmentdata,self.colorsflt
|
112
112
|
|
113
|
-
def distribute_values(self, minval=-99999, maxval=-99999, step=0):
|
113
|
+
def distribute_values(self, minval=-99999, maxval=-99999, step=0, wx_permitted=True):
|
114
|
+
""" Distribution des valeurs de la palette
|
115
|
+
|
116
|
+
:param minval: valeur minimale
|
117
|
+
:param maxval: valeur maximale
|
118
|
+
:param step: pas de distribution
|
114
119
|
|
115
|
-
|
120
|
+
Si le pas est fourni, il prend le dessus sur la valeur maximale.
|
121
|
+
|
122
|
+
"""
|
123
|
+
|
124
|
+
if self.wx_exists and wx_permitted:
|
116
125
|
if minval==-99999:
|
117
126
|
dlg = wx.TextEntryDialog(None, _('Minimum value'), value = str(self.values[0]))
|
118
127
|
ret = dlg.ShowModal()
|
119
128
|
self.values[0] = dlg.GetValue()
|
120
129
|
dlg.Destroy()
|
130
|
+
else:
|
131
|
+
self.values[0] = minval
|
121
132
|
|
122
133
|
if maxval==-99999 and step==0:
|
123
134
|
|
@@ -134,6 +145,14 @@ class wolfpalette(wx.Frame,LinearSegmentedColormap):
|
|
134
145
|
ret = dlg.ShowModal()
|
135
146
|
self.values[-1] = float(dlg.GetValue())
|
136
147
|
dlg.Destroy()
|
148
|
+
|
149
|
+
elif maxval!=-99999:
|
150
|
+
self.values[-1] = maxval
|
151
|
+
else:
|
152
|
+
if minval != -99999:
|
153
|
+
self.values[0] = minval
|
154
|
+
if maxval != -99999:
|
155
|
+
self.values[-1] = maxval
|
137
156
|
|
138
157
|
if step==0:
|
139
158
|
self.values = np.linspace(self.values[0], self.values[-1], num=self.nb, endpoint=True)[0:self.nb]
|
wolfhece/apps/version.py
CHANGED
wolfhece/mesh2d/wolf2dprev.py
CHANGED
@@ -8457,6 +8457,10 @@ class blocks_file():
|
|
8457
8457
|
def add_block(self, contour:zone, dx:float, dy:float):
|
8458
8458
|
"""Add a block to the list of blocks"""
|
8459
8459
|
|
8460
|
+
if contour is None:
|
8461
|
+
logging.error(_('No contour zone available for block creation - Create a contour first'))
|
8462
|
+
return
|
8463
|
+
|
8460
8464
|
new_block = block_description(self, idx = self.nb_blocks+1)
|
8461
8465
|
new_block.setup(contour, dx, dy)
|
8462
8466
|
self.my_blocks.append(new_block)
|
wolfhece/models/blue.pal
CHANGED
@@ -7,10 +7,10 @@ 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
9
|
wolfhece/PyDraw.py,sha256=eYv0X1NFCWlgOgiRaIjW0SPlR_uVLdZhFpztY1jX6Lo,378408
|
10
|
-
wolfhece/PyGui.py,sha256=
|
10
|
+
wolfhece/PyGui.py,sha256=7p4ecrrODTggH8Oz4GTg4rWk6Z3vhYH4GNAE4TL3VY8,102058
|
11
11
|
wolfhece/PyGuiHydrology.py,sha256=wKhR-KthPRyzJ887NmsozmUpm2CIQIwO3IbYORCYjrE,7290
|
12
12
|
wolfhece/PyHydrographs.py,sha256=GKK8U0byI45H9O_e4LAOOi7Aw0Tg7Q0Lx322stPg5IQ,3453
|
13
|
-
wolfhece/PyPalette.py,sha256=
|
13
|
+
wolfhece/PyPalette.py,sha256=Vl5RrBIC_a5-mZKUtBd5kG0mif946B7OtS3fnehkmOc,25012
|
14
14
|
wolfhece/PyParams.py,sha256=xUmtwna4rhTCqa3-fpq7bG5pxMpoa4PFRi5hEjxOxPw,96868
|
15
15
|
wolfhece/PyPictures.py,sha256=-mJB0JL2YYiEK3D7_ssDkvYiMWK4ve9kXhozQXNeSx8,2216
|
16
16
|
wolfhece/PyTranslate.py,sha256=4appkmNeHHZLFmUtaA_k5_5QL-5ymxnbVN4R2OblmtE,622
|
@@ -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=LkEVMK0eCc84NeCWD3CGja7fuQ_k1PrZdyqD3GQk_8c,2118
|
69
|
-
wolfhece/apps/version.py,sha256=
|
69
|
+
wolfhece/apps/version.py,sha256=N0uYf8Ph8RZNrkgDZfWNxv4HyEW8y5h7YyQXXAZnSUQ,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
|
@@ -217,9 +217,9 @@ wolfhece/mesh2d/bc_manager.py,sha256=OzN4NPlDniv9HsLTUQrJkBY6U_a3SkqNpvjIw0TcguI
|
|
217
217
|
wolfhece/mesh2d/cell_tracker.py,sha256=AR-Bty-QnrY1ni8Lwak2kU2UWMAJSBCF2ugl2YpfsB4,8660
|
218
218
|
wolfhece/mesh2d/config_manager.py,sha256=qQE5sPbHj9cNZe3uGk1pkuogsS28kJZNx3xybZ6CfCM,14438
|
219
219
|
wolfhece/mesh2d/cst_2D_boundary_conditions.py,sha256=cZrHvtfqqTWtUcWnUe9iy9ZY6lAWAJnDoVupV6H7Zw4,4710
|
220
|
-
wolfhece/mesh2d/wolf2dprev.py,sha256=
|
220
|
+
wolfhece/mesh2d/wolf2dprev.py,sha256=Lbm-Qp4PVEEphOm3AHVwW9BiZQxrab40GYlABaK0-A4,491191
|
221
221
|
wolfhece/models/HECE_169.pptx,sha256=OWJtsWz504A-REFaaxw8lwStHyQU2l7KEeiE7IZvtbk,3396930
|
222
|
-
wolfhece/models/blue.pal,sha256=
|
222
|
+
wolfhece/models/blue.pal,sha256=s9-wEPzSiKMMHuKofUB2FPjmyO7HfGM2xWaUJwsKAY8,39
|
223
223
|
wolfhece/models/diff16.pal,sha256=Pkp9kQ1GvmAKz3lgwohsw8eQySjVVKHbjhoWw-gZ6Nc,303
|
224
224
|
wolfhece/models/diff3.pal,sha256=qk-yGgJr_FHdW7p7i93GFsH9ClT0dl5nqa9G1lLh7Z0,50
|
225
225
|
wolfhece/models/red.pal,sha256=W6oeIjDCoGCsJDZPH2K4jfyfPmCMlH9rfRi4PTs-n28,33
|
@@ -267,8 +267,8 @@ wolfhece/sounds/sonsw2.wav,sha256=pFLVt6By0_EPQNt_3KfEZ9a1uSuYTgQSX1I_Zurv9Rc,11
|
|
267
267
|
wolfhece/ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
268
268
|
wolfhece/ui/wolf_multiselection_collapsiblepane.py,sha256=yGbU_JsF56jsmms0gh7mxa7tbNQ_SxqhpAZxhm-mTy4,14860
|
269
269
|
wolfhece/ui/wolf_times_selection_comparison_models.py,sha256=wCxGRnE3kzEkWlWA6-3X8ADOFux_B0a5QWJ2GnXTgJw,4709
|
270
|
-
wolfhece-2.1.
|
271
|
-
wolfhece-2.1.
|
272
|
-
wolfhece-2.1.
|
273
|
-
wolfhece-2.1.
|
274
|
-
wolfhece-2.1.
|
270
|
+
wolfhece-2.1.12.dist-info/METADATA,sha256=7wMYhHxIq5GvX5q_b21FFj0JQcLTWtT8CRXEqvPjXdU,2282
|
271
|
+
wolfhece-2.1.12.dist-info/WHEEL,sha256=cpQTJ5IWu9CdaPViMhC9YzF8gZuS5-vlfoFihTBC86A,91
|
272
|
+
wolfhece-2.1.12.dist-info/entry_points.txt,sha256=AIu1KMswrdsqNq_2jPtrRIU4tLjuTnj2dCY-pxIlshw,276
|
273
|
+
wolfhece-2.1.12.dist-info/top_level.txt,sha256=EfqZXMVCn7eILUzx9xsEu2oBbSo9liWPFWjIHik0iCI,9
|
274
|
+
wolfhece-2.1.12.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|