Skip to content

← file_system package

ImportCGX

Import data from a CGX File.

This is a vendor-specific format for continuous EEG/EXG data, which is written, among others, by the CGX Patch device. Like all import nodes, this node outputs the entire data in a single large packet on the first update. In case of the Patch device, the data contains two-channel EEG, two-channel EDA, two-channel PPG, temperature, and three-axis accelerometer data. A marker stream is not present. More Info... Version 0.10.0

Ports/Properties

data

Output signal.

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

filename

Name of the recording file to import. If a relative path is given, a file of this name will be looked up in the standard data directories (/resources and Examples/).

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

device

Type of device that generated the recording. This determines the default channel labels.

  • verbose name: Device
  • default value: Patch v1.9+
  • port type: EnumPort
  • value type: str (can be None)

convert_eeg_to

Unit in which the EEG data will be returned. NeuroPype's native unit is uV for EEG data, and the V mode is mainly for easier comparison with other implementations.

  • verbose name: Convert Eeg To
  • default value: uV
  • port type: EnumPort
  • value type: str (can be None)

handle_corruptions

How to handle potential corruptions in the CGX file. - 'no': Only try the fast vectorized method and fail if corruptions are detected - 'always': Skip the vectorized method and always use the slower but more robust byte-by-byte method - 'auto': Try the fast vectorized method first, then fall back to the byte-by-byte method if corruptions are found

  • verbose name: Handle Corruptions
  • default value: auto
  • port type: EnumPort
  • value type: str (can be None)

max_gaps

Maximum number of sync byte loss events tolerated before raising an error. A sync loss occurs when bytes had to be skipped to find the next valid frame. If exceeded, the file is considered not recoverable.

  • verbose name: Max Gaps
  • default value: 20
  • port type: IntPort
  • value type: int (can be None)

max_gap_length

Maximum gap length (in samples) that will be filled by copying the previous sample. If exceeded, the file is considered not recoverable.

  • verbose name: Max Gap Length
  • default value: 1500
  • port type: IntPort
  • value type: int (can be None)

corrupted_counter_threshold

Gap size beyond which it is assumed that the sample counter is corrupted.

  • verbose name: Corrupted Counter Threshold
  • default value: 5000
  • port type: IntPort
  • value type: int (can be None)

file_missing

Whether to raise an exception (error) if the file is missing or not found (which may stop the pipeline), or print a log message and continue.

  • verbose name: File Missing
  • default value: raise
  • port type: EnumPort
  • 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)

cloud_host

Cloud storage host to use (if any). You can override this option to select from what kind of cloud storage service data should be downloaded. On some environments (e.g., on NeuroScale), the value Default will be map to the default storage provider on that environment.

  • verbose name: Cloud Host
  • default value: Default
  • port type: EnumPort
  • value type: str (can be None)

cloud_account

Cloud account name on storage provider (use default if omitted). You can override this to choose a non-default account name for some storage provider (e.g., Azure or S3.). On some environments (e.g., on NeuroScale), this value will be default-initialized to your account.

  • verbose name: Cloud Account
  • default value:
  • port type: StringPort
  • value type: str (can be None)

cloud_bucket

Cloud bucket to read from (use default if omitted). This is the bucket or container on the cloud storage provider that the file would be written to. On some environments (e.g., on NeuroScale), this value will be default-initialized to a bucket that has been created for you.

  • verbose name: Cloud Bucket
  • default value:
  • port type: StringPort
  • value type: str (can be None)

cloud_credentials

Secure credential to access cloud data (use default if omitted). These are the security credentials (e.g., password or access token) for the the cloud storage provider. On some environments (e.g., on NeuroScale), this value will be default-initialized to the right credentials for you.

  • verbose name: Cloud Credentials
  • default value:
  • port type: StringPort
  • value type: str (can be None)