mne.io.read_raw_cnt#

mne.io.read_raw_cnt(input_fname, eog=(), misc=(), ecg=(), emg=(), *, data_format='auto', date_format='mm/dd/yy', recompute_n_samples=None, header='auto', preload=False, verbose=None)[source]#

Read CNT data as raw object.

Note

2d spatial coordinates (x, y) for EEG channels are read from the file header and fit to a sphere to compute corresponding z-coordinates. If channels assigned as EEG channels have locations far away from the head (i.e. x and y coordinates don’t fit to a sphere), all the channel locations will be distorted (all channels that are not assigned with keywords eog, ecg, emg and misc are assigned as EEG channels). If you are not sure that the channel locations in the header are correct, it is probably safer to replace them with mne.io.Raw.set_montage(). Montages can be created/imported with:

Parameters:
input_fnamepath-like

Path to the data file.

eoglist | tuple | 'auto' | 'header'

Names of channels or list of indices that should be designated EOG channels. If ‘header’, VEOG and HEOG channels assigned in the file header are used. If 'auto', channel names containing 'EOG' are used. Defaults to empty tuple.

misclist | tuple

Names of channels or list of indices that should be designated MISC channels. Defaults to empty tuple.

ecglist | tuple | 'auto'

Names of channels or list of indices that should be designated ECG channels. If 'auto', the channel names containing 'ECG' are used. Defaults to empty tuple.

emglist | tuple

Names of channels or list of indices that should be designated EMG channels. If ‘auto’, the channel names containing ‘EMG’ are used. Defaults to empty tuple.

data_format'auto' | 'int16' | 'int32'

Defines the data format the data is read in. If 'auto', it is determined from the file header using numsamples field. Defaults to 'auto'.

date_format'mm/dd/yy' | 'dd/mm/yy'

Format of date in the header. Defaults to 'mm/dd/yy'.

recompute_n_samplesbool | None

If True, if the file size is under 2GB, the number of data samples is computed using the location of the event (annotations) table. This is a workaround for files with incorrect number of samples specified in the header. For files over 2GB, the number of samples cannot be recomputed, and an error will be raised if this value is True. None (default) will recompute the number of samples if the value from the header is not positive.

New in v1.12.0.

header'auto' | 'new' | 'old'

Defines the header format. Used to describe how bad channels are formatted. If auto, reads using old and new header and if either contain a bad channel make channel bad. Defaults to 'auto'.

New in v1.6.

preloadbool | str

Preload data into memory for data manipulation and faster indexing. If True, the data will be preloaded into memory (fast, requires large amount of memory). If preload is a string, it is the name of a freshly created memory-mapped file used to store the data on the hard drive (slower, requires less memory). An existing file is overwritten. The caller owns the file and is responsible for removing it after the Raw object is no longer in use. For supported Raw readers, the exact string "auto" instead reuses decoded data below the directory configured by mne.set_cache_dir(). Entries persist without a size limit and are mapped copy-on-write. Use Path("auto") for a literal filename.

Changed in version 1.13: Support for the "auto" decoded-data cache was added.

verbosebool | str | int | None

Control verbosity of the logging output. If None, use the default verbosity level. See the logging documentation and mne.verbose() for details. Should only be passed as a keyword argument.

Returns:
rawinstance of RawCNT

The raw data. See mne.io.Raw for documentation of attributes and methods.

See also

mne.io.Raw

Documentation of attributes and methods of RawCNT.

Notes

New in v0.12.

Examples using mne.io.read_raw_cnt#

Importing data from EEG devices

Importing data from EEG devices