catalystneuro / distributed-coding-matnwb

Converting the "Distributed coding" dataset to NWB using MATLAB
BSD 2-Clause "Simplified" License
1 stars 1 forks source link

spike times transpose #13

Closed cechava closed 2 years ago

cechava commented 2 years ago

Fixes issue #12

PSTH plots can be produced for published Steinmetz DANDIset

bendichter commented 2 years ago

Are you sure that this isn't due to some changes that you made, that changes how data that is read is oriented?

cechava commented 2 years ago

I've double checked and I'm using the master branch of the matnwb repo when this issue comes up. I haven't marged any changes in I/O.

The logic of the error also makes sense.

In HDF5, spikes_times is a dataset of size (N,). It currently get loaded into MatNWB into a matrix of size (N,1). The cell2mat function is trying to concatenate multiple arrays of size (N,1), but it requires the arrays to be matched in the number of rows (1st dimension). Hence, why I need to transpose the arrays.