flasc.data_processing.timeseries_to_grid_solutions.bin_timeseries_to_grid

flasc.data_processing.timeseries_to_grid_solutions.bin_timeseries_to_grid#

flasc.data_processing.timeseries_to_grid_solutions.bin_timeseries_to_grid(df_timeseries: DataFrame, wd_step: float = 5.0, wd_min: float = 0.0, wd_max: float = 360.0, ws_step: float = 1.0, ws_min: float = 0.0, ws_max: float = 50.0, N_min: int = 3, plot: bool = False)[source]#

Convert a timeseries DataFrame into a gridded solution table.

Table is based on wind direction and wind speed bins.

Parameters:
  • df_timeseries (pd.DataFrame) -- Dataframe with timeseries that you want to turn into a gridded solution table. Requires the columns 'wd', 'ws', and one power column (pow_000, pow_001, etc.) for every turbine in your wind farm.

  • wd_step (float, optional) -- Step size for wind direction bins. Defaults to 5.0.

  • wd_min (float, optional) -- Minimum wind direction for binning. Defaults to 0.0.

  • wd_max (float, optional) -- Maximum wind direction for binning. Defaults to 360.0.

  • ws_step (float, optional) -- Step size for wind speed bins. Defaults to 1.0.

  • ws_min (float, optional) -- Minimum wind speed for binning. Defaults to 0.0.

  • ws_max (float, optional) -- Maximum wind speed for binning. Defaults to 50.0.

  • N_min (int, optional) -- Minimum number of samples within a bin for it to be considered valid. Defaults to 3.

  • plot (bool, optional) -- Whether to generate a plot of the binned data counts. Defaults to False.

Returns:

DataFrame containing the gridded solution table.

Return type:

pd.DataFrame