Skip to content

BlackrockRawIO: read spec 2.1 channels missing from the nev unscaled instead of raising - #1953

Open
h-mayorquin wants to merge 1 commit into
NeuralEnsemble:masterfrom
h-mayorquin:blackrock_key_error
Open

h-mayorquin wants to merge 1 commit into
NeuralEnsemble:masterfrom
h-mayorquin:blackrock_key_error

Conversation

@h-mayorquin

Copy link
Copy Markdown
Contributor

Right now BlackrockRawIO loads the gains of spec 2.1 .nsX files from the .nev. The header of a spec 2.1 .nsX only lists the channel ids, with no scaling, and the .nev has a digitization factor per electrode id. So the reader looks up each channel id in the .nev, and if one of them is not there it throws a KeyError and the whole file can't be read.

This PR keeps the channels that are not in the .nev unscaled and throws a warning with their ids instead of the error. That is what master gives with load_nev=False. We have a recording like that on gin, from a public dataset written by Central 7.0.3: its .nsX lists channel ids like 131073 (0x00020001) while its .nev numbers the electrodes 1 to 32. I don't know why the ids were written like that. I added it to entities_to_test.

I need this before the fix for #1942 as that fix reads the .nev headers also with load_nev=False. I also renamed elid and dig_factor to full names in that function.

@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.

1 participant