Skip to content. | Skip to navigation

Sections
Personal tools
You are here: Home Forum Using data sets How can I read the pvc-3 data in matlab?

How can I read the pvc-3 data in matlab?

Up to I want to change format to mp3

How can I read the pvc-3 data in matlab?

Posted by unset at May 31. 2011

The data is in the format of spk, how can I transform it to mat?

Re: How can I read the pvc-3 data in matlab?

Posted by Tim Blanche at May 31. 2011

The spike timestamps are in microseconds, data format is binary 64-bit unsigned integers, as described on pg.9 of the user guide.

You can read them in Matlab with the following two lines:

fid = fopen(filename.spk)

a = fread(fid, 'uint64')

good luck!

Tim.

Re: How can I read the pvc-3 data in matlab?

Posted by Christopher Hillar at June 15. 2014

in Python, i used 

http://pythonhosted.org/bitstring/index.html

with code:

 

from bitstring import Bits

fname = 'data/Blanche/crcns_pvc3_cat_recordings/drifting_bar/spike_data/t02.spk'

f = open(fname, 'rb')

p = Bits(f)

fmt = str(p.length / 64) + ' * (intle:64)'

time_stamps = p.unpack(fmt)  #  in microseconds

 

Powered by Ploneboard
Document Actions