wolfhece 2.0.31__py3-none-any.whl → 2.0.32__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 +29 -7
- wolfhece/PyVertexvectors.py +5 -0
- wolfhece/apps/version.py +1 -1
- wolfhece/picc.py +1 -1
- wolfhece/scenario/config_manager.py +41 -5
- wolfhece/wolf_array.py +104 -30
- {wolfhece-2.0.31.dist-info → wolfhece-2.0.32.dist-info}/METADATA +1 -1
- {wolfhece-2.0.31.dist-info → wolfhece-2.0.32.dist-info}/RECORD +11 -11
- {wolfhece-2.0.31.dist-info → wolfhece-2.0.32.dist-info}/WHEEL +0 -0
- {wolfhece-2.0.31.dist-info → wolfhece-2.0.32.dist-info}/entry_points.txt +0 -0
- {wolfhece-2.0.31.dist-info → wolfhece-2.0.32.dist-info}/top_level.txt +0 -0
wolfhece/PyDraw.py
CHANGED
@@ -213,6 +213,7 @@ class WolfMapViewer(wx.Frame):
|
|
213
213
|
self.menubar = wx.MenuBar()
|
214
214
|
|
215
215
|
self.menuwolf2d = None
|
216
|
+
self.menu2d_cache_setup = None
|
216
217
|
self.menuparticlesystem = None
|
217
218
|
self.menu2dGPU = None
|
218
219
|
self.timer_ps = None
|
@@ -659,9 +660,10 @@ class WolfMapViewer(wx.Frame):
|
|
659
660
|
def menu_2dgpu(self):
|
660
661
|
|
661
662
|
if self.menuwolf2d is not None:
|
662
|
-
self.menu2d_cache_setup
|
663
|
-
|
664
|
-
|
663
|
+
if self.menu2d_cache_setup is None:
|
664
|
+
self.menu2d_cache_setup = self.menuwolf2d.Append(wx.ID_ANY, _("Setup cache..."), _("Set up cache for 2D GPU model"))
|
665
|
+
self.menu2d_cache_reset = self.menuwolf2d.Append(wx.ID_ANY, _("Clear cache..."), _("Clear cache for 2D GPU model"))
|
666
|
+
self.menu2d_show_tiles = self.menuwolf2d.Append(wx.ID_ANY, _("Show tiles..."), _("Show a grid of tiles for 2D GPU model"))
|
665
667
|
|
666
668
|
|
667
669
|
def menu_particlesystem(self):
|
@@ -3182,7 +3184,7 @@ class WolfMapViewer(wx.Frame):
|
|
3182
3184
|
logging.warning(_('No active 2D result !'))
|
3183
3185
|
return
|
3184
3186
|
|
3185
|
-
dlg = wx.SingleChoiceDialog(None, _('Choose the unknown to plot'), _('Unknown'), [_('Water depth'),
|
3187
|
+
dlg = wx.SingleChoiceDialog(None, _('Choose the unknown to plot'), _('Unknown'), [_('Water depth'), _('Water level'), _('Head')])
|
3186
3188
|
|
3187
3189
|
ret = dlg.ShowModal()
|
3188
3190
|
if ret == wx.ID_CANCEL:
|
@@ -4106,7 +4108,7 @@ class WolfMapViewer(wx.Frame):
|
|
4106
4108
|
obj: WolfArray
|
4107
4109
|
|
4108
4110
|
if obj.filename == '':
|
4109
|
-
filterArray = "bin (*.bin)|*.bin|all (*.*)|*.*"
|
4111
|
+
filterArray = "bin (*.bin)|*.bin|Geotif (*.tif)|*.tif|Numpy (*.npy)|*.npy|all (*.*)|*.*"
|
4110
4112
|
fdlg = wx.FileDialog(self, "Choose file", wildcard=filterArray, style=wx.FD_SAVE)
|
4111
4113
|
fdlg.ShowModal()
|
4112
4114
|
if fdlg.ShowModal() == wx.ID_OK:
|
@@ -4267,7 +4269,7 @@ class WolfMapViewer(wx.Frame):
|
|
4267
4269
|
for obj in self.iterator_over_objects(draw_type.ARRAYS):
|
4268
4270
|
obj: WolfArray
|
4269
4271
|
|
4270
|
-
filterArray = "bin (*.bin)|*.bin|all (*.*)|*.*"
|
4272
|
+
filterArray = "bin (*.bin)|*.bin|Geotif (*.tif)|*.tif|Numpy (*.npy)|all (*.*)|*.*"
|
4271
4273
|
fdlg = wx.FileDialog(self, "Choose file name for Array : " + obj.idx, wildcard=filterArray,
|
4272
4274
|
style=wx.FD_SAVE)
|
4273
4275
|
ret = fdlg.ShowModal()
|
@@ -5650,7 +5652,7 @@ class WolfMapViewer(wx.Frame):
|
|
5650
5652
|
|
5651
5653
|
if self.selected_object is not None:
|
5652
5654
|
if type(self.selected_object) is WolfArray or type(self.selected_object) is WolfArray_Sim2D:
|
5653
|
-
filterArray = "bin (*.bin)|*.bin|
|
5655
|
+
filterArray = "bin (*.bin)|*.bin|Geotif (*.tif)|*.tif|Numpy (*.npy)|*.npy|all (*.*)|*.*"
|
5654
5656
|
fdlg = wx.FileDialog(self, "Choose file name for Array : " + self.selected_object.idx, wildcard=filterArray,
|
5655
5657
|
style=wx.FD_SAVE)
|
5656
5658
|
ret = fdlg.ShowModal()
|
@@ -6895,8 +6897,10 @@ class WolfMapViewer(wx.Frame):
|
|
6895
6897
|
'1,2...9': _('Arrays : transfer the selection to the dictionary'),
|
6896
6898
|
'i': _('Arrays : 2D interpolation based on the selection on the current matrix'),
|
6897
6899
|
'CTRL+C': _('Arrays : Set copy source and current selection to clipboard as string'),
|
6900
|
+
'CTRL+X': _('Arrays : Crop the active array using the active vector and make a copy'),
|
6898
6901
|
'CTRL+V': _('Arrays : paste selected values'),
|
6899
6902
|
'CTRL+ALT+C or ALTGr+C': _('Arrays : Set copy source and current selection to clipboard as script'),
|
6903
|
+
'CTRL+ALT+X or ALTGr+X': _('Arrays : Crop the active array using the active vector without masking the values outside the vector'),
|
6900
6904
|
'CTRL+ALT+V or ALTGr+V': _('Arrays : paste selection to active array'),
|
6901
6905
|
|
6902
6906
|
'p or P': _('Cross sections : Pick a profile/cross section'),
|
@@ -7087,6 +7091,20 @@ class WolfMapViewer(wx.Frame):
|
|
7087
7091
|
self.active_res2d.update_zoom_2(1./1.1)
|
7088
7092
|
self.Refresh()
|
7089
7093
|
|
7094
|
+
elif key == ord('X'):
|
7095
|
+
# Create a new array from the active array and the active vector
|
7096
|
+
# Node outside the vector are set to NullValue
|
7097
|
+
if self.active_array is not None and self.active_vector is not None:
|
7098
|
+
|
7099
|
+
bbox = self.active_vector.get_bounds_xx_yy()
|
7100
|
+
newarray = self.active_array.crop_array(bbox)
|
7101
|
+
|
7102
|
+
if not altdown:
|
7103
|
+
newarray.mask_outsidepoly(self.active_vector)
|
7104
|
+
|
7105
|
+
self.add_object('array', newobj = newarray, id = self.active_array.idx + '_crop')
|
7106
|
+
|
7107
|
+
|
7090
7108
|
elif key == ord('Q'):
|
7091
7109
|
# If Ctrl-Q is hit, then we must *not* handle it
|
7092
7110
|
# because it is tied to the Ctrl-Q accelerator
|
@@ -7196,14 +7214,18 @@ class WolfMapViewer(wx.Frame):
|
|
7196
7214
|
elif len(cursel) > 0:
|
7197
7215
|
self.active_array.mngselection.myselection = cursel.copy()
|
7198
7216
|
self.active_array.mngselection.update_nb_nodes_sections()
|
7217
|
+
|
7199
7218
|
else:
|
7200
7219
|
logging.info(_('Copy selection values'))
|
7201
7220
|
if cursel == 'all':
|
7202
7221
|
self.active_array.paste_all(fromarray)
|
7222
|
+
|
7203
7223
|
elif len(cursel) > 0:
|
7204
7224
|
z = fromarray.mngselection.get_values_sel()
|
7205
7225
|
self.active_array.set_values_sel(cursel, z)
|
7206
7226
|
|
7227
|
+
self.Refresh()
|
7228
|
+
|
7207
7229
|
else:
|
7208
7230
|
if key == wx.WXK_DELETE:
|
7209
7231
|
self.removeobj()
|
wolfhece/PyVertexvectors.py
CHANGED
@@ -602,6 +602,7 @@ class vectorproperties:
|
|
602
602
|
self.parent.textimage=None
|
603
603
|
|
604
604
|
try:
|
605
|
+
self.parent.parentzone.prep_listogl()
|
605
606
|
self.parent.parentzone.parent.mapviewer.Refresh()
|
606
607
|
except:
|
607
608
|
pass
|
@@ -4704,6 +4705,7 @@ class Zones(wx.Frame, Element_To_Draw):
|
|
4704
4705
|
if ret==wx.ID_YES:
|
4705
4706
|
|
4706
4707
|
self.mapviwer.add_object('triangulation',newobj=mytri)
|
4708
|
+
self.mapviewer.Refresh()
|
4707
4709
|
|
4708
4710
|
dlg.Destroy()
|
4709
4711
|
|
@@ -4725,7 +4727,9 @@ class Zones(wx.Frame, Element_To_Draw):
|
|
4725
4727
|
return
|
4726
4728
|
|
4727
4729
|
mytri = myzone.createmultibin()
|
4730
|
+
|
4728
4731
|
self.mapviewer.add_object('triangulation',newobj=mytri)
|
4732
|
+
self.mapviewer.Refresh()
|
4729
4733
|
|
4730
4734
|
def Oncreatemultibin_project(self, event:wx.MouseEvent):
|
4731
4735
|
"""
|
@@ -4747,6 +4751,7 @@ class Zones(wx.Frame, Element_To_Draw):
|
|
4747
4751
|
|
4748
4752
|
mytri = myzone.createmultibin_proj()
|
4749
4753
|
self.mapviewer.add_object('triangulation',newobj=mytri)
|
4754
|
+
self.mapviewer.Refresh()
|
4750
4755
|
|
4751
4756
|
def save_images_fromvec(self, dir=''):
|
4752
4757
|
"""
|
wolfhece/apps/version.py
CHANGED
wolfhece/picc.py
CHANGED
@@ -183,7 +183,7 @@ class Cadaster_data(Picc_data):
|
|
183
183
|
self._filename_vector = 'Cadastre.shp'
|
184
184
|
self._filename_points = ''
|
185
185
|
|
186
|
-
def read_data(self, data_dir: Path = None, bbox:
|
186
|
+
def read_data(self, data_dir: Path = None, bbox:Union[Polygon, List[float]] = None, colorize: bool = True) -> None:
|
187
187
|
|
188
188
|
super().read_data(data_dir, bbox, colorize=False)
|
189
189
|
if self.zones is not None:
|
@@ -70,6 +70,7 @@ WOLF_BC = 'Wolf boundary conditions'
|
|
70
70
|
OTHER_SCRIPTS = 'Other scripts'
|
71
71
|
IS_SIMUL = 'is_simul'
|
72
72
|
IS_SCENARIO = 'is_scenario'
|
73
|
+
IS_RESULTS = 'is_results'
|
73
74
|
HAS_RESULTS = 'has_results'
|
74
75
|
MISSING = 'missing'
|
75
76
|
SUBDIRS = 'subdirs'
|
@@ -300,7 +301,10 @@ class Config_Manager_2D_GPU:
|
|
300
301
|
for key, curdict in self._flat_configs:
|
301
302
|
if GPU_2D_file_extensions.NPY.value in curdict.keys():
|
302
303
|
if len(curdict[GPU_2D_file_extensions.NPY.value])>0:
|
303
|
-
|
304
|
+
if not curdict[IS_RESULTS]:
|
305
|
+
all_numpy += curdict[GPU_2D_file_extensions.NPY.value]
|
306
|
+
else:
|
307
|
+
logging.warning(_('Numpy files in simulation directory -- Ignored !'))
|
304
308
|
|
305
309
|
return all_numpy
|
306
310
|
|
@@ -334,22 +338,36 @@ class Config_Manager_2D_GPU:
|
|
334
338
|
"""
|
335
339
|
Check consistency of all files
|
336
340
|
|
337
|
-
All numpy files must have the same shape as the tif file in
|
341
|
+
All numpy files must have the same shape as the tif file in the root directory
|
338
342
|
All hydrographs must have the same number of columns
|
339
343
|
"""
|
340
344
|
|
345
|
+
logging.info(_('Checking consistency of all files except simulation results...\n'))
|
346
|
+
|
347
|
+
logging.info(_('NPY files...'))
|
341
348
|
numpyfiles = self.get_all_numpy()
|
342
349
|
|
350
|
+
logging.info(_('Number of numpy files : {}'.format(len(numpyfiles))))
|
351
|
+
|
343
352
|
log = ''
|
344
353
|
for curnpy in numpyfiles:
|
345
|
-
|
354
|
+
|
355
|
+
# test if the shape of the numpy file is the same as the tif file
|
356
|
+
# using memmap to avoid loading the whole array in memory -> faster
|
357
|
+
arr = np.lib.format.open_memmap(curnpy, mode='r')
|
358
|
+
|
346
359
|
if arr.shape != (self._header.nbx, self._header.nby):
|
347
360
|
loclog = _('Bad shape for {} !'.format(curnpy))
|
348
361
|
log += loclog + '\n'
|
349
362
|
logging.warning(loclog)
|
350
363
|
|
364
|
+
del(arr)
|
365
|
+
|
366
|
+
logging.info(_('Hydrographs...'))
|
351
367
|
hydro = self.get_hydrographs()
|
352
368
|
nb = hydro[0].data.shape[1]
|
369
|
+
|
370
|
+
logging.info(_('Number of hydrographs : {}'.format(len(hydro))))
|
353
371
|
for curhydro in hydro:
|
354
372
|
if curhydro.data.shape[1] != nb:
|
355
373
|
loclog = _('Bad number of columns for {} !'.format(curhydro[0]._filename))
|
@@ -406,6 +424,9 @@ class Config_Manager_2D_GPU:
|
|
406
424
|
# test if it is a scenario
|
407
425
|
self._test_is_scenario(curdict)
|
408
426
|
|
427
|
+
# test if it is a results directory
|
428
|
+
self._test_is_results(curdict)
|
429
|
+
|
409
430
|
def _recursive_find_files(self, wd:Path, curdict:dict):
|
410
431
|
""" Recherche récursive des fichiers de simulation/scenario dans les répertoires dont la structure a été traduite en dictionnaire """
|
411
432
|
if len(curdict.keys())>0:
|
@@ -428,6 +449,7 @@ class Config_Manager_2D_GPU:
|
|
428
449
|
|
429
450
|
curdict[IS_SIMUL] = False
|
430
451
|
curdict[IS_SCENARIO] = False
|
452
|
+
curdict[IS_RESULTS] = False
|
431
453
|
curdict[HAS_RESULTS] = False
|
432
454
|
curdict[MISSING] = []
|
433
455
|
curdict[SUBDIRS] = []
|
@@ -454,14 +476,28 @@ class Config_Manager_2D_GPU:
|
|
454
476
|
curdict['missing'].append(GPU_2D_file_extensions.NPY.value)
|
455
477
|
ok = False
|
456
478
|
|
457
|
-
curdict[
|
479
|
+
curdict[IS_SIMUL] = ok
|
458
480
|
|
459
481
|
def _test_is_scenario(self, curdict:dict):
|
460
482
|
|
461
|
-
curdict[
|
483
|
+
curdict[IS_SCENARIO] = len(curdict[GPU_2D_file_extensions.TIF.value])>0 or \
|
462
484
|
len(curdict[GPU_2D_file_extensions.TIFF.value])>0 or \
|
463
485
|
len(curdict[GPU_2D_file_extensions.PY.value])>0
|
464
486
|
|
487
|
+
def _test_is_results(self, curdict:dict):
|
488
|
+
""" Teste si le répertoire contient des fichiers de résultats """
|
489
|
+
|
490
|
+
ok = False
|
491
|
+
|
492
|
+
# test du fichier 'metadata.json'
|
493
|
+
if GPU_2D_file_extensions.JSON.value in curdict.keys():
|
494
|
+
for curfile in curdict[GPU_2D_file_extensions.JSON.value]:
|
495
|
+
ok = curfile.name.lower() == 'metadata.json'
|
496
|
+
if ok:
|
497
|
+
break
|
498
|
+
|
499
|
+
curdict[IS_RESULTS] = ok
|
500
|
+
|
465
501
|
def find_files(self):
|
466
502
|
"""
|
467
503
|
Recehrche des fichiers de simulation/scenario dans les répertoires dont la structure a été traduite en dictionnaire
|
wolfhece/wolf_array.py
CHANGED
@@ -3327,21 +3327,40 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
3327
3327
|
myops: Ops_Array
|
3328
3328
|
|
3329
3329
|
def __init__(self,
|
3330
|
-
fname=None,
|
3331
|
-
mold=None,
|
3332
|
-
masknull=True,
|
3333
|
-
crop
|
3334
|
-
whichtype=WOLF_ARRAY_FULL_SINGLE,
|
3335
|
-
preload=True,
|
3336
|
-
create=False,
|
3337
|
-
mapviewer=None,
|
3338
|
-
nullvalue=0.,
|
3339
|
-
srcheader=None,
|
3340
|
-
idx:str
|
3341
|
-
plotted:bool
|
3342
|
-
need_for_wx:bool
|
3343
|
-
mask_source:np.ndarray = None,
|
3330
|
+
fname:str = None,
|
3331
|
+
mold:"WolfArray" = None,
|
3332
|
+
masknull:bool = True,
|
3333
|
+
crop:list[list[float],list[float]]=None,
|
3334
|
+
whichtype = WOLF_ARRAY_FULL_SINGLE,
|
3335
|
+
preload:bool = True,
|
3336
|
+
create:bool = False,
|
3337
|
+
mapviewer = None,
|
3338
|
+
nullvalue:float = 0.,
|
3339
|
+
srcheader:header_wolf = None,
|
3340
|
+
idx:str = '',
|
3341
|
+
plotted:bool = False,
|
3342
|
+
need_for_wx:bool = False,
|
3343
|
+
mask_source:np.ndarray = None,
|
3344
3344
|
) -> None:
|
3345
|
+
"""
|
3346
|
+
|
3347
|
+
:param fname: filename/filepath - if provided, the file will be read on disk
|
3348
|
+
:param mold: initialize from a copy a the mold object --> must be a WolArray
|
3349
|
+
:param masknull: mask data based on the nullvalue
|
3350
|
+
:param crop: crop data based on the spatial extent [[xmin, xmax],[ymin,ymax]]
|
3351
|
+
:param whichtype: type of the numpy array (float32 as default)
|
3352
|
+
:param preload: True = load data during initialization ; False = waits for the display to be required
|
3353
|
+
:param create: True = create a new array from wxDialog
|
3354
|
+
:param mapviewer: WolfMapViewer instance to display data
|
3355
|
+
:param nullvalue: null value used to mask data
|
3356
|
+
:param srcheader: initialize dimension from header_wolf instance
|
3357
|
+
:param idx: indentity --> required by the mapviewer
|
3358
|
+
:param plotted: True = will be plotted if required by the mapviewer
|
3359
|
+
:param need_for_wx: True = a wxApp is required (if no application is underway --> Error)
|
3360
|
+
:param mask_source: mask to link to the data
|
3361
|
+
|
3362
|
+
"""
|
3363
|
+
|
3345
3364
|
|
3346
3365
|
Element_To_Draw.__init__(self, idx, plotted, mapviewer, need_for_wx)
|
3347
3366
|
header_wolf.__init__(self)
|
@@ -3431,21 +3450,45 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
3431
3450
|
self.mask_data(self.nullvalue)
|
3432
3451
|
|
3433
3452
|
elif mold is not None:
|
3434
|
-
self.
|
3435
|
-
|
3436
|
-
|
3437
|
-
|
3438
|
-
|
3439
|
-
|
3440
|
-
|
3441
|
-
|
3442
|
-
|
3443
|
-
|
3444
|
-
|
3445
|
-
|
3446
|
-
|
3447
|
-
|
3448
|
-
|
3453
|
+
if self.cropini is None:
|
3454
|
+
self.nbx = mold.nbx
|
3455
|
+
self.nby = mold.nby
|
3456
|
+
self.nbz = mold.nbz
|
3457
|
+
self.dx = mold.dx
|
3458
|
+
self.dy = mold.dy
|
3459
|
+
self.dz = mold.dz
|
3460
|
+
self.origx = mold.origx
|
3461
|
+
self.origy = mold.origy
|
3462
|
+
self.origz = mold.origz
|
3463
|
+
self.translx = mold.translx
|
3464
|
+
self.transly = mold.transly
|
3465
|
+
self.translz = mold.translz
|
3466
|
+
self.array = ma.copy(mold.array)
|
3467
|
+
if idx=='':
|
3468
|
+
self.idx = mold.idx
|
3469
|
+
else:
|
3470
|
+
imin, jmin = mold.get_ij_from_xy(self.cropini[0][0], self.cropini[1][0])
|
3471
|
+
imax, jmax = mold.get_ij_from_xy(self.cropini[0][1], self.cropini[1][1])
|
3472
|
+
|
3473
|
+
imin = int(imin)
|
3474
|
+
jmin = int(jmin)
|
3475
|
+
imax = int(imax)
|
3476
|
+
jmax = int(jmax)
|
3477
|
+
|
3478
|
+
self.nbx = imax - imin
|
3479
|
+
self.nby = jmax - jmin
|
3480
|
+
self.dx = mold.dx
|
3481
|
+
self.dy = mold.dy
|
3482
|
+
self.origx, self.origy = mold.get_xy_from_ij(imin, jmin)
|
3483
|
+
self.origx -= self.dx / 2.
|
3484
|
+
self.origy -= self.dy / 2.
|
3485
|
+
self.translx = mold.translx
|
3486
|
+
self.transly = mold.transly
|
3487
|
+
|
3488
|
+
if idx=='':
|
3489
|
+
self.idx = mold.idx
|
3490
|
+
|
3491
|
+
self.array = ma.copy(mold.array[imin:imax, jmin:jmax])
|
3449
3492
|
|
3450
3493
|
elif create:
|
3451
3494
|
assert self.wx_exists, _('Array creation required a running wx App to display the UI')
|
@@ -3459,6 +3502,32 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
3459
3502
|
|
3460
3503
|
self.add_ops_sel() # Ajout d'un gestionnaire de sélection et d'opérations
|
3461
3504
|
|
3505
|
+
def crop_array(self, bbox:list[list[float],list[float]]) -> "WolfArray":
|
3506
|
+
""" Crop the data based on the bounding box """
|
3507
|
+
imin, jmin = self.get_ij_from_xy(bbox[0][0], bbox[1][0])
|
3508
|
+
imax, jmax = self.get_ij_from_xy(bbox[0][1], bbox[1][1])
|
3509
|
+
|
3510
|
+
imin = int(imin)
|
3511
|
+
jmin = int(jmin)
|
3512
|
+
imax = int(imax)
|
3513
|
+
jmax = int(jmax)
|
3514
|
+
|
3515
|
+
newheader = header_wolf()
|
3516
|
+
newheader.nbx = imax-imin
|
3517
|
+
newheader.nby = jmax-jmin
|
3518
|
+
newheader.dx = self.dx
|
3519
|
+
newheader.dy = self.dy
|
3520
|
+
newheader.origx, newheader.origy = self.get_xy_from_ij(imin, jmin)
|
3521
|
+
newheader.origx -= self.dx / 2.
|
3522
|
+
newheader.origy -= self.dy / 2.
|
3523
|
+
newheader.translx = self.translx
|
3524
|
+
newheader.transly = self.transly
|
3525
|
+
|
3526
|
+
newarray = WolfArray(srcheader=newheader)
|
3527
|
+
|
3528
|
+
newarray.array[:,:] = self.array[imin:imax, jmin:jmax]
|
3529
|
+
|
3530
|
+
return newarray
|
3462
3531
|
|
3463
3532
|
def get_centers(self, usenap:bool = True):
|
3464
3533
|
""" Get the centers of the cells """
|
@@ -4951,7 +5020,7 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
4951
5020
|
myvect.find_minmax()
|
4952
5021
|
mypointsij = self.get_ij_infootprint_vect(myvect)
|
4953
5022
|
myvert = myvect.asnparray()
|
4954
|
-
i,j =self.
|
5023
|
+
i,j =self.convert_xy2ij_np(myvert)
|
4955
5024
|
path = mpltPath.Path(np.column_stack([i,j]))
|
4956
5025
|
inside = path.contains_points(mypointsij)
|
4957
5026
|
|
@@ -5109,6 +5178,8 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
5109
5178
|
self.origy = float(params['parameters']["base_coord_y"])
|
5110
5179
|
|
5111
5180
|
self.nullvalue = 99999.
|
5181
|
+
elif (locpath /'.txt').exists():
|
5182
|
+
self.read_txt_header()
|
5112
5183
|
|
5113
5184
|
self.mask_data(self.nullvalue)
|
5114
5185
|
self.loaded = True
|
@@ -5135,6 +5206,9 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
5135
5206
|
|
5136
5207
|
if self.filename.endswith('.tif'):
|
5137
5208
|
self.export_geotif()
|
5209
|
+
elif self.filename.endswith('.npy'):
|
5210
|
+
np.save(self.filename, self.array.data)
|
5211
|
+
self.write_txt_header()
|
5138
5212
|
else:
|
5139
5213
|
self.write_txt_header()
|
5140
5214
|
self.write_array()
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: wolfhece
|
3
|
-
Version: 2.0.
|
3
|
+
Version: 2.0.32
|
4
4
|
Author-email: Stéphane Champailler <stephane.champailler@uliege.be>, Pierre Archambeau <pierre.archambeau@uliege.be>
|
5
5
|
Project-URL: Homepage, https://uee.uliege.be/hece
|
6
6
|
Project-URL: Issues, https://uee.uliege.be/hece
|
@@ -6,7 +6,7 @@ wolfhece/ManageParams.py,sha256=Wgt5Zh7QBtyiwTAltPHunSLqt4XuVuRH76GTUrXabS4,219
|
|
6
6
|
wolfhece/Model1D.py,sha256=jo2gE8VSzQZR6cQvldihbdCcf3C3XD1VR0bvBQsFe7Y,414892
|
7
7
|
wolfhece/PyConfig.py,sha256=oGSL1WsLM9uinlNP4zGBLK3uHPmBfduUi7R-VtWuRFA,8034
|
8
8
|
wolfhece/PyCrosssections.py,sha256=kdNv8dHKtp_gS1yj_QYvLUkvCwk82G1TMlneL6MDCjg,112279
|
9
|
-
wolfhece/PyDraw.py,sha256=
|
9
|
+
wolfhece/PyDraw.py,sha256=GpLLs-UU9s_BvUNtqfw2DGmF1FStcQUzlzU922dcTrk,334579
|
10
10
|
wolfhece/PyGui.py,sha256=_Y7ZE6JRIh5oYsQ4y2IFBiGGq3yEVwB4Sey4xcjffaY,53702
|
11
11
|
wolfhece/PyGuiHydrology.py,sha256=wKhR-KthPRyzJ887NmsozmUpm2CIQIwO3IbYORCYjrE,7290
|
12
12
|
wolfhece/PyHydrographs.py,sha256=GKK8U0byI45H9O_e4LAOOi7Aw0Tg7Q0Lx322stPg5IQ,3453
|
@@ -15,7 +15,7 @@ wolfhece/PyParams.py,sha256=23g3xGG1EVDQEXshrZzAKBaZkTP7K3EB7vbWfpAGcEI,84639
|
|
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=cLSzuGIy3qLDyYQt5efBiR3IM1Tcz_jtTWwOcIbWFAM,39527
|
18
|
-
wolfhece/PyVertexvectors.py,sha256=
|
18
|
+
wolfhece/PyVertexvectors.py,sha256=oqTNFy52-m58-nmwLpW0aPcWKZdVBqGOHe_Z4XU3OQE,203401
|
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
|
@@ -35,7 +35,7 @@ wolfhece/ins.py,sha256=0aU1mo4tYbw64Gwzrqbh-NCTH1tukmk0mpPHjRPHZXU,12661
|
|
35
35
|
wolfhece/irm_qdf.py,sha256=0nOU_usEZuWMwYOPV9qtZoWsQTn2x2DxOuk7VlYMkbo,15419
|
36
36
|
wolfhece/ismember.py,sha256=fkLvaH9fhx-p0QrlEzqa6ySO-ios3ysjAgXVXzLgSpY,2482
|
37
37
|
wolfhece/multiprojects.py,sha256=AMwEQZqo1Twh6tSPP-4L29-Fa8cI9d6dWce7l88awws,14675
|
38
|
-
wolfhece/picc.py,sha256=
|
38
|
+
wolfhece/picc.py,sha256=WAAOMSCSjH_Inm7RHOX7YMkA3TuJnSLNCqVQXpKhXFY,7350
|
39
39
|
wolfhece/pyGui1D.py,sha256=7m8BpsdbxRVFc4bEkG4ctFG9TT4xIL8TuwBu9neA8jE,116516
|
40
40
|
wolfhece/pybridges.py,sha256=HJ1BL1HC7UrgpQ-3jKXkqPFmc-TzToL28Uex2hjHk6c,57166
|
41
41
|
wolfhece/pydike.py,sha256=G4jfSZaAHHr4VWEJqnXSvEswXvlOz1yhbhQ6uu3AqyM,1943
|
@@ -47,7 +47,7 @@ wolfhece/pywalous.py,sha256=jwp251AzGBc0VmMzOqA0IJiRRa6yQIfccRM8lVGszIY,4474
|
|
47
47
|
wolfhece/rain_SPWMI.py,sha256=YqsF-yFro3y_a6MfVRFfr-Rxi7NR1gl_i8VX7scmzes,13548
|
48
48
|
wolfhece/textpillow.py,sha256=YJxF4JzPv3G1oqenJgWVYq3OPZx9iFtrmeIfvBwbJVU,8735
|
49
49
|
wolfhece/tools_mpl.py,sha256=q8Yc4aukPPiUcEzREvZRM_em67XqXaahdoaNt0DETfE,266
|
50
|
-
wolfhece/wolf_array.py,sha256=
|
50
|
+
wolfhece/wolf_array.py,sha256=zTrv6hofObnNpNDsPPPG0eoDGhwII0XbaUi9VZFcB7s,285509
|
51
51
|
wolfhece/wolf_hist.py,sha256=JpRXvzJLUP-RkSkvth3DQWglgTMFI2ZEUDb4RYOfeeI,3284
|
52
52
|
wolfhece/wolf_texture.py,sha256=quflEvi32lWSvOPa0aDCDl-8Jv-jGtLHbR2rdx67LsI,14883
|
53
53
|
wolfhece/wolf_tiles.py,sha256=F2JsJHdAP8fIffNJdG_J26bonCIRtIwMmxKFqdSCRDA,10088
|
@@ -64,7 +64,7 @@ wolfhece/apps/check_install.py,sha256=jrKR-njqnpIh6ZJqvP6KbDUPVCfwTNQj4glQhcyzs9
|
|
64
64
|
wolfhece/apps/curvedigitizer.py,sha256=avWERHuVxPnJBOD_ibczwW_XG4vAenqWS8W1zjhBox8,4898
|
65
65
|
wolfhece/apps/isocurrent.py,sha256=4XnNWPa8mYUK7V4zdDRFrHFIXNG2AN2og3TqWKKcqjY,3811
|
66
66
|
wolfhece/apps/splashscreen.py,sha256=m9hMTqzhSUcTudApyNNjoAK9e2u5vgEkJVV79xmfM1s,2118
|
67
|
-
wolfhece/apps/version.py,sha256=
|
67
|
+
wolfhece/apps/version.py,sha256=vT9pd_afsI6ey7hOlnBO0_Aek2ZYxkqtXeuREpTZs44,388
|
68
68
|
wolfhece/apps/wolf.py,sha256=gqfm-ZaUJqNsfCzmdtemSeqLw-GVdSVix-evg5WArJI,293
|
69
69
|
wolfhece/apps/wolf2D.py,sha256=gWD9ee2-1pw_nUxjgRaJMuSe4kUT-RWhOeoTt_Lh1mM,267
|
70
70
|
wolfhece/apps/wolfcompare2Darrays.py,sha256=MucG5h4sU4jicDVCKohiCDUVUqx_RQ1qKrZKokpnxhQ,3743
|
@@ -231,7 +231,7 @@ wolfhece/rem/RasterViz.py,sha256=TDhWyMppcYBL71HfhpZuMgYKhz7faZg-MEOQJo_3Ivo,291
|
|
231
231
|
wolfhece/rem/__init__.py,sha256=S2-J5uEGK_VaMFjRUYFIdSScJjZyuXH4RmMmnG3OG7I,19
|
232
232
|
wolfhece/scenario/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
233
233
|
wolfhece/scenario/check_scenario.py,sha256=Q0_jA3PYapcbCT881YojTwKoRi_RjZpevHXhtP9VoqE,4619
|
234
|
-
wolfhece/scenario/config_manager.py,sha256
|
234
|
+
wolfhece/scenario/config_manager.py,sha256=YTn1tSMxLCcHjAWotfzfj7_1E7SS53k7xdSl7TSyLmE,62575
|
235
235
|
wolfhece/scenario/imposebc_void.py,sha256=pl7c99HQQMQT7i15fDlOOFYCdOtR5c_XIBOveOTOaLc,5273
|
236
236
|
wolfhece/scenario/update_void.py,sha256=MmiDiwWHvuk0mpXOlMeB2ImY-d1Wi3Wfmg9hrDTAraE,7176
|
237
237
|
wolfhece/shaders/fragment_shader_texture.glsl,sha256=w6h8d5mJqFaGbao0LGmjRcFFdcEQ3ICIl9JpuT71K5k,177
|
@@ -252,8 +252,8 @@ wolfhece/sounds/sonsw2.wav,sha256=pFLVt6By0_EPQNt_3KfEZ9a1uSuYTgQSX1I_Zurv9Rc,11
|
|
252
252
|
wolfhece/ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
253
253
|
wolfhece/ui/wolf_multiselection_collapsiblepane.py,sha256=yGbU_JsF56jsmms0gh7mxa7tbNQ_SxqhpAZxhm-mTy4,14860
|
254
254
|
wolfhece/ui/wolf_times_selection_comparison_models.py,sha256=wCxGRnE3kzEkWlWA6-3X8ADOFux_B0a5QWJ2GnXTgJw,4709
|
255
|
-
wolfhece-2.0.
|
256
|
-
wolfhece-2.0.
|
257
|
-
wolfhece-2.0.
|
258
|
-
wolfhece-2.0.
|
259
|
-
wolfhece-2.0.
|
255
|
+
wolfhece-2.0.32.dist-info/METADATA,sha256=HcLDc0Nb55f64UqgUm84CdYGLCGDIiVQIqOGz6X5fV8,2262
|
256
|
+
wolfhece-2.0.32.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
257
|
+
wolfhece-2.0.32.dist-info/entry_points.txt,sha256=AIu1KMswrdsqNq_2jPtrRIU4tLjuTnj2dCY-pxIlshw,276
|
258
|
+
wolfhece-2.0.32.dist-info/top_level.txt,sha256=EfqZXMVCn7eILUzx9xsEu2oBbSo9liWPFWjIHik0iCI,9
|
259
|
+
wolfhece-2.0.32.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|