Blackrock NSx and nev files in neo

238 views
Skip to first unread message

Niccolò Bonacchi

unread,
Nov 3, 2015, 8:27:56 AM11/3/15
to Neural Ensemble
Hi all,

I have a bunch of tetrodes recording that I am performing using a BlackRock system and I was trying to open the files in either neo or spykeviewer.
Obviously things didn't work, hence the e-mail... I believe I am saving the data using the latest file specification (2.2?). 
Am I right in assuming that neo only works with <=2.1 file specifications?
If so, is anyone working on making the latest file spec compatible? If so again, can I help?  
In alternative, anyone has a changelog of 2.1 to 2.2 so I can get started?

Thanks,

N

Samuel Garcia

unread,
Nov 3, 2015, 8:54:02 AM11/3/15
to neurale...@googlegroups.com
Hi,
I wrote last year a third version of BlackrockIO.
here the PR : https://github.com/NeuralEnsemble/python-neo/pull/181
It is included in the master but not in a released evrsion.
I am not sure but I think that this new version include the v2.2 specification.
have you try with a git install ?


Samuel
--
You received this message because you are subscribed to the Google Groups "Neural Ensemble" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neuralensembl...@googlegroups.com.
To post to this group, send email to neurale...@googlegroups.com.
Visit this group at http://groups.google.com/group/neuralensemble.
For more options, visit https://groups.google.com/d/optout.

Samuel Garcia

unread,
Nov 3, 2015, 8:54:39 AM11/3/15
to neurale...@googlegroups.com
In the code there is at line 180 this:
assert h['header_id'].decode('ascii') == 'NEURALEV' or version == '2.1', 'Unsupported version {}'.format(version)

could you try to remove it and test with your file because I think that this code indeed support v2.3
If you are not able to open could you send me the file you have.



Samuel


Le 03/11/2015 14:27, Niccolò Bonacchi a écrit :

Niccolò Bonacchi

unread,
Nov 4, 2015, 6:00:11 AM11/4/15
to neurale...@googlegroups.com
Hi,

my balckrockio.py file has no assert statement anywhere
only thing I can find is:

if "".join(self.header.File_Type_ID) != 'NEURALSG':

    logging.info( "Incompatible ns5 file format. Only v2.1 is supported.\nThis will probably not work.")

on line 378


It's probably an old version?

I installed it using pip which installed it in /usr/local/lib/...

if I install python-neo binaries from universe repo it installs in /usr/lib/... and its python-neo_0.3.3-1_all.deb 

not sure if they conflict or not but they seem the same version in any case


I'll try git install as soon as I have time and let you know, running expt right now and time is a scarce resource. BTW your code looks much nicer and indeed it looks likeo it supports v2.3 its actually one of the tests (which I imagine passed)...


if it still doesn't work I'll do a fake recording session to send you, real files are kind of big :)

they should be a *.nev an *.ns3 (should be 2KHz one analog channel - sync pulse) and an *.ns5 (should be 30KHz, 32Ch) all in v2.3

(for what I read in the headers specs the big change was from 2.1 to 2.2, something about supporting pauses in recording sessions that changed the headers of the files but 2.2 and 2.3 should be compatible)


Side note: I also installed python3-neo as all my code was migrated to python 3.4 recently, then I noticed a bunch of stuff is not yet working in python3 using the version I have there is no problems in any of the imports for blackrockio.py, i.e. logging, struct, datetime, os, numpy and quantities all work fine. I believe the neo.io and neo.core also were ported? The rest should be just cleaning up the code right?


Thank you so much, I'll let you know ASAP

 
--
N

--
You received this message because you are subscribed to a topic in the Google Groups "Neural Ensemble" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/neuralensemble/kUlwtYAoXAk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to neuralensembl...@googlegroups.com.

Samuel Garcia

unread,
Nov 4, 2015, 6:20:25 AM11/4/15
to neurale...@googlegroups.com
Please uninstall your neo and install it from github latest master.
remove line 180 and test it.
For BlackrockIO 0.3.3 is very old.

Niccolò Bonacchi

unread,
Nov 19, 2015, 8:38:26 AM11/19/15
to neurale...@googlegroups.com
Works as expected thanks, old version was the problem.

I now have other problems but I will start a new string.




--
N
Reply all
Reply to author
Forward
0 new messages