-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug in Matnwb: use nwb.units.getRow() to retrieve "waveforms" data #301
Comments
Sorry for putting this issue in wrong place |
@ln-vidrio |
@jjumao2 yes it's possible the |
How is your |
Actually, it'd be helpful if you provided the snippet of code which populated the Unit table. |
nwb.units = types.core.Units( ... waveforms_vector = VectorData with properties:
waveforms_index_vector = VectorIndex with properties:
waveforms_index_index_vector = VectorIndex with properties:
16 spikes are detected. Each spike is dectected by one channel.
ans = 1×8 table
|
@jiumao2 Can you pull from that branch and try |
Is it related to the "colname" or dimension of "waveforms"?
When I tried to form new dataset with identical codes, the function "util.create_indexed_column()" didn't work. I met the following error:
|
If you have the dataset creation script that would be helpful as there are a multitude of ways to actually create dynamic tables. It currently looks like your I have fixed the |
a: 1060195 |
So if I'm reading this right, you wish to divide the entire I'm also seeing that your data is a matrix and not an actual vector. That might be a bug on our end. |
@jiumao2 I have fixed multidimensional matrices. Without manually debugging your ragged array indices, I'm not sure what other issue this could be. Would it be possible to reformat the code such that your code uses addRow instead? For instance, if your table only has 16 rows, you can do this: dt = types.hdmf_common.DynamicTable('colnames', {'waveforms'});
matDims = [1060195 64];
numRows = 16;
segmentSize = floor(matDims(1) / numRows);
lastSeg = segmentSize + mod(matDims(1), segmentSize);
for i = 1:(numRows - 1)
dt.addRow('waveforms', repmat(i, [segmentSize matDims(2)]));
end
dt.addRow('waveforms', repmat(numRows, [lastSeg matDims(2)])); Not dynamically generating the data obviously. |
Closed as stale |
I wonder whether you have modified nwb.units.getRow() to get "waveforms" data?
I think I have set "waveforms_index" and "waveforms_index_index" right.
The "waveforms" data can't be retrieved with nwb.units.getRow(), while "spikes_time" can be retrieved normally.
This is what I have:
The text was updated successfully, but these errors were encountered: