wolfhece 2.1.67__py3-none-any.whl → 2.1.69__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 +35 -16
- wolfhece/PyDraw.py +189 -186
- wolfhece/PyParams.py +4 -8
- wolfhece/PyVertexvectors.py +55 -12
- wolfhece/apps/version.py +1 -1
- wolfhece/hydrometry/kiwis.py +3 -1
- wolfhece/pyviews.py +2 -1
- wolfhece/wolf_array.py +85 -10
- {wolfhece-2.1.67.dist-info → wolfhece-2.1.69.dist-info}/METADATA +1 -1
- {wolfhece-2.1.67.dist-info → wolfhece-2.1.69.dist-info}/RECORD +13 -13
- {wolfhece-2.1.67.dist-info → wolfhece-2.1.69.dist-info}/WHEEL +1 -1
- {wolfhece-2.1.67.dist-info → wolfhece-2.1.69.dist-info}/entry_points.txt +0 -0
- {wolfhece-2.1.67.dist-info → wolfhece-2.1.69.dist-info}/top_level.txt +0 -0
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
|
-
|
135
|
-
|
136
|
-
|
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.
|
@@ -1300,15 +1317,12 @@ class Creator_1D:
|
|
1300
1317
|
- Id : zone index
|
1301
1318
|
- The discretization step is chosen by the user.
|
1302
1319
|
|
1303
|
-
..
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
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.
|
1320
|
+
.. note:: The procedure is the following:
|
1321
|
+
- From the 3 vectors of the zone, the center vector is discretized based on the discretization step provided by the user (1 length unit by default).
|
1322
|
+
- The number of points is calculated as the length of the center vector divided by the discretization step.
|
1323
|
+
- The number of points selected is the smallest integer greater than the division result.
|
1324
|
+
- The newpoints are then projected on the left and right vectors.
|
1325
|
+
- The distance between the left and right vectors is then calculated, and plotted as a function of the distance along the center vector, after a postprocessing check using subtrings and vectors.
|
1312
1326
|
|
1313
1327
|
:param zones: `Zones` object containing the vectors,
|
1314
1328
|
:type zones: Zones
|
@@ -1316,12 +1330,13 @@ class Creator_1D:
|
|
1316
1330
|
:type id: int, optional
|
1317
1331
|
:param discretization: After how many unit a disctance should be sampled, defaults to 1
|
1318
1332
|
:type discretization: float, optional
|
1319
|
-
:param Figure_title:Title to be displayed on the figure, defaults to ''
|
1333
|
+
:param Figure_title: Title to be displayed on the figure, defaults to ''
|
1320
1334
|
:type Figure_title: str, optional
|
1321
1335
|
:param ticks_spacing: Discretization of the x axis, defaults to 1000
|
1322
1336
|
:type ticks_spacing: int, optional
|
1323
1337
|
|
1324
|
-
..
|
1338
|
+
.. note:: FIXME Should be an option in GUI and check whether the substring step is necessary.
|
1339
|
+
|
1325
1340
|
.. todo:: 1) FIXME Add detailed information (legends, title, an so on) to the plot.
|
1326
1341
|
.. todo:: 2) FIXME Think about a test for this method. could it be used in GUI?
|
1327
1342
|
"""
|
@@ -1657,6 +1672,7 @@ class Creator_1D:
|
|
1657
1672
|
:param file_out: File path of the new WolfArray, file_out is provided ('' by default)
|
1658
1673
|
a folder of the mask (given array) is used to store the output under the same name
|
1659
1674
|
as the previous but with a prefix `new_` added, defaults to ''
|
1675
|
+
|
1660
1676
|
:type file_out: str, optional
|
1661
1677
|
:param load: If the new WolfArray should be loaded or not, defaults to True
|
1662
1678
|
:type load: bool, optional
|
@@ -1714,6 +1730,7 @@ class Creator_1D:
|
|
1714
1730
|
:type vrt_file: str
|
1715
1731
|
:param wolfarray_not_tif: If the new WolfArrays should be saved as a `.bin` file or `.tif` file,
|
1716
1732
|
defaults to True
|
1733
|
+
|
1717
1734
|
:type wolfarray_not_tif: bool, optional
|
1718
1735
|
:return: List of new WolfArrays
|
1719
1736
|
:rtype: list[WolfArray]
|
@@ -2417,6 +2434,7 @@ class Creator_1D:
|
|
2417
2434
|
:type mycross: crosssections
|
2418
2435
|
:param vect: `vector` containing the profiles
|
2419
2436
|
in case the profiles should be sorted, defaults to None
|
2437
|
+
|
2420
2438
|
:type vect: vector, optional
|
2421
2439
|
:param profile_name: Index of the profile, defaults to 1
|
2422
2440
|
:type profile_name: int, optional
|
@@ -3065,7 +3083,7 @@ class Creator_1D:
|
|
3065
3083
|
:param directory: Directory path, defaults to ''
|
3066
3084
|
:type directory: str, optional
|
3067
3085
|
|
3068
|
-
..
|
3086
|
+
.. note:: FIXME delete from_steady arguments wherever it's still implemented in this module.
|
3069
3087
|
"""
|
3070
3088
|
|
3071
3089
|
if directory == '':
|
@@ -5405,6 +5423,7 @@ class Creator_1D:
|
|
5405
5423
|
:type directory: str
|
5406
5424
|
:param plot: wheter the process should open a matplotlib figure
|
5407
5425
|
containing the steady state solution or not, defaults to True
|
5426
|
+
|
5408
5427
|
:type plot: bool, optional
|
5409
5428
|
"""
|
5410
5429
|
self.write_parameters(directory, write_type= 2, max_time=0)
|