wolfhece 2.1.52__py3-none-any.whl → 2.1.53__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 +211 -3
- wolfhece/apps/version.py +1 -1
- wolfhece/lazviewer/laz_viewer.py +19 -11
- wolfhece/wolf_array.py +53 -3
- wolfhece/wolfresults_2D.py +30 -0
- {wolfhece-2.1.52.dist-info → wolfhece-2.1.53.dist-info}/METADATA +1 -1
- {wolfhece-2.1.52.dist-info → wolfhece-2.1.53.dist-info}/RECORD +10 -10
- {wolfhece-2.1.52.dist-info → wolfhece-2.1.53.dist-info}/WHEEL +0 -0
- {wolfhece-2.1.52.dist-info → wolfhece-2.1.53.dist-info}/entry_points.txt +0 -0
- {wolfhece-2.1.52.dist-info → wolfhece-2.1.53.dist-info}/top_level.txt +0 -0
wolfhece/PyDraw.py
CHANGED
@@ -179,7 +179,7 @@ class DragdropFileTarget(wx.FileDropTarget):
|
|
179
179
|
id = id + '_1'
|
180
180
|
|
181
181
|
try:
|
182
|
-
newobj = WolfArray(fname=name)
|
182
|
+
newobj = WolfArray(fname=name, mapviewer= self.window)
|
183
183
|
self.window.add_object('array', newobj = newobj, id = id)
|
184
184
|
except:
|
185
185
|
logging.error(_('Error while loading array : ') + name)
|
@@ -191,7 +191,7 @@ class DragdropFileTarget(wx.FileDropTarget):
|
|
191
191
|
id = id + '_1'
|
192
192
|
|
193
193
|
try:
|
194
|
-
newobj = WolfArrayMB(fname=name)
|
194
|
+
newobj = WolfArrayMB(fname=name, mapviewer= self.window)
|
195
195
|
self.window.add_object('array', newobj = newobj, id = id)
|
196
196
|
except:
|
197
197
|
logging.error(_('Error while loading array : ') + name)
|
@@ -203,7 +203,7 @@ class DragdropFileTarget(wx.FileDropTarget):
|
|
203
203
|
id = id + '_1'
|
204
204
|
|
205
205
|
try:
|
206
|
-
newobj = Zones(filename=name, parent=self.window)
|
206
|
+
newobj = Zones(filename=name, parent=self.window, mapviewer=self.window)
|
207
207
|
self.window.add_object('vector', newobj = newobj, id = id)
|
208
208
|
except:
|
209
209
|
logging.error(_('Error while loading vector : ') + name)
|
@@ -879,6 +879,8 @@ class WolfMapViewer(wx.Frame):
|
|
879
879
|
aroundlaz = self.menulaz.Append(wx.ID_ANY, _('Plot LAZ around active vector'), _('Display a Matplotlib plot with the LAZ values around the active vector/polyline'),)
|
880
880
|
pick_aroundlaz = self.menulaz.Append(wx.ID_ANY, _('Plot LAZ around temporary vector'), _('Display a Matplotlib plot with the LAZ values around a temporary vector/polyline -- Right clicks to add points + Enter'),)
|
881
881
|
updatecolors_laz = self.menulaz.Append(wx.ID_ANY, _('Change colors - Classification'), _('Change color map associated to the current classification'),)
|
882
|
+
fillarray_laz = self.menulaz.Append(wx.ID_ANY, _('Fill active array from LAZ data'), _('Fill an array from the LAZ data'),)
|
883
|
+
selectarray_laz = self.menulaz.Append(wx.ID_ANY, _('Select cells in array from LAZ data'), _('Select nodes in active array from the LAZ data'),)
|
882
884
|
|
883
885
|
def menu_wolf2d(self):
|
884
886
|
|
@@ -3885,6 +3887,159 @@ class WolfMapViewer(wx.Frame):
|
|
3885
3887
|
|
3886
3888
|
logging.info(_('Clip LAZ grid on current zoom {}-{} {}-{}').format(curbounds[0][0],curbounds[0][1],curbounds[1][0],curbounds[1][1]))
|
3887
3889
|
|
3890
|
+
def select_active_array_from_laz(self, array:WolfArray = None, used_codes:list = None):
|
3891
|
+
""" select some nodes from laz data
|
3892
|
+
|
3893
|
+
:param array: array to fill
|
3894
|
+
:param used_codes: codes to use
|
3895
|
+
"""
|
3896
|
+
if self.mylazgrid is None:
|
3897
|
+
return
|
3898
|
+
|
3899
|
+
if array is None:
|
3900
|
+
logging.error(_('No array'))
|
3901
|
+
return
|
3902
|
+
|
3903
|
+
curbounds = array.get_bounds()
|
3904
|
+
|
3905
|
+
logging.info(_('Scan Laz grid on current zoom {}-{} {}-{}').format(curbounds[0][0],curbounds[0][1],curbounds[1][0],curbounds[1][1]))
|
3906
|
+
self.mylazdata = self.mylazgrid.scan(curbounds)
|
3907
|
+
logging.info(_('Scan done'))
|
3908
|
+
|
3909
|
+
if used_codes is not None:
|
3910
|
+
self.mylazdata = self.mylazdata[self.mylazdata[:, 3] in np.asarray(used_codes, dtype=np.float32)]
|
3911
|
+
else:
|
3912
|
+
keycode = [key for key,val in self.mylazgrid.colors.classification.items()]
|
3913
|
+
names = [val[0] for key,val in self.mylazgrid.colors.classification.items()]
|
3914
|
+
|
3915
|
+
with wx.MultiChoiceDialog(None, _('Choose the codes to use'), _('Codes'), names) as dlg:
|
3916
|
+
if dlg.ShowModal() == wx.ID_OK:
|
3917
|
+
data = {}
|
3918
|
+
used_codes = dlg.GetSelections()
|
3919
|
+
used_codes = [float(keycode[cur]) for cur in used_codes]
|
3920
|
+
|
3921
|
+
for curcode in used_codes:
|
3922
|
+
data[curcode] = self.mylazdata[self.mylazdata[:, 3] == curcode]
|
3923
|
+
else:
|
3924
|
+
return
|
3925
|
+
|
3926
|
+
for curdata in data.values():
|
3927
|
+
|
3928
|
+
if curdata.shape[0] == 0:
|
3929
|
+
continue
|
3930
|
+
|
3931
|
+
i,j = array.get_ij_from_xy(curdata[:, 0], curdata[:, 1]) #= np.float32(self.mylazdata[:, 2])
|
3932
|
+
|
3933
|
+
keys = np.vstack((i,j)).T
|
3934
|
+
|
3935
|
+
# unique keys
|
3936
|
+
keys = np.unique(keys, axis=0)
|
3937
|
+
|
3938
|
+
array.SelectionData._add_nodes_to_selectionij(keys, verif = False)
|
3939
|
+
|
3940
|
+
array.SelectionData.update_nb_nodes_selection()
|
3941
|
+
self.Paint()
|
3942
|
+
|
3943
|
+
logging.info(_('Selection done'))
|
3944
|
+
|
3945
|
+
def fill_active_array_from_laz(self, array:WolfArray = None, used_codes:list = None, operator:int = None):
|
3946
|
+
""" Fill active array with laz data
|
3947
|
+
|
3948
|
+
:param array: array to fill
|
3949
|
+
:param used_codes: codes to use
|
3950
|
+
:param operator: operator to use
|
3951
|
+
"""
|
3952
|
+
if self.mylazgrid is None:
|
3953
|
+
return
|
3954
|
+
|
3955
|
+
if array is None:
|
3956
|
+
logging.error(_('No array'))
|
3957
|
+
return
|
3958
|
+
|
3959
|
+
curbounds = array.get_bounds()
|
3960
|
+
|
3961
|
+
logging.info(_('Scan Laz grid on current zoom {}-{} {}-{}').format(curbounds[0][0],curbounds[0][1],curbounds[1][0],curbounds[1][1]))
|
3962
|
+
self.mylazdata = self.mylazgrid.scan(curbounds)
|
3963
|
+
logging.info(_('Scan done'))
|
3964
|
+
|
3965
|
+
if used_codes is not None:
|
3966
|
+
self.mylazdata = self.mylazdata[self.mylazdata[:, 3] in np.asarray(used_codes, dtype=np.float32)]
|
3967
|
+
else:
|
3968
|
+
keycode = [key for key,val in self.mylazgrid.colors.classification.items()]
|
3969
|
+
names = [val[0] for key,val in self.mylazgrid.colors.classification.items()]
|
3970
|
+
|
3971
|
+
with wx.MultiChoiceDialog(None, _('Choose the codes to use'), _('Codes'), names) as dlg:
|
3972
|
+
if dlg.ShowModal() == wx.ID_OK:
|
3973
|
+
data = {}
|
3974
|
+
used_codes = dlg.GetSelections()
|
3975
|
+
used_codes = [float(keycode[cur]) for cur in used_codes]
|
3976
|
+
|
3977
|
+
for curcode in used_codes:
|
3978
|
+
data[curcode] = self.mylazdata[self.mylazdata[:, 3] == curcode]
|
3979
|
+
else:
|
3980
|
+
return
|
3981
|
+
|
3982
|
+
if operator is None:
|
3983
|
+
with wx.SingleChoiceDialog(None, _('Choose the operator'), _('Operator'), ['max', 'min', 'mean', 'median', 'sum']) as dlg:
|
3984
|
+
if dlg.ShowModal() == wx.ID_OK:
|
3985
|
+
if dlg.GetStringSelection() == 'max':
|
3986
|
+
operator = np.max
|
3987
|
+
elif dlg.GetStringSelection() == 'min':
|
3988
|
+
operator = np.min
|
3989
|
+
elif dlg.GetStringSelection() == 'mean':
|
3990
|
+
operator = np.mean
|
3991
|
+
elif dlg.GetStringSelection() == 'median':
|
3992
|
+
operator = np.median
|
3993
|
+
elif dlg.GetStringSelection() == 'sum':
|
3994
|
+
operator = np.sum
|
3995
|
+
else:
|
3996
|
+
return
|
3997
|
+
|
3998
|
+
for curdata in data.values():
|
3999
|
+
|
4000
|
+
if curdata.shape[0] == 0:
|
4001
|
+
continue
|
4002
|
+
|
4003
|
+
i,j = array.get_ij_from_xy(curdata[:, 0], curdata[:, 1]) #= np.float32(self.mylazdata[:, 2])
|
4004
|
+
|
4005
|
+
# sort i, j and z
|
4006
|
+
i = np.asarray(i, dtype=np.int32)
|
4007
|
+
j = np.asarray(j, dtype=np.int32)
|
4008
|
+
z = np.asarray(curdata[:, 2], dtype=np.float32)
|
4009
|
+
|
4010
|
+
keys = np.vstack((i,j)).T
|
4011
|
+
|
4012
|
+
ijz = np.hstack((keys,z.reshape(-1,1)))
|
4013
|
+
|
4014
|
+
# unique keys
|
4015
|
+
keys = np.unique(keys, axis=0)
|
4016
|
+
|
4017
|
+
ijz = ijz[np.lexsort((ijz[:,1], ijz[:,0]))]
|
4018
|
+
|
4019
|
+
# find first element of each key
|
4020
|
+
idx = np.where(np.diff(ijz[:,0]) + np.diff(ijz[:,1]) != 0)[0]
|
4021
|
+
idx = np.concatenate((idx, [ijz.shape[0]]))
|
4022
|
+
|
4023
|
+
# apply operator
|
4024
|
+
vals = {}
|
4025
|
+
start_ii = 0
|
4026
|
+
for ii, key in enumerate(keys):
|
4027
|
+
|
4028
|
+
end_ii = idx[ii]+1
|
4029
|
+
if key[0] >=0 and key[0] < array.nbx and key[1] >=0 and key[1] < array.nby:
|
4030
|
+
vals[(key[0], key[1])] = operator(ijz[start_ii:end_ii,2])
|
4031
|
+
start_ii = end_ii
|
4032
|
+
|
4033
|
+
# create a new ijz array
|
4034
|
+
newijz = np.asarray([[key[0], key[1], val] for key, val in vals.items()], dtype = np.float32)
|
4035
|
+
|
4036
|
+
array.fillin_from_ijz(newijz)
|
4037
|
+
|
4038
|
+
array.reset_plot()
|
4039
|
+
self.Paint()
|
4040
|
+
|
4041
|
+
logging.info(_('Filling done'))
|
4042
|
+
|
3888
4043
|
def init_laz_from_numpy(self, fn=None):
|
3889
4044
|
""" Read LAZ data stored in numpy array"""
|
3890
4045
|
|
@@ -4840,6 +4995,28 @@ class WolfMapViewer(wx.Frame):
|
|
4840
4995
|
autoscale=False
|
4841
4996
|
self.clip_laz_gridded()
|
4842
4997
|
|
4998
|
+
elif itemlabel == _('Fill active array from LAZ data'):
|
4999
|
+
if self.mylazgrid is None:
|
5000
|
+
logging.warning('')
|
5001
|
+
return
|
5002
|
+
if self.active_array is None:
|
5003
|
+
logging.warning(_('No active array -- select an array first and retry!'))
|
5004
|
+
return
|
5005
|
+
|
5006
|
+
autoscale = False
|
5007
|
+
self.fill_active_array_from_laz(self.active_array)
|
5008
|
+
|
5009
|
+
elif itemlabel == _('Select cells in array from LAZ data'):
|
5010
|
+
if self.mylazgrid is None:
|
5011
|
+
logging.warning('')
|
5012
|
+
return
|
5013
|
+
if self.active_array is None:
|
5014
|
+
logging.warning(_('No active array -- select an array first and retry!'))
|
5015
|
+
return
|
5016
|
+
|
5017
|
+
autoscale = False
|
5018
|
+
self.select_active_array_from_laz(self.active_array)
|
5019
|
+
|
4843
5020
|
elif itemlabel == _('Plot LAZ around active vector'):
|
4844
5021
|
|
4845
5022
|
self.plot_laz_around_active_vec()
|
@@ -8136,6 +8313,9 @@ class WolfMapViewer(wx.Frame):
|
|
8136
8313
|
# i : interpolation2D sur base de la sélection sur la matrice courante\n \
|
8137
8314
|
# +,- (numpad) : augmente ou diminue la taille des flèches de resultats 2D\n \
|
8138
8315
|
# \n \
|
8316
|
+
# o, O : Gestion de la transparence de la matrice courante\n \
|
8317
|
+
# CTRL+o, CTRL+O : Gestion de la transparence du résultat courant\n \
|
8318
|
+
# \n \
|
8139
8319
|
# !! ACTIONs !!\n \
|
8140
8320
|
# N : sélection noeud par noeud de la matrice courante\n \
|
8141
8321
|
# B : sélection par vecteur temporaire de la matrice courante\n \
|
@@ -8179,6 +8359,11 @@ class WolfMapViewer(wx.Frame):
|
|
8179
8359
|
'c or C': _('Drawing : copy canvas to Clipboard wo axes'),
|
8180
8360
|
'CTRL+C': _('Drawing : copy canvas to Clipboard as Matplotlib image'),
|
8181
8361
|
|
8362
|
+
'CTRL+o': _('Results : increase transparency of the current result'),
|
8363
|
+
'CTRL+O': _('Results : decrease transparency of the current result'),
|
8364
|
+
'o': _('Arrays : increase transparency of the current array'),
|
8365
|
+
'O': _('Arrays : decrease transparency of the current array'),
|
8366
|
+
|
8182
8367
|
'F9': _('Arrays : select all cells'),
|
8183
8368
|
'F11': _('Arrays : select by criteria'),
|
8184
8369
|
'F12': _('Arrays : operations'),
|
@@ -8701,6 +8886,29 @@ class WolfMapViewer(wx.Frame):
|
|
8701
8886
|
self.active_array.myops.reset_selection()
|
8702
8887
|
self.Refresh()
|
8703
8888
|
|
8889
|
+
elif key == ord('O'):
|
8890
|
+
# Active Opacity for the active array
|
8891
|
+
|
8892
|
+
if ctrldown:
|
8893
|
+
if self.active_res2d is None:
|
8894
|
+
logging.warning(_('No active result 2D to change the opacity !'))
|
8895
|
+
return
|
8896
|
+
|
8897
|
+
if shiftdown:
|
8898
|
+
self.active_res2d.set_opacity(self.active_res2d.alpha + 0.25)
|
8899
|
+
else:
|
8900
|
+
self.active_res2d.set_opacity(self.active_res2d.alpha - 0.25)
|
8901
|
+
|
8902
|
+
else:
|
8903
|
+
if self.active_array is None:
|
8904
|
+
logging.warning(_('No active array to change the opacity !'))
|
8905
|
+
return
|
8906
|
+
|
8907
|
+
if shiftdown:
|
8908
|
+
self.active_array.set_opacity(self.active_array.alpha + 0.25)
|
8909
|
+
else:
|
8910
|
+
self.active_array.set_opacity(self.active_array.alpha - 0.25)
|
8911
|
+
|
8704
8912
|
elif key == wx.WXK_UP:
|
8705
8913
|
self.mousey = self.mousey + self.height / 10.
|
8706
8914
|
self.setbounds()
|
wolfhece/apps/version.py
CHANGED
wolfhece/lazviewer/laz_viewer.py
CHANGED
@@ -261,13 +261,23 @@ class xyz_laz():
|
|
261
261
|
y=np.frombuffer(f.read(blocsize),dtype_file)
|
262
262
|
z=np.frombuffer(f.read(nbloc*4),np.float32)
|
263
263
|
classi=np.frombuffer(f.read(nbloc),np.int8)
|
264
|
+
|
264
265
|
count+=4+(2*blocsize+nbloc*(4+1))
|
265
266
|
|
266
|
-
if
|
267
|
-
|
268
|
-
myret=np.array([x,y,z,classi]).transpose()
|
267
|
+
if classi.shape[0] != nbloc:
|
268
|
+
logging.warning(_('Bad classification size - file {}'.format(fn)))
|
269
269
|
else:
|
270
|
-
|
270
|
+
if len(myret)==0:
|
271
|
+
# dt=[('x',np.float32),('y',np.float32),('z',np.float32),('classification',np.int8)]
|
272
|
+
myret=np.array([x,y,z,classi]).transpose()
|
273
|
+
else:
|
274
|
+
if len(x)>1:
|
275
|
+
added = np.array([x,y,z,classi]).transpose()
|
276
|
+
|
277
|
+
if myret.shape[1] == added.shape[1]:
|
278
|
+
myret=np.concatenate((myret,added))
|
279
|
+
else:
|
280
|
+
logging.warning(_('Incompatible shapes'))
|
271
281
|
|
272
282
|
# Format Numpy
|
273
283
|
self.data = myret
|
@@ -485,11 +495,9 @@ class xyz_laz_grids():
|
|
485
495
|
"""
|
486
496
|
Scan all LAZ to find used data
|
487
497
|
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
Returns:
|
492
|
-
_type_: np.ndarray
|
498
|
+
:param bounds: [[xmin,xmax], [ymin,ymax]]
|
499
|
+
:type bounds: Union[tuple[tuple[float,float],tuple[float,float]], list[list[float, float],list[float, float]]]
|
500
|
+
:return: np.ndarray
|
493
501
|
"""
|
494
502
|
ret = [cur.scan(bounds) for cur in self.grids]
|
495
503
|
ret = [cur for cur in ret if len(cur)>0]
|
@@ -637,8 +645,8 @@ def find_pointsXYZ(xyz:np.ndarray, bounds:Union[tuple[tuple[float,float],tuple[f
|
|
637
645
|
xb=bounds[0]
|
638
646
|
yb=bounds[1]
|
639
647
|
# Get arrays which indicate invalid X, Y, or Z values.
|
640
|
-
X_valid = (xb[0] <= xyz[:,0])
|
641
|
-
Y_valid = (yb[0] <= xyz[:,1])
|
648
|
+
X_valid = np.logical_and((xb[0] <= xyz[:,0]), (xb[1] >= xyz[:,0]))
|
649
|
+
Y_valid = np.logical_and((yb[0] <= xyz[:,1]), (yb[1] >= xyz[:,1]))
|
642
650
|
good_indices = np.where(X_valid & Y_valid)[0]
|
643
651
|
|
644
652
|
return xyz[good_indices]
|
wolfhece/wolf_array.py
CHANGED
@@ -2732,9 +2732,13 @@ class Ops_Array(wx.Frame):
|
|
2732
2732
|
curarray.shading = True
|
2733
2733
|
|
2734
2734
|
alpha = float(self.palalphahillshade.GetValue()) / 100.
|
2735
|
-
|
2736
|
-
|
2737
|
-
|
2735
|
+
|
2736
|
+
if curarray.shaded is None:
|
2737
|
+
logging.error('No shaded array')
|
2738
|
+
else:
|
2739
|
+
if curarray.shaded.alpha != alpha:
|
2740
|
+
curarray.shaded.alpha = alpha
|
2741
|
+
curarray.shading = True
|
2738
2742
|
|
2739
2743
|
if dellists:
|
2740
2744
|
self.refresh_array()
|
@@ -4444,6 +4448,25 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
4444
4448
|
|
4445
4449
|
self.add_ops_sel() # Ajout d'un gestionnaire de sélection et d'opérations
|
4446
4450
|
|
4451
|
+
def set_opacity(self, alpha:float):
|
4452
|
+
""" Set the transparency of the array """
|
4453
|
+
|
4454
|
+
if alpha <0.:
|
4455
|
+
alpha = 0.
|
4456
|
+
|
4457
|
+
if alpha > 1.:
|
4458
|
+
alpha = 1.
|
4459
|
+
|
4460
|
+
self.alpha = alpha
|
4461
|
+
|
4462
|
+
if self.myops is not None:
|
4463
|
+
self.myops.palalpha.SetValue(0)
|
4464
|
+
self.myops.palalphaslider.SetValue(int(alpha*100))
|
4465
|
+
|
4466
|
+
self.reset_plot()
|
4467
|
+
|
4468
|
+
return self.alpha
|
4469
|
+
|
4447
4470
|
@property
|
4448
4471
|
def memory_usage(self):
|
4449
4472
|
"""
|
@@ -5802,6 +5825,10 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
5802
5825
|
def hillshade(self, azimuth:float, angle_altitude:float):
|
5803
5826
|
""" Create a hillshade array -- see "hillshade" function accelerated by JIT"""
|
5804
5827
|
|
5828
|
+
if self.shaded is None:
|
5829
|
+
logging.error(_('No shaded array'))
|
5830
|
+
return
|
5831
|
+
|
5805
5832
|
self.shaded.set_header(self.get_header())
|
5806
5833
|
self.shaded.array = hillshade(self.array.data, azimuth, angle_altitude)
|
5807
5834
|
self.shaded.delete_lists()
|
@@ -7215,6 +7242,29 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
7215
7242
|
else:
|
7216
7243
|
logging.warning(_('Type not supported : ')+str(self.dtype))
|
7217
7244
|
|
7245
|
+
def fillin_from_ijz(self, ijz:np.ndarray):
|
7246
|
+
""" Remplissage du tableau à partir d'un tableau ijz """
|
7247
|
+
|
7248
|
+
try:
|
7249
|
+
i = ijz[:, 0].astype(int)
|
7250
|
+
j = ijz[:, 1].astype(int)
|
7251
|
+
except Exception as e:
|
7252
|
+
logging.error(_('Error in conversion of ijz to int : ')+str(e))
|
7253
|
+
return
|
7254
|
+
|
7255
|
+
if self.dtype == np.float32:
|
7256
|
+
self.array.data[i, j] = np.float32(ijz[:, 2])
|
7257
|
+
elif self.dtype == np.float64:
|
7258
|
+
self.array.data[i, j] = np.float64(ijz[:, 2])
|
7259
|
+
elif self.dtype == np.int32:
|
7260
|
+
self.array.data[i, j] = np.int32(ijz[:, 2])
|
7261
|
+
elif self.dtype == np.int16:
|
7262
|
+
self.array.data[i, j] = np.int16(ijz[:, 2])
|
7263
|
+
elif self.dtype == np.int8:
|
7264
|
+
self.array.data[i, j] = np.int8(ijz[:, 2])
|
7265
|
+
else:
|
7266
|
+
logging.warning(_('Type not supported : ')+str(self.dtype))
|
7267
|
+
|
7218
7268
|
def mask_force_null(self):
|
7219
7269
|
"""
|
7220
7270
|
Force to unmask all and mask null value
|
wolfhece/wolfresults_2D.py
CHANGED
@@ -1769,6 +1769,18 @@ class OneWolfResult:
|
|
1769
1769
|
|
1770
1770
|
self.mngselection = SelectionData(self._current)
|
1771
1771
|
|
1772
|
+
def set_opacity(self, alpha:float):
|
1773
|
+
""" Set the transparency of the array """
|
1774
|
+
|
1775
|
+
if alpha <0.:
|
1776
|
+
alpha = 0.
|
1777
|
+
|
1778
|
+
if alpha > 1.:
|
1779
|
+
alpha = 1.
|
1780
|
+
|
1781
|
+
self.alpha = alpha
|
1782
|
+
|
1783
|
+
return self.alpha
|
1772
1784
|
|
1773
1785
|
@property
|
1774
1786
|
def min_field_size(self):
|
@@ -2232,6 +2244,16 @@ class Wolfresults_2D(Element_To_Draw):
|
|
2232
2244
|
self.myops = None
|
2233
2245
|
self._active_blocks = 0
|
2234
2246
|
|
2247
|
+
|
2248
|
+
def set_opacity(self, alpha:float):
|
2249
|
+
""" Set the transparency of the array """
|
2250
|
+
|
2251
|
+
self.alpha = alpha
|
2252
|
+
|
2253
|
+
self.reset_plot()
|
2254
|
+
|
2255
|
+
return self.alpha
|
2256
|
+
|
2235
2257
|
@property
|
2236
2258
|
def SelectionData(self) -> SelectionDataMB:
|
2237
2259
|
""" Return the data of the selection """
|
@@ -2399,6 +2421,13 @@ class Wolfresults_2D(Element_To_Draw):
|
|
2399
2421
|
|
2400
2422
|
@alpha.setter
|
2401
2423
|
def alpha(self, value:float):
|
2424
|
+
|
2425
|
+
if value <0.:
|
2426
|
+
value = 0.
|
2427
|
+
|
2428
|
+
if value > 1.:
|
2429
|
+
value = 1.
|
2430
|
+
|
2402
2431
|
for i in range(self.nb_blocks):
|
2403
2432
|
self[i].alpha = value
|
2404
2433
|
|
@@ -4184,6 +4213,7 @@ class Wolfresults_2D(Element_To_Draw):
|
|
4184
4213
|
|
4185
4214
|
def reset_plot(self,whichpal=0):
|
4186
4215
|
"""Reset du dessin"""
|
4216
|
+
|
4187
4217
|
self.delete_lists()
|
4188
4218
|
self.get_working_array()
|
4189
4219
|
self.updatepalette(whichpal)
|
@@ -7,7 +7,7 @@ wolfhece/ManageParams.py,sha256=EeuUI5Vvh9ixCvYf8YShMC1s1Yacc7OxOCN7q81gqiQ,517
|
|
7
7
|
wolfhece/Model1D.py,sha256=uL1DJVmDI2xVSE7H6n3icn3QbsPtTHeg8E-6wkDloKw,476914
|
8
8
|
wolfhece/PyConfig.py,sha256=FB8u0belXOXTb03Ln6RdVWvMgjzi3oGPCmw2dWa3lNg,8332
|
9
9
|
wolfhece/PyCrosssections.py,sha256=FnmM9DWY_SAF2EDH9Gu2PojXNtSTRF4-aYQuAAJXBh4,112771
|
10
|
-
wolfhece/PyDraw.py,sha256=
|
10
|
+
wolfhece/PyDraw.py,sha256=lUdilikBoeFPN4LgyqIb3j6dYMbraLjrRJC1ZLGz4OU,399455
|
11
11
|
wolfhece/PyGui.py,sha256=aRWv9tBpRl7sKEd2gHWj8Bss0ZOKbGlUYIehWHFm8WY,105008
|
12
12
|
wolfhece/PyGuiHydrology.py,sha256=f60E8K9eGTnRq5RDF6yvt-ahf2AYegwQ9t25zZ2Mk1A,14946
|
13
13
|
wolfhece/PyHydrographs.py,sha256=jwtSNMMACwarxrtN1UeQYth99UNrhwPx1IGgUwcooHA,3774
|
@@ -48,13 +48,13 @@ wolfhece/pywalous.py,sha256=yRaWJjKckXef1d9D5devP0yFHC9uc6kRV4G5x9PNq9k,18972
|
|
48
48
|
wolfhece/rain_SPWMI.py,sha256=qCfcmF7LajloOaCwnTrrSMzyME03YyilmRUOqrPrv3U,13846
|
49
49
|
wolfhece/textpillow.py,sha256=map7HsGYML_o5NHRdFg2s_TVQed_lDnpYNDv27MM0Vw,14130
|
50
50
|
wolfhece/tools_mpl.py,sha256=gQ3Jg1iuZiecmMqa5Eli2ZLSkttu68VXL8YmMDBaEYU,564
|
51
|
-
wolfhece/wolf_array.py,sha256=
|
51
|
+
wolfhece/wolf_array.py,sha256=D_m0Ap85wGp94zXtk5hJlorn98tQjKFLKHqCqZEId2c,372225
|
52
52
|
wolfhece/wolf_hist.py,sha256=7jeVrgSkM3ErJO6SRMH_PGzfLjIdw8vTy87kesldggk,3582
|
53
53
|
wolfhece/wolf_texture.py,sha256=DS5eobLxrq9ljyebYfpMSQPn8shkUAZZVfqrOKN_QUU,16951
|
54
54
|
wolfhece/wolf_tiles.py,sha256=2Ho2I20rHRY81KXxjgLOYISdF4OkJ2d6omeY4shDoGI,10386
|
55
55
|
wolfhece/wolf_vrt.py,sha256=89XoDhCJMHiwPQUuOduxtTRKuIa8RDxgNqX65S4xp9M,10569
|
56
56
|
wolfhece/wolf_zi_db.py,sha256=baE0niMCzybWGSvPJc5FNxo9ZxsGfU4p-FmfiavFHAs,12967
|
57
|
-
wolfhece/wolfresults_2D.py,sha256=
|
57
|
+
wolfhece/wolfresults_2D.py,sha256=1rzkcZtS6Y8bn8izX-kTePpstrPi9TiOkw9XBueG1fk,168078
|
58
58
|
wolfhece/xyz_file.py,sha256=Se4nCPwYAYLSA5i0zsbnZUKoAMAD0mK1FJea5WSZUkk,5755
|
59
59
|
wolfhece/acceptability/Parallels.py,sha256=h4tu3SpC_hR5Hqa68aruxhtAyhs8u666YuZ40_fR5zg,3979
|
60
60
|
wolfhece/acceptability/__init__.py,sha256=hfgoPKLDpX7drN1Vpvux-_5Lfyc_7feT2C2zQr5v-Os,258
|
@@ -72,7 +72,7 @@ wolfhece/apps/check_install.py,sha256=SG024u18G7VRLKynbp7DKD1jImtHwuWwN4bJWHm-YH
|
|
72
72
|
wolfhece/apps/curvedigitizer.py,sha256=_hRR2PWow7PU7rTHIbc6ykZ08tCXcK9uy7RFrb4EKkE,5196
|
73
73
|
wolfhece/apps/isocurrent.py,sha256=MuwTodHxdc6PrqNpphR2ntYf1NLL2n9klTPndGrOHDQ,4109
|
74
74
|
wolfhece/apps/splashscreen.py,sha256=SrustmIQeXnsiD-92OzjdGhBi-S7c_j-cSvuX4T6rtg,2929
|
75
|
-
wolfhece/apps/version.py,sha256=
|
75
|
+
wolfhece/apps/version.py,sha256=bJO-UJatgh92ntk1GePpqNMUqpjjt1S7VkCtLXOP6kE,388
|
76
76
|
wolfhece/apps/wolf.py,sha256=mM6Tyi4DlKQILmO49cDUCip9fYVy-hLXkY3YhZgIeUQ,591
|
77
77
|
wolfhece/apps/wolf2D.py,sha256=yPQGee7fsegoQ8GfWKrWEjX1Az_ApL-UWlBiqPvaIyY,565
|
78
78
|
wolfhece/apps/wolf_logo.bmp,sha256=ruJ4MA51CpGO_AYUp_dB4SWKHelvhOvd7Q8NrVOjDJk,3126
|
@@ -143,7 +143,7 @@ wolfhece/lagrangian/particles.py,sha256=S52_-3rzgVhift6l4Gznvsf_RTggzvNaD1dPvQUr
|
|
143
143
|
wolfhece/lagrangian/velocity_field.py,sha256=oGVjNm98gEpawreFIrC1lDyC5bEhkk2CsyYAlF1Kq50,10574
|
144
144
|
wolfhece/lazviewer/__init__.py,sha256=0SNDEKGad6e2AwxjalcPqb2bdW6crmXQFxWUY13PiVU,223
|
145
145
|
wolfhece/lazviewer/_add_path.py,sha256=GDwPnzHuGRXGriDNcu1SQ6HetFDGIApeAQZEzYArGvI,605
|
146
|
-
wolfhece/lazviewer/laz_viewer.py,sha256=
|
146
|
+
wolfhece/lazviewer/laz_viewer.py,sha256=duHEeLb4GpwY9TxHqrDaamZ4IBx7VyoU_mdpDRqA-BI,42667
|
147
147
|
wolfhece/lazviewer/libs/Qt5Core.dll,sha256=sTJ_ctYFY9KHMNytF-lzH_078zIvnKTjN-71FDkOWPw,4924928
|
148
148
|
wolfhece/lazviewer/libs/Qt5Gui.dll,sha256=07BeaOeYByraGkKYeDiSDYLawHM8tyd55pVJlKbZ4Y0,5436416
|
149
149
|
wolfhece/lazviewer/libs/Qt5Network.dll,sha256=U-9FiLE9LUKru8r8EQxTnwwlMpwS8JzUtenhkKTCox0,1038336
|
@@ -280,8 +280,8 @@ wolfhece/ui/wolf_multiselection_collapsiblepane.py,sha256=8PlMYrb_8jI8h9F0_EagpM
|
|
280
280
|
wolfhece/ui/wolf_times_selection_comparison_models.py,sha256=ORy7fz4dcp691qKzaOZHrRLZ0uXNhL-LIHxmpDGL6BI,5007
|
281
281
|
wolfhece/wintab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
282
282
|
wolfhece/wintab/wintab.py,sha256=8A-JNONV6ujgsgG3lM5Uw-pVgglPATwKs86oBzzljoc,7179
|
283
|
-
wolfhece-2.1.
|
284
|
-
wolfhece-2.1.
|
285
|
-
wolfhece-2.1.
|
286
|
-
wolfhece-2.1.
|
287
|
-
wolfhece-2.1.
|
283
|
+
wolfhece-2.1.53.dist-info/METADATA,sha256=dr2FjHrOvOyyI9-bFpd9KIcWNHjXTGtbEUcJyfQZwEI,2541
|
284
|
+
wolfhece-2.1.53.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
285
|
+
wolfhece-2.1.53.dist-info/entry_points.txt,sha256=Q5JuIWV4odeIJI3qc6fV9MwRoz0ezqPVlFC1Ppm_vdQ,395
|
286
|
+
wolfhece-2.1.53.dist-info/top_level.txt,sha256=EfqZXMVCn7eILUzx9xsEu2oBbSo9liWPFWjIHik0iCI,9
|
287
|
+
wolfhece-2.1.53.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|