Skip to content

Commit

Permalink
Add NIRS support to BIDS
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-luke committed May 7, 2020
1 parent 1888b87 commit 66afafd
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
18 changes: 18 additions & 0 deletions bids-validator/bids_validator/rules/file_level_rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -221,5 +221,23 @@

"stimuli": {
"regexp": "^\\/(?:stimuli)\\/(?:.*)$"
},

"nirs": {
"regexp": "^\\/(sub-[a-zA-Z0-9]+)\\/(?:(ses-[a-zA-Z0-9]+)\\/)?nirs\\/\\1(_\\2)?(?:_task-[a-zA-Z0-9]+)?(?:_acq-[a-zA-Z0-9]+)?(?:_run-[0-9]+)?(?:_proc-[a-zA-Z0-9]+)?(?:_part-[0-9]+)?(_eeg\\.(@@@_nirs_type_)|(@@@_nirs_ext_@@@))$",
"tokens": {
"@@@_nirs_type_@@@": ["snirf"],
"@@@_nirs_ext_@@@": [
"_events\\.json",
"_events\\.tsv",
"_optodes\\.json",
"_optodes\\.tsv",
"_channels\\.json",
"_channels\\.tsv",
"_nirs\\.json",
"_coordsystem\\.json",
"_photo\\.jpg"
]
}
}
}
14 changes: 14 additions & 0 deletions bids-validator/bids_validator/rules/session_level_rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,19 @@
"_photo.jpg"
]
}
},

"nirs_ses": {
"regexp": "^\\/(sub-[a-zA-Z0-9]+)\\/(?:(ses-[a-zA-Z0-9]+)\\/)?\\1(_\\2)?(?:_task-[a-zA-Z0-9]+)?(?:_acq-[a-zA-Z0-9]+)?(?:_proc-[a-zA-Z0-9]+)?(@@@_nirs_ses_type_@@@)$",
"tokens": {
"@@@_nirs_ses_type_@@@": [
"_events.tsv",
"_channels.tsv",
"_electrodes.tsv",
"_eeg.json",
"_coordsystem.json",
"_photo.jpg"
]
}
}
}
12 changes: 12 additions & 0 deletions bids-validator/bids_validator/rules/top_level_rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,18 @@
]
}
},
"nirs_top": {
"regexp": "^\\/(?:ses-[a-zA-Z0-9]+_)?task-[a-zA-Z0-9]+(?:_acq-[a-zA-Z0-9]+)?(?:_proc-[a-zA-Z0-9]+)?(?:@@@_nirs_top_ext_@@@)$",
"tokens": {
"@@@_nirs_top_ext_@@@": [
"_nirs\\.json",
"_channels\\.tsv",
"_optodes\\.tsv",
"_photo\\.jpg",
"_coordsystem\\.json"
]
}
},
"multi_dir_fieldmap": {
"regexp": "^\\/(?:acq-[a-zA-Z0-9]+_)?(?:dir-[a-zA-Z0-9]+_)epi\\.json$"
},
Expand Down

0 comments on commit 66afafd

Please sign in to comment.