foxes 1.2__py3-none-any.whl → 1.2.2__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.
Potentially problematic release.
This version of foxes might be problematic. Click here for more details.
- examples/abl_states/run.py +5 -5
- examples/induction/run.py +5 -5
- examples/random_timeseries/run.py +13 -13
- examples/scan_row/run.py +12 -7
- examples/sector_management/run.py +11 -7
- examples/single_state/run.py +5 -5
- examples/tab_file/run.py +1 -1
- examples/timeseries/run.py +5 -5
- examples/timeseries_slurm/run.py +5 -5
- examples/wind_rose/run.py +1 -1
- examples/yawed_wake/run.py +5 -5
- foxes/algorithms/downwind/downwind.py +15 -5
- foxes/algorithms/sequential/sequential.py +1 -1
- foxes/core/algorithm.py +24 -20
- foxes/core/axial_induction_model.py +18 -0
- foxes/core/engine.py +2 -14
- foxes/core/farm_controller.py +18 -0
- foxes/core/ground_model.py +19 -0
- foxes/core/partial_wakes_model.py +9 -21
- foxes/core/point_data_model.py +18 -0
- foxes/core/rotor_model.py +2 -18
- foxes/core/states.py +2 -17
- foxes/core/turbine_model.py +2 -18
- foxes/core/turbine_type.py +2 -18
- foxes/core/vertical_profile.py +8 -20
- foxes/core/wake_frame.py +2 -20
- foxes/core/wake_model.py +19 -20
- foxes/core/wake_superposition.py +19 -0
- foxes/input/states/__init__.py +1 -1
- foxes/input/states/field_data_nc.py +14 -1
- foxes/input/states/{scan_ws.py → scan.py} +39 -52
- foxes/input/yaml/__init__.py +1 -1
- foxes/input/yaml/dict.py +317 -50
- foxes/input/yaml/yaml.py +5 -5
- foxes/output/__init__.py +2 -1
- foxes/output/farm_results_eval.py +57 -35
- foxes/output/output.py +2 -18
- foxes/output/plt.py +19 -0
- foxes/output/rose_plot.py +413 -207
- foxes/utils/__init__.py +1 -2
- foxes/utils/subclasses.py +69 -0
- {foxes-1.2.dist-info → foxes-1.2.2.dist-info}/METADATA +1 -2
- {foxes-1.2.dist-info → foxes-1.2.2.dist-info}/RECORD +56 -56
- tests/0_consistency/iterative/test_iterative.py +1 -1
- tests/0_consistency/partial_wakes/test_partial_wakes.py +1 -1
- tests/1_verification/flappy_0_6/row_Jensen_linear_centre/test_row_Jensen_linear_centre.py +7 -2
- tests/1_verification/flappy_0_6/row_Jensen_linear_tophat/test_row_Jensen_linear_tophat.py +7 -2
- tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2005/test_row_Jensen_linear_tophat_IECTI_2005.py +7 -2
- tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2019/test_row_Jensen_linear_tophat_IECTI_2019.py +7 -2
- tests/1_verification/flappy_0_6/row_Jensen_quadratic_centre/test_row_Jensen_quadratic_centre.py +7 -2
- tests/1_verification/flappy_0_6_2/row_Bastankhah_Crespo/test_row_Bastankhah_Crespo.py +7 -3
- tests/1_verification/flappy_0_6_2/row_Bastankhah_linear_centre/test_row_Bastankhah_linear_centre.py +7 -2
- foxes/utils/windrose_plot.py +0 -152
- {foxes-1.2.dist-info → foxes-1.2.2.dist-info}/LICENSE +0 -0
- {foxes-1.2.dist-info → foxes-1.2.2.dist-info}/WHEEL +0 -0
- {foxes-1.2.dist-info → foxes-1.2.2.dist-info}/entry_points.txt +0 -0
- {foxes-1.2.dist-info → foxes-1.2.2.dist-info}/top_level.txt +0 -0
foxes/output/output.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from pathlib import Path
|
|
2
2
|
|
|
3
3
|
from foxes.config import config, get_path
|
|
4
|
-
from foxes.utils import PandasFileHelper, all_subclasses
|
|
4
|
+
from foxes.utils import PandasFileHelper, new_instance, all_subclasses
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
class Output:
|
|
@@ -116,20 +116,4 @@ class Output:
|
|
|
116
116
|
Additional parameters for the constructor
|
|
117
117
|
|
|
118
118
|
"""
|
|
119
|
-
|
|
120
|
-
if output_type is None:
|
|
121
|
-
return None
|
|
122
|
-
|
|
123
|
-
allc = all_subclasses(cls)
|
|
124
|
-
found = output_type in [scls.__name__ for scls in allc]
|
|
125
|
-
|
|
126
|
-
if found:
|
|
127
|
-
for scls in allc:
|
|
128
|
-
if scls.__name__ == output_type:
|
|
129
|
-
return scls(*args, **kwargs)
|
|
130
|
-
|
|
131
|
-
else:
|
|
132
|
-
estr = "Output type '{}' is not defined, available types are \n {}".format(
|
|
133
|
-
output_type, sorted([i.__name__ for i in allc])
|
|
134
|
-
)
|
|
135
|
-
raise KeyError(estr)
|
|
119
|
+
return new_instance(cls, output_type, *args, **kwargs)
|
foxes/output/plt.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from matplotlib import pyplot
|
|
2
|
+
|
|
3
|
+
from .output import Output
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class plt(Output):
|
|
7
|
+
"""
|
|
8
|
+
Class that runs plt commands
|
|
9
|
+
|
|
10
|
+
:group: output
|
|
11
|
+
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __getattr__(self, name):
|
|
15
|
+
return getattr(pyplot, name)
|
|
16
|
+
|
|
17
|
+
def savefig(self, fname, *args, **kwargs):
|
|
18
|
+
fpath = super().get_fpath(fname)
|
|
19
|
+
pyplot.savefig(fpath, *args, **kwargs)
|