wolfhece 2.1.66__py3-none-any.whl → 2.1.68__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/Model1D.py CHANGED
@@ -131,9 +131,9 @@ class Creator_1D:
131
131
  This object contains the methods operations
132
132
  performed in the creation of 1D models.
133
133
  They consist of the following operations:
134
- - Concatenation of information in 1 and 2 dimensions,
135
- - Extraction of information from 2D data if provided,
136
- - Creation of a 1D model (simulation).
134
+ - Concatenation of information in 1 and 2 dimensions,
135
+ - Extraction of information from 2D data if provided,
136
+ - Creation of a 1D model (simulation).
137
137
 
138
138
  .. todo:: 1) FIXME Create unittests for methods in this class,
139
139
  .. todo:: 2) FIXME Fasten the methods in this class using multiprocess.
@@ -168,9 +168,11 @@ class Creator_1D:
168
168
  :type zones2: Zones
169
169
  :param id1: Position in `.myzones` of the zone
170
170
  containing the vectors, defaults to 0
171
+
171
172
  :type id1: int, optional
172
173
  :param id2: Position in `.myzones` of the zone
173
174
  containing the vectors, defaults to 0
175
+
174
176
  :type id2: int, optional
175
177
  :return: The 2 zones with the aligned vertices.
176
178
  :rtype: Zones
@@ -220,16 +222,20 @@ class Creator_1D:
220
222
  :type zones2: Zones
221
223
  :param id1: Position in `.myzones` of the zone
222
224
  containing the vectors, defaults to 0
225
+
223
226
  :type id1: int, optional
224
227
  :param id2: Position in `.myzones` of the zone
225
228
  containing the vectors, defaults to 0
229
+
226
230
  :type id2: int, optional
227
231
  :param buffer: number of vertices to process on each vector
228
232
  starting from the end of the vector (None means all vertices are processed),
229
233
  defaults to None
234
+
230
235
  :type buffer: int, optional
231
236
  :return: The vectors with the deleted overlaps.
232
237
  :rtype: Zones
238
+
233
239
  .. todo:: 1) FIXME Generalize the method to work with any number of vectors.
234
240
  .. todo:: 2) FIXME iS there a way to perform this operation geometrically with shapely line string?
235
241
  .. todo:: 3) FIXME Create unittests for this method.
@@ -416,6 +422,7 @@ class Creator_1D:
416
422
  this is the number of vertices to process on each vector
417
423
  starting from the end of the vector
418
424
  (None means all vertices are processed),defaults to None, defaults to None
425
+
419
426
  :type buffer: int, defaults to None
420
427
  :param save_as: File path of the new vector, defaults to None
421
428
  :type save_as: str, optional
@@ -466,6 +473,7 @@ class Creator_1D:
466
473
  :type buffer: While deleting overlaps, this is the number of vertices
467
474
  to process on each vector starting from the end of the vector
468
475
  (None means all vertices are processed),defaults to None
476
+
469
477
  :param save_as: _description_, defaults to None
470
478
  :type save_as: File path of the new vector, optional
471
479
  :raises Exception: With a GUI, to warn the user that the list of zones is missing.
@@ -554,7 +562,7 @@ class Creator_1D:
554
562
  contained in those vectors to a new zone that will be returned.
555
563
  FIXME: Remove Id from all methods and delete the parameter from the method signature.
556
564
 
557
- :param zones_list:List of vectors (`Zones`).
565
+ :param zones_list: List of vectors (`Zones`).
558
566
  :type zones_list: list[Zones]
559
567
  :param id: Depreciated, defaults to 1
560
568
  :type id: int, optional
@@ -750,6 +758,7 @@ class Creator_1D:
750
758
  :type save_as: str, optional
751
759
  :return: The new Zones containing the supports.
752
760
  :rtype: Zones
761
+
753
762
  .. todo:: 1) FIXME create a test for this method
754
763
  .. todo:: 2) FIXME Think about a faster way to create the supports
755
764
  .. todo:: 3) FIXME could it replace the current method for the cration of bed in wolfpy?
@@ -882,9 +891,11 @@ class Creator_1D:
882
891
  :type zones: Zones
883
892
  :param filename: .csv file containing the sections and their minimum altitudes,
884
893
  first column is the section name and second column is the minimum altitude.
894
+
885
895
  :type filename: str
886
896
  :param save_as: path to the the file where the modified Zones will be saved
887
897
  if no path is given the results is not saved but only returned , defaults to ''
898
+
888
899
  :type save_as: str, optional
889
900
  :return: New Zones object with the modified altitudes
890
901
  :rtype: Zones
@@ -921,9 +932,11 @@ class Creator_1D:
921
932
  :type zones: Zones
922
933
  :param filename: .csv file containing the sections and their minimum altitudes,
923
934
  first column is the section name and second column is the minimum altitude.
935
+
924
936
  :type filename: str
925
937
  :param save_as: path to the the file where the modified Zones will be saved
926
938
  if no path is given the results is not saved but only returned , defaults to ''
939
+
927
940
  :type save_as: str, optional
928
941
  :return: New Zones object with the modified altitudes
929
942
  :rtype: Zones
@@ -961,9 +974,11 @@ class Creator_1D:
961
974
  :type zones: Zones
962
975
  :param filename: .csv file containing the sections and their minimum altitudes,
963
976
  first column is the section name and second column is the minimum altitude.
977
+
964
978
  :type filename: str
965
979
  :param save_as: path to the the file where the modified Zones will be saved
966
980
  if no path is given the results is not saved but only returned , defaults to ''
981
+
967
982
  :type save_as: str, optional
968
983
  :return: New Zones object with the modified altitudes
969
984
  :rtype: Zones
@@ -1003,6 +1018,7 @@ class Creator_1D:
1003
1018
  :type zones: Zones
1004
1019
  :param save_as: path to the the file where the modified Zones will be saved
1005
1020
  if no path is given the results is not saved but only returned , defaults to ''
1021
+
1006
1022
  :type save_as: str, optional
1007
1023
  :return: New Zones object with the reversed vectors
1008
1024
  :rtype: Zones
@@ -1223,6 +1239,7 @@ class Creator_1D:
1223
1239
  :type zones_list: list[Zones]
1224
1240
  :param id: Index of the zone containing the vector object
1225
1241
  in all `Zones`, defaults to 0
1242
+
1226
1243
  :type id: int, optional
1227
1244
 
1228
1245
  .. todo:: 1) FIXME Add detailed information (legends, title, an so on) to the plot.
@@ -1301,14 +1318,14 @@ class Creator_1D:
1301
1318
  - The discretization step is chosen by the user.
1302
1319
 
1303
1320
  .. notes:: The procedure is the following:
1304
- From the 3 vectors of the zone, the center vector is discretized
1305
- based on the discretization step provided by the user (1 length unit by default).
1306
- The number of points is calculated as the length of the center vector divided by the discretization step.
1307
- the number of points selected is the smallest integer greater than the division result.
1308
- The newpoints are then projected on the left and right vectors.
1309
- The distance between the left and right vectors is then calculated,
1310
- and plotted as a function of the distance along the center vector, after a postprocessing check using
1311
- subtrings and vectors.
1321
+ From the 3 vectors of the zone, the center vector is discretized
1322
+ based on the discretization step provided by the user (1 length unit by default).
1323
+ The number of points is calculated as the length of the center vector divided by the discretization step.
1324
+ the number of points selected is the smallest integer greater than the division result.
1325
+ The newpoints are then projected on the left and right vectors.
1326
+ The distance between the left and right vectors is then calculated,
1327
+ and plotted as a function of the distance along the center vector, after a postprocessing check using
1328
+ subtrings and vectors.
1312
1329
 
1313
1330
  :param zones: `Zones` object containing the vectors,
1314
1331
  :type zones: Zones
@@ -1316,12 +1333,14 @@ class Creator_1D:
1316
1333
  :type id: int, optional
1317
1334
  :param discretization: After how many unit a disctance should be sampled, defaults to 1
1318
1335
  :type discretization: float, optional
1319
- :param Figure_title:Title to be displayed on the figure, defaults to ''
1336
+ :param Figure_title: Title to be displayed on the figure, defaults to ''
1320
1337
  :type Figure_title: str, optional
1321
1338
  :param ticks_spacing: Discretization of the x axis, defaults to 1000
1322
1339
  :type ticks_spacing: int, optional
1323
1340
 
1324
- .. notes:: FIXME Should be an option in GUI and check whether the substring step is necessary.
1341
+ .. notes::
1342
+ FIXME Should be an option in GUI and check whether the substring step is necessary.
1343
+
1325
1344
  .. todo:: 1) FIXME Add detailed information (legends, title, an so on) to the plot.
1326
1345
  .. todo:: 2) FIXME Think about a test for this method. could it be used in GUI?
1327
1346
  """
@@ -1657,6 +1676,7 @@ class Creator_1D:
1657
1676
  :param file_out: File path of the new WolfArray, file_out is provided ('' by default)
1658
1677
  a folder of the mask (given array) is used to store the output under the same name
1659
1678
  as the previous but with a prefix `new_` added, defaults to ''
1679
+
1660
1680
  :type file_out: str, optional
1661
1681
  :param load: If the new WolfArray should be loaded or not, defaults to True
1662
1682
  :type load: bool, optional
@@ -1714,6 +1734,7 @@ class Creator_1D:
1714
1734
  :type vrt_file: str
1715
1735
  :param wolfarray_not_tif: If the new WolfArrays should be saved as a `.bin` file or `.tif` file,
1716
1736
  defaults to True
1737
+
1717
1738
  :type wolfarray_not_tif: bool, optional
1718
1739
  :return: List of new WolfArrays
1719
1740
  :rtype: list[WolfArray]
@@ -2417,6 +2438,7 @@ class Creator_1D:
2417
2438
  :type mycross: crosssections
2418
2439
  :param vect: `vector` containing the profiles
2419
2440
  in case the profiles should be sorted, defaults to None
2441
+
2420
2442
  :type vect: vector, optional
2421
2443
  :param profile_name: Index of the profile, defaults to 1
2422
2444
  :type profile_name: int, optional
@@ -3065,7 +3087,8 @@ class Creator_1D:
3065
3087
  :param directory: Directory path, defaults to ''
3066
3088
  :type directory: str, optional
3067
3089
 
3068
- .. notes:: FIXME delete from_steady arguments wherever it's still implemented in this module.
3090
+ .. notes::
3091
+ FIXME delete from_steady arguments wherever it's still implemented in this module.
3069
3092
  """
3070
3093
 
3071
3094
  if directory == '':
@@ -5405,6 +5428,7 @@ class Creator_1D:
5405
5428
  :type directory: str
5406
5429
  :param plot: wheter the process should open a matplotlib figure
5407
5430
  containing the steady state solution or not, defaults to True
5431
+
5408
5432
  :type plot: bool, optional
5409
5433
  """
5410
5434
  self.write_parameters(directory, write_type= 2, max_time=0)
wolfhece/PyDraw.py CHANGED
@@ -8500,8 +8500,8 @@ class WolfMapViewer(wx.Frame):
8500
8500
  # \n \
8501
8501
  # !! ACTIONs !!\n \
8502
8502
  # N : sélection noeud par noeud de la matrice courante\n \
8503
- # B : sélection par vecteur temporaire de la matrice courante\n \
8504
- # V : sélection par vecteur activé de la matrice courante - zone intérieure\n \
8503
+ # b, B : sélection par vecteur de la matrice courante - trace du vecteur\n \
8504
+ # v, V : sélection par vecteur de la matrice courante - zone intérieure\n \
8505
8505
  # r : reset de la sélection de la matrice courante\n \
8506
8506
  # R : reset de toutes les sélections de la matrice courante\n \
8507
8507
  # P : sélection de la section transversale par click souris\n \
@@ -8558,8 +8558,9 @@ class WolfMapViewer(wx.Frame):
8558
8558
  'F11': _('Arrays : select by criteria'),
8559
8559
  'F12': _('Arrays : operations'),
8560
8560
  'n or N': _('Arrays : node-by-node selection'),
8561
- 'b or B': _('Arrays : temporary vector selection'),
8562
- 'v or V': _('Arrays : activated vector selection - inner zone'),
8561
+
8562
+ 'b or B': _('Arrays : temporary/active vector selection - along polyline'),
8563
+ 'v or V': _('Arrays : temporary/active vector selection - inside polygon'),
8563
8564
 
8564
8565
  'r': _('Arrays : reset the selection'),
8565
8566
  'R': _('Arrays : reset the selection and the associated dictionnary'),
@@ -9011,6 +9012,12 @@ class WolfMapViewer(wx.Frame):
9011
9012
  elif key in LIST_1TO9:
9012
9013
 
9013
9014
  if self.active_array is not None:
9015
+
9016
+ if self.active_array.SelectionData.myselection == 'all':
9017
+ logging.warning(_('No selection to transfer to the dictionary !'))
9018
+ logging.info(_('Please select some nodes before transfering to the dictionary, not ALL !'))
9019
+ return
9020
+
9014
9021
  colors = [(0, 0, 255, 255), (0, 255, 0, 255), (0, 128, 255, 255), (255, 255, 0, 255), (255, 165, 0, 255), (128, 0, 128, 255), (255, 192, 203, 255), (165, 42, 42, 255), (128, 128, 128, 255)]
9015
9022
  idx = LIST_1TO9.index(key)
9016
9023
  if idx > 8:
@@ -9068,16 +9075,33 @@ class WolfMapViewer(wx.Frame):
9068
9075
  if self.active_res2d is not None:
9069
9076
  self.active_res2d.properties.select_node_by_node()
9070
9077
 
9078
+ if self.active_array is None and self.active_res2d is None:
9079
+ logging.warning(_('No active array or result 2D to select node by node !'))
9080
+
9071
9081
  elif key == ord('V'): # V
9072
9082
  if self.active_array is not None:
9073
- self.active_array.myops.select_vector_inside_manager()
9083
+ if shiftdown:
9084
+ self.active_array.myops.select_vector_inside_manager()
9085
+ else:
9086
+ self.active_array.myops.select_vector_inside_tmp()
9087
+ else:
9088
+ logging.warning(_('No active array to select the vector inside !'))
9074
9089
 
9075
9090
  elif key == ord('B'): # B
9076
9091
  if self.active_array is not None:
9077
- self.active_array.myops.select_vector_inside_tmp()
9092
+ if shiftdown:
9093
+ self.active_array.myops.select_vector_under_manager()
9094
+ else:
9095
+ self.active_array.myops.select_vector_under_tmp()
9096
+ else:
9097
+ logging.warning(_('No active array to select the vector inside !'))
9078
9098
 
9079
9099
  elif key == ord('P'): # P
9080
- self.start_action('Select nearest profile', _('Select nearest profile'))
9100
+
9101
+ if self.active_cs is not None:
9102
+ self.start_action('Select nearest profile', _('Select nearest profile'))
9103
+ else:
9104
+ logging.warning(_('No active cross section to select the nearest profile !'))
9081
9105
 
9082
9106
  elif key == ord('Z') and shiftdown: # Z
9083
9107
  self.width = self.width / 1.1
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 = 66
8
+ self.patch = 68
9
9
 
10
10
  def __str__(self):
11
11