Skip to content

← file_system package

RecordToXDF

Record data into a xdf file.

This node accepts a multi-channel time series and streams it to a file, incrementally. The result can be read with MATLAB(tm), Python, C++, or any other framework that can parse XDF. This node will interpret your data as a multi-channel time series, even if it is not: if your packets have additional axes, like frequency, feature, and so on, these will be automatically vectorized into a flat list of channels. Also, if you send data with multiple instances (segments) into this node, subsequent instances will be concatenated along time, so the data written to the file will appear contiguous and non-segmented (channels by samples). Stream properties ("props") are saved to XDF under the tag for each stream, making them available to ImportXDF (see ImportXDF documentation), and other XDF importers (pyxdf, EEGLAB, etc.). Version 1.6.0

Ports/Properties

data

Data to record.

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

output_path

The full path of the output file.

  • verbose name: Output Path
  • default value: None
  • port type: DataPort
  • value type: str (can be None)
  • data direction: OUT

filename

Filename 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.xdf
  • 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)

allow_double

Allow double-precision sample values. If set to False, double-precision values will be written as single- precision data (except time stamps, which are always double precision).

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

cloud_partsize

Part size for streaming cloud uploads. When streaming data to the cloud, parts of this size (in MB) will be buffered up in memory and then uploaded.

  • verbose name: Cloud Partsize
  • default value: 30
  • port type: IntPort
  • value type: int (can be None)

retrievable

Upload parts so they can be retrieved individually.

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

delete_parts

Delete parts after all data is recorded and uploaded. Only applicable is Retrievable parts is set to True.

  • verbose name: Delete Parts After Completion
  • default value: True
  • port type: BoolPort
  • value type: bool (can be None)

preserve_original_metadata

This preserves the original metadata from the LSL stream, included in the <desc> tag, as it is without any modifications or manipulation of channel names. This option ensures that the <desc> field in the XDF file is an exact match of the LSL stream. If False, the original metadata is still saved to <desc><original> in the XDF file, available for reference, but will not overwrite the top-level tags.

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

close_on_marker

Close when encountering this marker. When this node encounters this marker string, the recording is closed at the next opportunity. Note that this may not complete immediately, especially if there is still outstanding data to be written. For this reason, it is recommended to keep the program running for some time after sending this marker, especially when running in the cloud.

  • verbose name: Close On Marker
  • default value: close-recording
  • port type: StringPort
  • value type: str (can be None)

verbose

Print verbose output.

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

session_notes

Session notes. These notes will be written into the file header.

  • verbose name: Session Notes
  • 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)

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)