Skip to content

← file_system package

ExportEDF

Export EEG data to a file in the EDF+ or BDF+ format.

The EDF family of file formats is quite well supported across EEG hardware vendors, and can be used to store raw or processed continuous (non-segmented) time series data. However, EDF is a lossy format in that the data is quantized to a relatively low number of bits per sample (16-bit), and the types of meta-data per channel, per recording, or per event are quite limited. If the incoming packet contains multiple EEG (or other signal) streams, each stream can be saved to a separate EDF file or the channels from all streams can be concatenated together (see the fuse_streams property). This node also exports any event markers (strings) contained in event streams (if in the Packet), as EDF+ Annotations. If the packet contains multiple event marker streams, all markers from all streams will be exported. If creating multiple EDF files (multiple signal streams), the event markers will be exported to all files. EDF/BDF stores each channel's physical minimum and maximum in 8-character header fields, so the data should be in an appropriate unit (e.g. uV for EEG): values whose magnitude needs more than 8 characters (such as data mislabeled as V but really in uV) cannot be represented and will lose precision. Use the FixSignalUnit node (or otherwise rescale) beforehand if needed; this node warns when the range is too large. The original EDF (precursor to EDF+) format is not supported. For higher precision recording (32-bit), multimodal storage, and more extensive metadata and event marker capabilities, use XDF. More Info... Version 1.5.2

Ports/Properties

data

Input signal.

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

filename

File name to export data to. Can be the full path or a relative path or filename if `output_root is specified.

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

output_root

Path to the output folder; if specified, the filename will be relative to this folder. Alternatively, this can be left empty and the full path may be specified in filename).

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

file_type

Among other differences, EDF+ uses 16 bits/sample and BDF+ uses 24 bits/sample.

  • verbose name: File Type
  • default value: EDF+
  • port type: EnumPort
  • value type: str (can be None)

unit

Unit in which the EEG will be recorded to EDF. uV is the recommended unit. The EEG will be scaled accordingly if needed. In special circumstances, i.e., you are exporting non-EEG channels, or EEG and non-EEG channels, to the same EDF file and you don't want to scale the non-EEG channels, set this to "noscaling" and use the FixSignalUnit node before this on the EEG channels only (assuming they're a separate stream upstream) if necessary.

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

fuse_streams

If the incoming data contains multiple signal streams, write them into a single EDF file (concatenating the channels). This requires that all streams have the same number of samples. If False, each stream will be written to a separate EDF file and the stream name will be appended to the end of the filename specified in the filename property.

  • verbose name: Fuse Streams
  • default value: True
  • port type: BoolPort
  • value type: bool (can be None)

modality_prefix

If True, the channel names will be prefixed with the modality name (e.g ., EEG, EOG, EMG) to distinguish them in the EDF file, as per the EDF channel label naming convention (modality + space + label). If False, channel labels will be written as they appear in the incoming Space axis.

  • verbose name: Modality Prefix
  • default value: True
  • port type: BoolPort
  • value type: bool (can be None)

more_markers

Write more than one marker (annotation) per sec. This will work, but the resulting EDF may not be correctly read by all EDF import libraries. (Recommend using XDF instead where possible.)

  • verbose name: Write >1 Marker/sec
  • default value: False
  • port type: BoolPort
  • value type: bool (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)