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.

Files changed (57) hide show
  1. examples/abl_states/run.py +5 -5
  2. examples/induction/run.py +5 -5
  3. examples/random_timeseries/run.py +13 -13
  4. examples/scan_row/run.py +12 -7
  5. examples/sector_management/run.py +11 -7
  6. examples/single_state/run.py +5 -5
  7. examples/tab_file/run.py +1 -1
  8. examples/timeseries/run.py +5 -5
  9. examples/timeseries_slurm/run.py +5 -5
  10. examples/wind_rose/run.py +1 -1
  11. examples/yawed_wake/run.py +5 -5
  12. foxes/algorithms/downwind/downwind.py +15 -5
  13. foxes/algorithms/sequential/sequential.py +1 -1
  14. foxes/core/algorithm.py +24 -20
  15. foxes/core/axial_induction_model.py +18 -0
  16. foxes/core/engine.py +2 -14
  17. foxes/core/farm_controller.py +18 -0
  18. foxes/core/ground_model.py +19 -0
  19. foxes/core/partial_wakes_model.py +9 -21
  20. foxes/core/point_data_model.py +18 -0
  21. foxes/core/rotor_model.py +2 -18
  22. foxes/core/states.py +2 -17
  23. foxes/core/turbine_model.py +2 -18
  24. foxes/core/turbine_type.py +2 -18
  25. foxes/core/vertical_profile.py +8 -20
  26. foxes/core/wake_frame.py +2 -20
  27. foxes/core/wake_model.py +19 -20
  28. foxes/core/wake_superposition.py +19 -0
  29. foxes/input/states/__init__.py +1 -1
  30. foxes/input/states/field_data_nc.py +14 -1
  31. foxes/input/states/{scan_ws.py → scan.py} +39 -52
  32. foxes/input/yaml/__init__.py +1 -1
  33. foxes/input/yaml/dict.py +317 -50
  34. foxes/input/yaml/yaml.py +5 -5
  35. foxes/output/__init__.py +2 -1
  36. foxes/output/farm_results_eval.py +57 -35
  37. foxes/output/output.py +2 -18
  38. foxes/output/plt.py +19 -0
  39. foxes/output/rose_plot.py +413 -207
  40. foxes/utils/__init__.py +1 -2
  41. foxes/utils/subclasses.py +69 -0
  42. {foxes-1.2.dist-info → foxes-1.2.2.dist-info}/METADATA +1 -2
  43. {foxes-1.2.dist-info → foxes-1.2.2.dist-info}/RECORD +56 -56
  44. tests/0_consistency/iterative/test_iterative.py +1 -1
  45. tests/0_consistency/partial_wakes/test_partial_wakes.py +1 -1
  46. tests/1_verification/flappy_0_6/row_Jensen_linear_centre/test_row_Jensen_linear_centre.py +7 -2
  47. tests/1_verification/flappy_0_6/row_Jensen_linear_tophat/test_row_Jensen_linear_tophat.py +7 -2
  48. tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2005/test_row_Jensen_linear_tophat_IECTI_2005.py +7 -2
  49. tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2019/test_row_Jensen_linear_tophat_IECTI_2019.py +7 -2
  50. tests/1_verification/flappy_0_6/row_Jensen_quadratic_centre/test_row_Jensen_quadratic_centre.py +7 -2
  51. tests/1_verification/flappy_0_6_2/row_Bastankhah_Crespo/test_row_Bastankhah_Crespo.py +7 -3
  52. tests/1_verification/flappy_0_6_2/row_Bastankhah_linear_centre/test_row_Bastankhah_linear_centre.py +7 -2
  53. foxes/utils/windrose_plot.py +0 -152
  54. {foxes-1.2.dist-info → foxes-1.2.2.dist-info}/LICENSE +0 -0
  55. {foxes-1.2.dist-info → foxes-1.2.2.dist-info}/WHEEL +0 -0
  56. {foxes-1.2.dist-info → foxes-1.2.2.dist-info}/entry_points.txt +0 -0
  57. {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)