Skip to content

BlackrockRawIO: read the nev headers when load_nev is False - #1954

Open
h-mayorquin wants to merge 4 commits into
NeuralEnsemble:masterfrom
h-mayorquin:nev_false
Open

h-mayorquin wants to merge 4 commits into
NeuralEnsemble:masterfrom
h-mayorquin:nev_false

Conversation

@h-mayorquin

Copy link
Copy Markdown
Contributor

Right now load_nev=False makes BlackrockRawIO ignore the .nev file completely. But spec 2.1 .nsX files take their gains from the .nev headers and every spec takes rec_datetime from them. So with load_nev=False spec 2.1 recordings come back unscaled and all recordings lose their date. SpikeInterface always passes load_nev=False and that is how SpikeInterface/spikeinterface#4911 was found.

This PR reads the .nev headers whenever the file exists and keeps only the spikes and events behind load_nev. The new test reads a spec 2.1 file from gin with load_nev=False and checks its gains and date. This depends on #1953 as reading the headers with load_nev=False would otherwise make the file with the odd channel ids throw here too. I also updated the load_nev docstring, and avail_nev in the block annotations now reports whether the file exists. This should close #1942.

@h-mayorquin

Copy link
Copy Markdown
Contributor Author

@cboulay could you review this one when you have time?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BlackrockRawIO: load_nev=False drops the scaling of spec 2.1 recordings

1 participant