-
Notifications
You must be signed in to change notification settings - Fork 88
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
Make use of AssociatedEmptyRoom field in *_meg.json #493
Comments
can you check if any datasets actually use this field? I think it's a fairly new field but I'm not sure |
I could, but is that relevant? :) Just suggesting to add it for writing, and respect it when reading, if it's present at all |
It will help you understand how to write the code. For example, looking here tells me that it's not always in a sidecar associated with a file. It's always good to ground oneself in reality ;-) |
Sorry, I cannot follow you… the file you linked to has an entry:
and this file, in fact, does exist in the dataset. 🧐 |
but which raw file is it for? |
Ooooh now I see what you mean! I didn't even know this was allowed in BIDS … |
welcome to BIDS inheritance principle :) the specification is too complex sometimes. |
Still: when writing, we could write this attribute -- we'll be in full control of where to put it. Reading -- needs to be discussed. |
sometimes .... |
hahaha. I believe for ephys, |
place to complain/discuss about this --> bids-standard/bids-2-devel#36 I see two problems with the inheritance principle:
|
My main concern is that there is no central authority one can query when looking at a subject's individual data. I feel that ideally, either everything would be specified in the BIDS root – or on the same level as participants' data files. And not split across different levels, including inheritance… Ugh, what a standard… |
higher levels of hierarchy do take precedence ...
can you please complain on the bids-specification github and/or forums? :-P Sometimes I feel I'm the only one shouting ;-) |
* Make use of AssociatedEmptyRoom field in *_meg.json Fixes #493 * Remove new property * flake * Apply suggestions from code review * Fix * Missing whitespace * Update changelog * Try to fix Windows * Another attempt to fix Windows * Hopefully fix Windows tests * Reformat
I don't know how I could have missed this all this time, but the
*_meg.json
sidecar files support a fieldAssociatedEmptyRoom
:I think we should make use of this.
By default,
write_raw_bids()
should try to retrieve the matching empty-room recording viamne_bids.get_matched_empty_room()
(which would imply that empty-room data need to be added to the BIDS folder first, before adding participants' recordings).To explicitly specify an empty-room recording,
write_raw_bids
should gain a kwargemptyroom_session=None
, which would accept a string with the name of the associated empty-room session. This can then be used bywrite_raw_bids()
to construct the relative path to the requested empty-room recording file.In both cases (default behavior where we infer the empty-room recording, and in cases where users explicitly request an empty-room recording),
write_raw_bids()
would add the correctAssociatedEmptyRoom
to the JSON sidecar file.Only question that remains is what to do in cases where empty-room recordings are missing / how to design the API such that this case would be covered too.
get_matched_emptyroom()
would be updated to first check if there's anAssociatedEmptyRoom
entry in the sidecar; and only if not, it would actually start looking at the file names in the dataset.Would like to hear your thoughts on that!
The text was updated successfully, but these errors were encountered: