, *, preload=False, exclude_fname_patterns=None, verbose=None) RawNeuralynx[source]#

Reader for Neuralynx files.


Path to a folder with Neuralynx .ncs files.

preloadbool or str (default False)

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, preload is the file name of a memory-mapped file which is used to store the data on the hard drive (slower, requires less memory).

exclude_fname_patternslist of str

List of glob-like string patterns to exclude from channel list. Useful when not all channels have the same number of samples so you can read separate instances.

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.

rawinstance of RawNeuralynx

A Raw object containing Neuralynx data. See for documentation of attributes and methods.

See also

Documentation of attributes and methods of RawNeuralynx.


Neuralynx files are read from disk using the Neo package. Currently, only reading of the .ncs files is supported.["meas_date"] is read from the recording_opened property of the first .ncs file (i.e. channel) in the dataset (a warning is issued if files have different dates of acquisition).

Channel-specific high and lowpass frequencies of online filters are determined based on the DspLowCutFrequency and DspHighCutFrequency header fields, respectively. If no filters were used for a channel, the default lowpass is set to the Nyquist frequency and the default highpass is set to 0. If channels have different high/low cutoffs,["highpass"] and["lowpass"] are then set to the maximum highpass and minimumlowpass values across channels, respectively.

Other header variables can be inspected using Neo directly. For example:

from import NeuralynxIO  # doctest: +SKIP
fname = 'path/to/your/data'  # doctest: +SKIP
nlx_reader = NeuralynxIO(dirname=fname)  # doctest: +SKIP
print(nlx_reader.header)  # doctest: +SKIP
print(nlx_reader.file_headers.items())  # doctest: +SKIP