Skip to content

← device_io package

CognionicsInput

Receive a data stream from a Cognionics (CGX) EEG device.

This node connects directly to the Cognionics device dongle, so that it is not necessary to use the Cognionics Data Acquisition app and create an LSL stream to receive data from a supported Cognionics device. (See headset parameter for list of supported Cognionics devices.) Note that since only one application can connect to a CGX headset dongle at a time, you should close the Cognionics Data Acquisition app before running a pipeline with this node, or this node will not find the headset. In addition to Windows, this node supports connecting to a CGX device on Linux systems. (Note: you may first need to add a udev rule to give your user permission to access the USB port; see instructions in node error message if you run into this.) More Info... Version 1.7.3

Ports/Properties

data

Data received.

  • verbose name: Data
  • default value: None
  • port type: DataPort
  • value type: Packet (can be None)
  • data direction: OUT

headset

Headset model to detect. Set to Auto to automatically detect the model from the headset name. Select a particular model to find the headset of that model without specifying the headset name, or to force this node to use settings from that model regardless of the headset name. Other is equivalent to Auto and is deprecated. If set to None, this node will be skipped altogether.

  • verbose name: Headset
  • default value: Auto
  • port type: EnumPort
  • value type: object (can be None)

headset_name

Specify headset name explicitly. This is optional and if given, takes precedence over the headset selector. An attempt will be made to determine the headset model from the name. If no model can be determined, you can set the channel names and baud rate manually.

  • verbose name: Headset Name
  • default value: None
  • port type: StringPort
  • value type: str (can be None)

standard_config

Assume device is set to default factory settings. This includes: number of channels, channel labels, sampling rate.

  • verbose name: Standard Device Configuration
  • default value: True
  • port type: BoolPort
  • value type: bool (can be None)

channel_names

Override channel labels. If a list is provided, the channel labels of the data stream will be overridden accordingly. This takes precedence over the standard device configuration property.

  • verbose name: Override Channel Labels
  • default value: []
  • port type: ListPort
  • value type: list (can be None)

sampling_rate

Sampling rate of device if not default. This takes precedence over the standard configuration when set. If standard configuration is not selected and the sampling rate is not specified, it will be computed from the data.

  • verbose name: Override Sampling Rate
  • default value: None
  • port type: IntPort
  • value type: int (can be None)

baud_rate

Baud rate in MBps. Leave empty to select known default for the selected device.

  • verbose name: Baud Rate
  • default value: None
  • port type: IntPort
  • value type: int (can be None)

max_buflen

Maximum amount of data to buffer. In seconds. If NeuroPype stalls for more than this, then some data will be lost.

  • verbose name: Maximum Buffer Length
  • default value: 60
  • port type: IntPort
  • value type: int (can be None)

impedance_check

Enable impedance check. Note that removing this from the data requires a filter. You may want to disable this before recording/processing your data.

  • verbose name: Impedance Check
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

mitigate_packet_loss

Mitigate packet loss. If enabled, this will repeat the last valid sample in case of a lost packet. The packet counter of these samples will be set to the invalid value of -1 so that other routines that inspect packet counters can do the appropriate treatment (e.g., reject data).

  • verbose name: Mitigate Packet Loss
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

signal_unit

Unit in which the signal will be output. Recommended default is microvolts (uV).

  • verbose name: Signal Unit
  • default value: uV
  • port type: EnumPort
  • value type: str (can be None)

max_data_gap

Maximum gap in the data stream, in seconds. If no data is being received for longer than this, an error log message is generated. (An info log message will also be generated if data resumes.

  • verbose name: Max Data Gap
  • default value: 2
  • port type: FloatPort
  • value type: float (can be None)

verbose

Verbose output for testing; also writes a snippet of raw bytestream to disk in ~/.n europype/testing/cgx_bytes.txt.

  • verbose name: Verbose
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

linux_port

Linux only: device port to use, i.e ., /dev/ttyUSB0. In most cases this can be left empty and the USB ports will be automatically scanned and the appropriate one used. Note that you may need to enable permissions for your user to access the ttyUSB port on Linux. See explanation in node error message if you run into a permission denied error.

  • verbose name: Linux Port
  • default value:
  • port type: StringPort
  • value type: str (can be None)

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

  • verbose name: Set Breakpoint (Debug Only)
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

  • verbose name: Metadata
  • default value: {}
  • port type: DictPort
  • value type: dict (can be None)