-
Notifications
You must be signed in to change notification settings - Fork 111
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
Extend validator for crosstalk+finecalib for FIF #1053
Conversation
Note, if the current spec for these two files turns out to be a total pain, we could still make some adjustments to the spec -> https://github.com/bids-standard/bids-specification/pull/581/files That is: we could constrain a bit more on how to store the files, if that makes our lives easier for the validation! (For example, require that the two files MUST be stored on the subject/session/meg level) |
I think your list covers all reasonable storage locations |
@sappelhoff I cannot push to your fork, could you grant me permission please? |
done, I gave you (temporary) maintainer permissions :-) |
Neat 🥳 Instead of extending the existing regexp and making it even harder to parse for a human brain, I simply added two new regexps for fine-calibration and cross-talk files |
Say… I just realized that modality-specific files like |
yes, I think that's correct. @robertoostenveld can you weigh in with some advice on how you would store crosstalk+calibration files for FIF, please? This looks a bit odd to me:
What I think we should make valid (just finecalib examples here, crosstalk should be the same):
I think what's missing from this and what you @hoechenberger wanted is
but that collides with the "meg" stuff should be stored in |
This is actually quite common, as these files typically only change with system service every 6 months or so. So if we drop this, we should do it for other reasons than "it's not a common use case" 😅
I don't understand this, actually. Assume I have a long-running study with only a single session for each participant, but with a large number of participants. In that case, it's possible that the files do change between participants.
Yep, so this one is clear and crisp 😁
Yeah, this is the one you pointed out as looking a little odd.
Yep. I mean. To make our lives super easy, we could decide to only allow
But let's see what @robertoostenveld thinks :) |
I'd be fine to allow it :)
this kind of syntax would also cover studies where the calib/crosstalk changes mid study:
True ... that's tempting as well. However we decide, I am +1 on adjusting the spec from bids-standard/bids-specification#581 to include a more complete list of examples on how we want users to specify crosstalk + finecalibration |
So now I gotta ask: what's the "BIDS philosophy" when addressing questions like these? I, personally, would be totally fine requiring these paths:
and not allowing anything else. Super clear, super restrictive. Would lead to some redundancy in most studies (storing the exact same files a bunch of times, for each session / participant) But that's not how the BIDS specification is usually designed, right? |
would be fine with me in principle
you see redundancy in a lot of places in BIDS ... and yet in other places you find the inheritance principle to reduce that redundancy. In our case I would consider this kind of redundancy fine.
Just a side note: BIDS is continuously evolving and growing, so its initial design (whatever it was) has long been overhauled, changed, extended --> that's one of BIDS's drawbacks and advantages: We can accommodate a lot and we can work with the community and adapt ... at the expense of sometimes being clunky and not as strict as other standards are. |
This dataset: also has a bunch of |
… and considering all of that. Maybe we can just leave things (in this PR) as they are, and only need to adjust the specs? To recap, the supported paths are:
|
but they are 😬 Over the course of this discussion and sleeping over it, I am now tending towards making our lives easy at first, and only allow:
Pros:
Cons:
Action items:
Sunday morning thought:
PS:
|
@sappelhoff I agree with everything you said I will do the adjustments to this PR later today, and propose adjustments to the specs where needed. We can always extend the specs later to include more storage places should it turn out to be required. Until then, maybe it's super clean to store all MEG stuff under |
…files Based on discussion in bids-standard/bids-validator#1053 Specifically see bids-standard/bids-validator#1053 (comment)
@sappelhoff
as discussed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome, I can't approve technically because GitHub counts this as my own PR, but I consider this +1
Thanks a bunch! ... but before merging, I want @rwblair to have a look at this and approve or suggest changes.
Keep ses match in capturing group, but wrap in a non capturing group that requires the trailing slash. Current regex has that slash as always optional, would allow a file name that started with ses-<label> like as well as allowing the valid ses-<label>/sub-<label>_ses-<label>_acq-calibration_meg.fif
Awesome, thanks @rwblair and @sappelhoff! |
And thanks @hoechenberger as well :-) |
I did not have time earlier, but just read up on this. The proposed solution under "meg" (for now) looks good to me and can always be improved/extended in the future. Perhaps for future consideration is that this |
We accidentally mixed up the Elekta/Neuromag/MEGIN cross-talk and fine-calibration files' extensions, `.fif` and `.dat`, respectively, in bids-standard#1053.
We accidentally mixed up the Elekta/Neuromag/MEGIN cross-talk and fine-calibration files' extensions, `.fif` and`.dat`, respectively, in bids-standard#1053.
We accidentally mixed up the Elekta/Neuromag/MEGIN cross-talk and fine-calibration files' extensions, `.fif` and`.dat`, respectively, in #1053.
We accidentally mixed up the Elekta/Neuromag/MEGIN cross-talk and fine-calibration files' extensions, `.fif` and`.dat`, respectively, in bids-standard#1053.
closes #1047
Here I added some tests that must pass --> i.e., as long as they don't, we need to change the validator.
@hoechenberger please look at my suggested "good" and "bad" filenames --> do you think this is fine when reading the specification here bids-standard/bids-specification#581 and when considering your experience?
I think it should be fair enough to allow people to store their crosstalk+finecalibration files:
Can you think of other sensible places where to enable storage?
Also, can you think of other "bad filenames" (see code), if so, then we can add them to the tests to allow for better test driven development.
In any case, we should implement this part of the validator BEFORE the next release, so that if we find issues with the current spec for crosstalk+finecalib we can still adjust it without breakage issues.
cc @rwblair
PS: Everybody please feel free to push to this PR
EDIT: new related PR: bids-standard/bids-specification#598