EEGPrepSession#
- class EEGPrepSession(EEG=<factory>, ALLEEG=<factory>, CURRENTSET=<factory>, ALLCOM=<factory>, LASTCOM='', STUDY=None, CURRENTSTUDY=0, PLUGINLIST=<factory>)#
Bases:
objectEEGLAB-like GUI state without module globals.
- Parameters:
- add_change_listener(listener)#
Register a callback that runs after session state changes.
- Parameters:
listener (Callable[[EEGPrepSession], None])
- Return type:
None
- remove_change_listener(listener)#
Remove a previously registered session change callback.
- Parameters:
listener (Callable[[EEGPrepSession], None])
- Return type:
None
- add_command_echo_listener(listener)#
Register a callback for GUI commands to display in the console.
- remove_command_echo_listener(listener)#
Remove a previously registered command echo callback.
- add_gui_action_listener(listener)#
Register a callback for GUI action start/end notifications.
- remove_gui_action_listener(listener)#
Remove a previously registered GUI action callback.
- begin_gui_action(action)#
Notify listeners that a GUI action is about to run.
- Parameters:
action (str)
- Return type:
None
- end_gui_action(action)#
Notify listeners that a GUI action has finished.
- Parameters:
action (str)
- Return type:
None
- gui_action(action)#
Wrap a user-triggered GUI action for console/output synchronization.
- echo_command(command)#
Display a GUI command without mutating session history.
- Parameters:
command (str | None)
- Return type:
None
- notify_changed()#
Notify listeners that session-backed state changed.
- Return type:
None
- selected_dataset_indices()#
Return the selected EEGLAB-facing dataset indices in order.
- store_current(eeg, *, new=False, command='', mark_saved=False, index=None)#
Store
eegin ALLEEG and select it.
- retrieve(indices)#
Select dataset(s) from ALLEEG using 1-based indices.
- apply_workspace_state(*, eeg=<object object>, alleeg=<object object>, currentset=<object object>, allcom=<object object>, lastcom=<object object>, study=<object object>, currentstudy=<object object>, command='', append_dataset_history=False)#
Apply a GUI/console workspace update as one session transaction.
- delete_current()#
Delete the current dataset selection from memory.
Deleted slots stay empty so the other datasets keep their numbers, as in EEGLAB; the selection moves to the nearest remaining dataset.
- Return type:
None
- clear_all()#
Clear all datasets and study state.
- Return type:
None
- set_study(study, alleeg=None, *, command='')#
Set STUDY/CURRENTSTUDY and optionally replace loaded datasets.
- select_study(*, command='CURRENTSTUDY = 1')#
Select the current STUDY set in the shared workspace.
- Parameters:
command (str)
- Return type:
None
- add_history(command, *, notify=True)#
Append an EEGLAB-style command to session history.
- clear_history(*, notify=True)#
Clear command history and LASTCOM as one session mutation.
- Parameters:
notify (bool)
- Return type:
None
- remove_history(count, *, notify=True)#
Remove the most recent
countcommand-history entries.
- history_command_at(index)#
Return the 1-based command from most recent history first.
- clear_last_command(*, notify=True)#
Clear LASTCOM without deleting ALLCOM.
- Parameters:
notify (bool)
- Return type:
None
- mark_current_saved()#
Mark the current dataset selection as saved in EEG and ALLEEG.
- Return type:
None
- dataset_summaries()#
Return
(index, label, selected)tuples for the Datasets menu.