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

Feature/add options on count #122

Closed paulf81 closed 1 year ago

paulf81 commented 1 year ago

Ready to be merged

Feature or improvement description This pull request changes the current behavior that assumes, when weighting wind speed bins in the energy ratio across dataframes, that we should use the minimum count (thus up-weighting the wind-speed bins that have the most points in the lesser case), allow an option to weight by sum. Minimum will stay the default but now an option to pass in 'sum' to a new weight_by variable.

The pull request includes a new test which shows and checks the functionality on a small problem

Finally, a small unrelated bug in energy_ratio_output (remove_all_bins used instead of remove_all_nulls is fixed) and the energy_ratio example for wake steering is cleaned up.

Additional supporting information This is in support of functions to compute total uplift

Test results, if applicable New test added test_alternative_weighting, all tests pass

Bartdoekemeijer commented 1 year ago

Seems very useful!