question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to read neuralynx .ntt files

See original GitHub issue

The block of code below yields an error when I’m trying to read neuralynx .ntt files.

import spikeinterface.extractors as se 

folder_path_ntt = "/home/adityab/SpikeInterfaceTest/aditya-clustering/data"
recording_ntt = se.read_neuralynx(folder_path=folder_path_ntt)

IndexError Traceback (most recent call last) Cell In [1], line 4 1 import spikeinterface.extractors as se 3 folder_path_ntt = “/home/adityab/SpikeInterfaceTest/aditya-clustering/data” ----> 4 recording_ntt = se.read_neuralynx(folder_path=folder_path_ntt)

File ~/spikeinterface/spikeinterface/core/core_tools.py:27, in define_function_from_class.<locals>.reader_func(*args, **kwargs) 25 @copy_signature(source_class) 26 def reader_func(*args, **kwargs): —> 27 return source_class(*args, **kwargs)

File ~/spikeinterface/spikeinterface/extractors/neoextractors/neuralynx.py:29, in NeuralynxRecordingExtractor.init(self, folder_path, stream_id, stream_name, all_annotations) 27 def init(self, folder_path, stream_id=None, stream_name=None, all_annotations=False): 28 neo_kwargs = self.map_to_neo_kwargs(folder_path) —> 29 NeoBaseRecordingExtractor.init(self, stream_id=stream_id, 30 stream_name=stream_name, 31 all_annotations=all_annotations, 32 **neo_kwargs) 33 self._kwargs.update(dict(folder_path=str(folder_path)))

File ~/spikeinterface/spikeinterface/extractors/neoextractors/neobaseextractor.py:62, in NeoBaseRecordingExtractor.init(self, stream_id, stream_name, block_index, all_annotations, **neo_kwargs) 59 raise ValueError(f"This reader have several streams: \nNames: {stream_names}\nIDs: {stream_ids}. " 60 f"Specify it with the ‘stram_name’ or ‘stream_id’ arguments") 61 else: —> 62 stream_id = stream_ids[0] 63 stream_name = stream_names[0] 64 else:

IndexError: list index out of range

Here’s a link to the zipped data folder with the ntt files: https://drive.google.com/file/d/1VzxCXIc7ZLL5_0kVqVULEYDVwGIlQWUf/view?usp=sharing

I would appreciate any help on this issue.

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
alejoe91commented, Dec 22, 2022

Exactly! The .NTT contains sorted data, so you need the read sorting function

0reactions
ABehal2020commented, Dec 22, 2022

Given a spike interface extractor, a recording and sorting object may be generated. Does the recording object contain data that is ready to be preprocessed and subsequently spike sorted while the sorting object contains data already sorted for spike trains?

Read more comments on GitHub >

github_iconTop Results From Across the Web

TechTip: Neuralynx Data File Formats
Neuralynx acquisition software, Cheetah and Pegasus, save data in several ... Spike files (.nse, .nst, .ntt) are made up of 32 samples.
Read more >
Converting ntt files into mda · Issue #145 · magland/mountainlab
Yes, the .ntt file contains the raw data. When you load the data into MATLAB using the Neuralynx provided conversion function, ...
Read more >
Getting started with Neuralynx data - FieldTrip toolbox
The Neuralynx acquisition software writes a variety of file formats. ... All channels/files within that directory can be read simultaneously ...
Read more >
Neo Documentation
that uses them will fail on loading: ... bl = r.read() # read the entire file > a Block ... Class for reading...
Read more >
NeuroExplorer Manual | Plexon
Reading and Writing NeuroExplorer Data Files 32 ... download from www.r-project.org) and install R-project to be able to use this functionality of.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found