ImportFile¶
Import data from a supported file format.
This node acts as a meta-importer that can import from any file format supported by NeuroPype. The node determines the format based on the file extension. Note that some limitations apply, in particular, file formats that come as a folder of files (Tucker-Davis) can currently not be imported directly from a cloud storage location, and need to be downloaded before they can be processed. Some file formats have additional options that can be set on import, so we recommend looking at the documentation for the specific file format you are importing, and if you need to change any of those defaults you may want to use the specific Import node for that file format. This node can also take a set of files of the same format and concatenate them into a single packet (see documentation on the filename parameter), providing all files have the same characteristics (e.g., same channels, sampling rate, etc.) Version 1.3.2
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/). The filename can also contain wildcard characters, in which case all matching files will be imported and concatenated in alphabetical order into a single packet. (To import multiple files as separate datasets, use the PathIterator node before this node.)
- verbose name: Filename
- default value:
- port type: StringPort
- value type: str (can be None)
segments¶
List of segment indices to import (0-based). For data sets with multiple segments (blocks of trials, recording discontinuities, etc), list the segments to be imported. Set to None (default) to import all segments. segments that fall outside time_bounds will be ignored. time_bounds that fall outside the segments will be ignored. Not currently supported for all file formats. Deprecated; use SelectRange after import or the Import node for the specific file format if segments is supported.
- verbose name: Segments To Import
- default value: None
- port type: ListPort
- value type: list (can be None)
time_bounds¶
Time limits for data import. Set to None (default) to import all available data. segments that fall outside time_bounds will be ignored. time_bounds that fall outside the segments will be ignored. Not currently supported for all file formats. Deprecated; use SelectRange after import to trim data, or the Import node for the specific file format if time_bounds is supported.
- verbose name: Import Time Range
- default value: None
- port type: ListPort
- value type: list (can be None)
load_signals¶
Load analog signals into an analogsignals stream. Set to False to save loading time if analog signals are not needed. Deprecated; use the Import node for the specific file format if load_signals is supported.
- verbose name: Load Signals
- default value: True
- port type: BoolPort
- value type: bool (can be None)
signal_autoscale¶
Auto-scale analog signal to Voltage (float). Set to False to keep data in original format (int). Deprecated; use the Import node for the specific file format if signal_autoscale is supported.
- verbose name: Signal Autoscale
- default value: True
- port type: BoolPort
- value type: bool (can be None)
load_events¶
Load events into a markers stream. Deprecated as by default event markers are loaded into a markers stream. If you don't want the marker stream use the ExtractStreams to drop it after import, or use the import node for the specific file format if load_events is supported.
- verbose name: Load Events
- default value: True
- port type: BoolPort
- value type: bool (can be None)
retain_streams¶
List of streams to retain. The order doesn't actually matter (it's always data streams first, marker streams second). Only supported for multi-modal file formats (XDF). Deprecated; use ImportXDF for XDF files or the ExtractStreams node after import.
- verbose name: Retain Streams
- default value: None
- port type: Port
- value type: object (can be None)
use_streamnames¶
Use the stream names in the file to name streams. If enabled, the streams loaded will be named as in the file. Otherwise, the streams use canonical names based on the content type, such as eeg or markers. Currently only supported for multi-modal file formats (XDF). If retain_streams is specified, then this will always be True.
- verbose name: Use Streamnames
- default value: True
- port type: BoolPort
- value type: bool (can be None)
stim_channel¶
The name of the stim channel in the file, in cases where it cannot be automatically deduced. If the file has more than one stim channel, specify as a comma-separated list. Enclose any channel names with spaces in single quotes. This property is specific to the following file formats: EDF, VHDR. Deprecated; use ImportEDF or ImportVHDR instead.
- verbose name: Stim Channel
- default value:
- port type: StringPort
- value type: str (can be None)
allow_insecure_filetypes¶
Whether to allow passing in file types that may pose security risks. This applies to, e.g., pickle files.
- verbose name: Allow Insecure Filetypes
- default value: False
- port type: BoolPort
- value type: bool (can be None)
use_caching¶
Enable caching. Will use cached imported data, if available, instead of reimporting.
- verbose name: Use Caching
- default value: False
- port type: BoolPort
- value type: bool (can be None)
exclude_channels¶
List of channel names to exclude when importing EDF files (this is ignored for any other format). Typically we recommend using Select Range node after import to filter channels, however, EDF files may contain channels with different sampling rates and it is known behavior for channels of lower sampling rate to enforce upsampling to the imported channel with the highest sampling rate. Excluding unwanted channels at higher sampling rates during import will avoid this. Deprecated; use ImportEDF instead.
- verbose name: Exclude Channels
- default value: []
- port type: ListPort
- value type: list (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)