Skip to content
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

0- vs 1-indexing the run keyword in use_heuristic() #89

Closed
rmarkello opened this issue Dec 10, 2019 · 6 comments · Fixed by #209
Closed

0- vs 1-indexing the run keyword in use_heuristic() #89

rmarkello opened this issue Dec 10, 2019 · 6 comments · Fixed by #209
Labels
Discussion Discussion of a concept or implementation. Need to stay always open.

Comments

@rmarkello
Copy link
Member

In #76 (comment) a brief discussion was started about whether the run keyword should be 0- or 1-indexed when users provide a heuristic to convert their data to BIDS format. We are currently using a 0-indexing approach; I personally think a 1-indexing approach makes more sense here, but am open to discussion on this point!

@smoia found a relevant portion of the BIDS spec that touches on this, but the spec is not prescriptive on this point. I'm happy to hear others thoughts and go about issuing a change if it's decided that's warranted!

@rmarkello rmarkello added the Discussion Discussion of a concept or implementation. Need to stay always open. label Dec 10, 2019
@smoia
Copy link
Member

smoia commented Dec 10, 2019

I see that actually we were talking about two different things.
I thought you were referring to padding - that's the only thing the specs refer to.
I didn't find anything related to 0- or 1- indexing, although most of the examples are 1-indexed.

As we don't support multiple files or multiscan files yet, if we want to implement this we should also think about a way to check that then different calls of phys2bids respect the overall indexing, i.e. if the user adopts a 0-indexing and has -0 -1 -2 we don't overwrite -1.
(If it's not clear let me know).

@smoia smoia added this to the phys2bids first non-beta milestone Feb 5, 2020
@smoia
Copy link
Member

smoia commented Apr 9, 2020

@rmarkello let's get back to this issue. Shall we agree on suggesting the user to adopt a 1-indexed run keyword, and remain agnostic about it?

@rmarkello
Copy link
Member Author

I am for starting at run-01 and indexing up from there (i.e., run-00 should not be allowed), yes!

@smoia
Copy link
Member

smoia commented Apr 9, 2020

Do you think we need to add something to the code as it is now to accommodate for this decision?

@rmarkello
Copy link
Member Author

It looks like there are a few instances in the heuristic files provided with phys2bids where run-00 is used:

if fnmatch.fnmatchcase(physinfo, '*samefreq*'):
task = 'test'
run = '00'
rec = 'biopac'

if fnmatch.fnmatchcase(physinfo, '*tutorial*'):
task = 'test'
run = '00'
rec = 'labchart'

These heuristics and all relevant tests / documentation would need to be updated to reflect this decision.

@smoia
Copy link
Member

smoia commented Apr 9, 2020

That's right - actually, those values are just an example. We can definitely change them without any big impact!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Discussion of a concept or implementation. Need to stay always open.
Projects
None yet
2 participants