-
Notifications
You must be signed in to change notification settings - Fork 25
Description
The BIDS fNIRS spec indicates that meta data in the SNIRF file is superseded by information in BIDS compliant tsv and json files.
Cedalion should support that.
To start, it is urgently critical to support the stimuli event labels that a user is likely to update in the events.tsv file rather than updating the events info in the snirf file directly. BIDS indicates that one should avoid ever changing the original SNIRF file, but should change meta data in the tsv files.
Here is the file naming convention from the BIDS fNIRS spec
sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_run-<index>]_nirs.snirf
sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_run-<index>]_events.tsv
It seems like a solution to this is to update
cedalion.io.read_snirf(file_path)
to check for the _events.tsv file and update the information in the stim field loaded from the snirf file with the information from the _events.tsv file.
How does that sound?
Eventually we will have to consider the meta data that could be updated in the other tsv files... but those are less likely to be updated. But the events information is definitely being updated in the tsv file and needs to be loaded.