NREL / flasc

A rich floris-driven suite for SCADA analysis
https://nrel.github.io/flasc/
BSD 3-Clause "New" or "Revised" License
31 stars 18 forks source link

Add handling for plotting a subset of turbines in waking directions vis #47

Closed misi9170 closed 1 year ago

misi9170 commented 1 year ago

Ready to be merged.

In current version, the only way to handle plotting the layout or waking directions of a subset of the farm (using plot_layout_with_waking_directions() is to pass a FlorisInterface with a layout for that subset. This modification allows users to specify a subset of turbine indices which they would like to see waking directions for, utilizing an existing mechanism already available in plot_layout_only(). Also allowing user to define the font size for labeling the wind directions/distances.

To specify a subset of turbines of interest, the layout_plotting_dict argument provided to plot_layout_with_waking_directions() should contain a key "turbine_indices" that is a list of the turbine indices to be plotted. Font size for labels is set with new argument wake_label_size.

Default behavior unchanged.

Test: no change to the wake directions plot produced by examples/wake_steering_design/00_analyze_single_ws_vs_range.py

codecov-commenter commented 1 year ago

Codecov Report

Base: 33.73% // Head: 33.70% // Decreases project coverage by -0.02% :warning:

Coverage data is based on head (a1a48fc) compared to base (f5fdff6). Patch coverage: 0.00% of modified lines in pull request are covered.

:exclamation: Current head a1a48fc differs from pull request most recent head 586d12c. Consider uploading reports for the commit 586d12c to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #47 +/- ## =========================================== - Coverage 33.73% 33.70% -0.03% =========================================== Files 38 38 Lines 3753 3756 +3 =========================================== Hits 1266 1266 - Misses 2487 2490 +3 ``` | [Impacted Files](https://codecov.io/gh/NREL/flasc/pull/47?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL) | Coverage Δ | | |---|---|---| | [flasc/visualization.py](https://codecov.io/gh/NREL/flasc/pull/47/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL#diff-Zmxhc2MvdmlzdWFsaXphdGlvbi5weQ==) | `6.95% <0.00%> (-0.12%)` | :arrow_down: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

paulf81 commented 1 year ago

hi Misha, I think this is a great idea! Couple of quick comments:

misi9170 commented 1 year ago

@paulf81 My mistake on the base branch! And yes, thought I was all up to speed with develop but apparently not---that's now pulled and merged. I've also reverted one unnecessary step adding an input to the inner put_label function.

paulf81 commented 1 year ago

ok that looks good! my last thought is we could probably use a new example, that just shows how to do each of the plot layout types, I'm happy to propose something?

misi9170 commented 1 year ago

Sure, sounds good, please do!

paulf81 commented 1 year ago

Ok I've just pushed up an example of making different types of layout plots, does this work/look ok to you @misi9170 ?

misi9170 commented 1 year ago

The example looks good. I've just added one more option in the final plot to demonstrate the selection of a subset of turbines to plot waking information for. Ready to merge?

paulf81 commented 1 year ago

Yes!