Paradigm Presenter

class gpype.frontend.widgets.paradigm_presenter.ParadigmPresenter[source]

Bases: Widget, UDPReceiver

Control widget for g.tec Paradigm Presenter integration.

Provides interface for loading, starting, and stopping paradigms using the g.tec Paradigm Presenter library. Inherits from UDPReceiver to receive stimulus onset messages from Paradigm Presenter via UDP. Supports folder-based paradigm selection and manual file loading. Note that Paradigm Presenter must be installed and licensed separately.

class Configuration[source]

Bases: Configuration

Configuration class for Paradigm Presenter parameters.

class OptionalKeys[source]

Bases: OptionalKeys

Optional configuration keys.

Optional rather than required: a key listed in Keys must be present and non-None, and a presenter may legitimately be created without a paradigm so the user can pick one.

PARADIGM = 'paradigm'

Path to the paradigm file or folder. Recorded so that a presenter rebuilt from its configuration opens the same paradigm instead of falling back to the file dialog.

__init__(paradigm=None, refresh_rate=None, edge_id=None, **kwargs)[source]

Initialize the Paradigm Presenter control widget.

Initializes both the Widget UI components and UDPReceiver for receiving stimulus onset messages from Paradigm Presenter.

Parameters:
  • paradigm (str) – Path to paradigm file (.xml) or folder containing paradigm files. If None, uses file dialog.

  • refresh_rate (float) – Repaints per second. Defaults to DEFAULT_REFRESH_RATE.

  • edge_id (Optional[str]) – Which edge runs this node, matched against the edge process’s –edge-id. None, the default, is every edge; ignored when the pipeline is not distributed.

  • **kwargs – Additional configuration, including the values a stored configuration supplies when this widget is rebuilt.

Raises:

NotImplementedError – If not running on Windows.

terminate()[source]

Clean up resources when the widget is terminated.

Closes Paradigm Presenter windows and shuts down the presenter before calling the parent terminate method.