-
Notifications
You must be signed in to change notification settings - Fork 70
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
RFC: keeping track of subject ID #1048
Comments
Hi! In MNE-BIDS we always followed the philosophy that the BIDS sidecar files are authoritative and the source of truth. Hence, overwriting a mismatching value in the raw data file upon reading is expected behavior and I would say it doesn't warrant a warning, or if it does we'd have to warn at many many more places too for consistency. Documentation could certainly be improved, though... |
For this part at least yes, would be good to check and error out early as it indicates a bug with the derivative source space I think |
I agree with both Richard and Eric on this. |
I hit a tricky problem recently when trying to monkey-patch the funloc data to emulate session-specific MRIs. I don't think there's actually any bug anywhere, but things are odd enough that I thought it was worth documenting what I encountered, and seeing what others think about it. Here's what I noticed:
raw.info["subject_info"]["his_id"]
with the value from theparticipant_id
column ofparticipants.tsv
. This is not unreasonable, but surprised me, especially given that (I think?) it doesn't warn in cases where they don't match.raw
,info["subject_info"]["his_id"]
gets propogated throughproc-sss
,proc-filt
,proc-clean_epo
, and_ave
, as expected.get_fs_subject()
which populatesconfig.fs_subject
(and might be, e.g., a template MRI, AKA a different subject name/ID). That is then passed tomne.setup_source_spaces
and ends up insurf["subject_his_id"]
for eachsurf
in the source space (the first of which is also aliased atsource_space._subject
).source_space._subject
then gets propogated toforward["src"]._subject
and from there toinverse_operator["src"]._subject
and then tostc.subject
subject
coming ultimately fromparticipants.tsv
, while theinverse
will havesubject
coming fromconfig.fs_subject
(which might be different), andapply_inverse
will complain if they don't match.I'm pretty sure what went wrong in my case was that the source space object already existed in the dataset (so step (3) above didn't happen), and the existing source space had the wrong subject identifier, which didn't cause problems until
apply_inverse
. I wonder if it's worth:his_id
if it doesn't match what's already in there (not a fix for my "problem", but maybe worth doing anyway)apply_inverse
to learn there was a problem.(Aside): Probably I'm wrong about this, but it seems the current situation would actually not work for cases where, e.g., the freesurfer subjects directory is maintained separately from the experimental data, and has different conventions for subject identifiers (e.g., FS subject
0027
is in one experimentsub-01
and in another experiment issub-05
). My postdoc lab did something like that: all experiments used the same freesurferSUBJECTS_DIR
, in order to re-use structural MRIs for folks who participated in multiple experiments. Of course it's easy enough to work around it by making a copy of the subset of freesurfer subjects that you need for the current experiment, and changing folder and file names... but it seems like that shouldn't be necessary.cc @hoechenberger @sappelhoff @larsoner for ideas/opinions.
The text was updated successfully, but these errors were encountered: