When uploading fNIRS raw data using "Review raw data" I got the error message above. Upon further inspection I realized that one of my event markers only had one total marker.
Because of this the event data is transposed in "brainstorm3\toolbox\io\in_data_snirf.m" LINE 254-256:
if size(jnirs.nirs.stim(iEvt).data,2) > size(jnirs.nirs.stim(iEvt).data,1)
jnirs.nirs.stim(iEvt).data = jnirs.nirs.stim(iEvt).data';
end
Leading to the error message at LINE 258:
isExtended = ~all(jnirs.nirs.stim(iEvt).data(:,2) == 0);
"Index in position 2 exceeds array bounds"
If I comment out LINE 254-256 the data loads just fine, but I would like to make sure that doing so will not affect further processing.
Hi Monica, there is a solution for this proposed in this PR:
We'll add the bugfix ASAP
@edelaire, it seems this PR went through the cracks.
Let me know what do you think of the proposed solution in the PR, so we address this specific one-occurrence event but once for all.