blueetl.extract.windows

Windows extractor.

Classes

Windows(df, cached, filtered)

Windows extractor class.

class blueetl.extract.windows.Windows(df: DataFrame, cached: bool, filtered: bool)

Bases: BaseExtractor

Windows extractor class.

Initialize the extractor.

Parameters:
  • df – Pandas DataFrame containing the extracted data.

  • cached – True if the data have been extracted from the cache, False otherwise.

  • filtered – True if the data have been filtered using a custom query, False otherwise.

classmethod from_simulations(simulations: Simulations, windows_config: dict[str, str | WindowConfig], trial_steps_config: dict[str, TrialStepsConfig], resolver: Resolver) Windows

Return a new Windows instance from the given simulations and configuration.

Parameters:
  • simulations – Simulations extractor.

  • windows_config – configuration dict.

  • trial_steps_config – configuration dict.

  • resolver – resolver instance.

Returns:

new instance.

Return type:

Windows

get_bounds(window: str) tuple[float, float]

Return the interval (t_start, t_stop) for the specified window.

The returned values don’t depend on the simulation or the trial, because they are relative the offset, that is the only changing value.

get_duration(window: str) float

Return the duration of the specified window.

get_number_of_trials(window: str) int

Return the number of trials for the specified window.