-
Notifications
You must be signed in to change notification settings - Fork 161
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
Specify 0 vs 1 based indexing within BIDS #499
Comments
It could be relevant to MRI, though it's unusual. I would interpret this as a "volume index" instead of event onset in seconds, and so I would be heavily inclined toward 0-indexing because that would be how you index a multidimensional array in pretty much everything but MATLAB. My top criterion would be consistency. Within the standard, we should either always use 0-indexing or 1-indexing. I don't know that we currently have a situation where we impose one or the other, but if we do, we should stick with it. If we don't, again I would advocate 0-indexing for simplicity's sake. |
just some fyi: |
Most iEEG datasets I have used are also 1-based sample indexes. |
Re @satra's comment: Right, the Here's the "slice index zero" text:
I think this could be changed to "the slice with the smallest index" without losing any specificity, as we encode a series of values and not their indices, so I also wouldn't consider this precedent. |
Hi all, chiming in on this issue to say I would love it if the BIDS spec was explicit about the starting position for the onsets sample column. Given that this is described as an onset, I think it should start at 0 not 1. If we had an event at time 0seconds the resulting onset in the units of a functional MRI would be 0 as well. At least, this is convention when modelling data using onsets in "scans" in SPM. |
Triggered by @VisLab's comment in #1043, I am reading this again. There are two problems:
Regarding 1.:
Reading this again, I think our current rule means that the same indexing is to be used as in the raw data file. For example BrainVision EEG data files use 1+ indexing (section 4.3, second sentence in their data format specification), so obviously having a However, this is still problematic when the And furthermore it does not address the general problem that we don't declare an indexing style across BIDS. I am not sure whether we could even do that in a backwards compatible way. Perhaps the most we can do would be to introduce a new metadata field at some meaningful level that could advertise 0+ vs 1+ indexing, and RECOMMEND that field. It's all a bit unsatisfactory. |
Problem
The
sample
column inevents.tsv
encodes the following:As identified by @robertoostenveld, we do not specify whether we use 0-based or 1-based indexing
This should be clarified.
potential solution
I feel like going with 1-based indexing would make sense if most recommended data formats that also encode
samples
go with it. For example, most EEG data formats have a representation of "samples".(BrainVision uses 1-based sample indexes in their datafiles (page 14 in the spec)
How about data formats in iEEG and MEG? ... is this relevant for MRI or other data types?
There is also the argument that many people are not familiar with 0-based indexing.
The text was updated successfully, but these errors were encountered: