flasc.data_processing.northing_offset_change_hoger.homogenize_hoger

flasc.data_processing.northing_offset_change_hoger.homogenize_hoger#

flasc.data_processing.northing_offset_change_hoger.homogenize_hoger(scada: DataFrame | FlascDataFrame, var: str = 'wd', threshold: int = 1000, reference: str = 'last', plot_it: bool = False, max_depth: int = 4, ccp_alpha: float = 0.09) tuple[DataFrame, DataFrame][source]#

Homogenization routine of the Scada directions of the different wind turbines based on "var".

The Scada data is explored by applying a regression tree procedure to the differences in direction nof the wind turbines to get the most common jumps and their positions. These jumps are then reversed to correct the deviations.

Parameters:
  • scada (Union[pd.DataFrame, FlascDataFrame]) -- DataFrame containing the SCADA data.

  • var (str, optional) -- Variable to homogenize (yaw or wd). Defaults to 'wd'.

  • threshold (int, optional) -- Threshold for discretization. Defaults to 1000.

  • reference (str, optional) -- Reference point for homogenization. Defaults to 'last'.

  • plot_it (bool, optional) -- Whether to plot the results. Defaults to False.

  • max_depth (int, optional) -- Maximum depth of the regression tree. Defaults to 4.

  • ccp_alpha (float, optional) -- Complexity parameter for pruning. Defaults to 0.09

Returns:

Homogenized SCADA data and the results used to

homogenize it with the jumps and their knots.

Return type:

tuple[pd.DataFrame, pd.DataFrame]