RawDataController¶
class RawDataController(available_subclasses: Optional[Mapping[str, List[str]]] = None, **kwargs)
Bases: MetaController
Subclass of MetaController for managing raw data view-model logic.
Handles raw data plotting and PSD logic.
Public Methods¶
- RawDataController.calculate_psd(psd_data: list, samplerate: float) None¶
Calculate the Power Spectral Density (PSD) from the provided signal data and update the view.
- RawDataController.relay_eventfinding_status(status: bool) None¶
Relay the event finding status to the view for UI updates.
- Parameters:
status (bool) – Boolean indicating the result of the event finding operation.
- RawDataController.set_event_filter(data_filter: Callable) None¶
Set the data filter function used for processing events.
- Parameters:
data_filter (Callable) – A callable used to filter or preprocess the data.
- RawDataController.set_eventfinding_status(status: bool) None¶
Set the current status of the event finding process in the view.
- Parameters:
status (bool) – Boolean indicating if event finding was successful.
- RawDataController.set_num_events_allowed(num_events: int) None¶
Set the maximum number of events allowed to be processed or visualized.
- Parameters:
num_events (int) – Maximum number of events.
- RawDataController.update_available_plugins(available_plugins: dict) None¶
Relay an updated dict of available plugin keys, keyed by metaclass, to both the model and the view.
- Parameters:
available_plugins (dict) – dict of lists keyed by MetaClass, listing the identifiers of all instantiated plugins throughout the app.
- RawDataController.update_channels(num_channels: List[int]) None¶
Update the view with the current number of channels available or selected.
- Parameters:
num_channels (List[int]) – List of channel identifiers.
- RawDataController.update_plot_data(data: Any) None¶
Relay processed data to the view for plotting.
- Parameters:
data (Any) – Structured plot data.
Private Methods¶
- RawDataController._init() None¶
Perform additional initialization specific to the algorithm being implemented. Must be implemented by subclasses.
This function is called at the end of the class constructor to perform additional initialization specific to the algorithm being implemented. kwargs provided to the base class constructor are available as class attributes.