Description
It might be just me, but from current wording it is not 100% clear if it is only _run
and _rec
are of special treatment to be "generalized over" or any other possible key/value pair (_acq
etc). I.e. for a file
sub-<label>/[ses-<label>/]
func/
sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_ce-<label>][_dir-<label>][_rec-<label>][_run-<index>][_echo-<index>]_<contrast_label>.json
would task-<label>_<contrast_label>.json
at the top level be considered, disregarding any possibly present OPTIONAL key (like _acq
, _ce
, etc)?
What about anatomy, e.g. for a file
sub-<label>/[ses-<label>/]
anat/
sub-<label>[_ses-<label>][_acq-<label>][_ce-<label>][_rec-<label>][_run-<index>]_<suffix>.json
would <suffix>.json
be considered regardless any of the possible acq
, ce
etc present in the target subject/session specific file?
To make it totally clear, it might be worth to formulate explicitly a generic rule to generate "higher level" filename considered for inheritance for any given "leaf" file (might be already as implemented in pybids -- didn't check yet):
- strip
sub-<label>_
prefix while providing generalization across subject(s) - remove
_ses-<label>
while providing generalization across session(s) - remove any
_key-<value>
if generalizing across various types of acquisition - strip possibly present leading
_
if left only with the suffix, such as_<suffix>.json
in anat example
what do you think? Or it is just me, and current wording is sufficient (I would be ok with that)
FWIW, here is a list (click to expand) of all interesting "corner cases" across openneuro datasets
$> ls -l */*json | grep -v -e dataset_de -e participa -e task-
-rw------- 1 yoh yoh 240 Dec 4 15:36 ds000101/T1w.json
-rw------- 1 yoh yoh 247 Dec 4 15:37 ds000102/T1w.json
-rw------- 1 yoh yoh 1372 Dec 4 16:08 ds000117/acq-mprage_T1w.json
-rw------- 1 yoh yoh 82 Dec 4 16:08 ds000117/run-1_echo-1_FLASH.json
-rw------- 1 yoh yoh 82 Dec 4 16:08 ds000117/run-1_echo-2_FLASH.json
-rw------- 1 yoh yoh 82 Dec 4 16:08 ds000117/run-1_echo-3_FLASH.json
-rw------- 1 yoh yoh 82 Dec 4 16:08 ds000117/run-1_echo-4_FLASH.json
-rw------- 1 yoh yoh 82 Dec 4 16:08 ds000117/run-1_echo-5_FLASH.json
-rw------- 1 yoh yoh 82 Dec 4 16:08 ds000117/run-1_echo-6_FLASH.json
-rw------- 1 yoh yoh 82 Dec 4 16:08 ds000117/run-1_echo-7_FLASH.json
-rw------- 1 yoh yoh 83 Dec 4 16:08 ds000117/run-2_echo-1_FLASH.json
-rw------- 1 yoh yoh 83 Dec 4 16:08 ds000117/run-2_echo-2_FLASH.json
-rw------- 1 yoh yoh 83 Dec 4 16:08 ds000117/run-2_echo-3_FLASH.json
-rw------- 1 yoh yoh 83 Dec 4 16:08 ds000117/run-2_echo-4_FLASH.json
-rw------- 1 yoh yoh 83 Dec 4 16:08 ds000117/run-2_echo-5_FLASH.json
-rw------- 1 yoh yoh 83 Dec 4 16:08 ds000117/run-2_echo-6_FLASH.json
-rw------- 1 yoh yoh 83 Dec 4 16:08 ds000117/run-2_echo-7_FLASH.json
-rw------- 1 yoh yoh 146 Dec 4 15:46 ds000144/T1w.json
-rw------- 1 yoh yoh 128 Dec 4 15:47 ds000164/T1w.json
-rw------- 1 yoh yoh 204 Dec 4 15:46 ds000168/T1w.json
-rw------- 1 yoh yoh 288 Dec 4 15:42 ds000174/T1w.json
-rw------- 1 yoh yoh 1184 Dec 4 15:58 ds000201/T1w.json
-rw------- 1 yoh yoh 1127 Dec 4 15:58 ds000201/T2w.json
-rw------- 1 yoh yoh 901 Dec 4 15:59 ds000201/dwi.json
-rw------- 1 yoh yoh 209 Dec 4 15:47 ds000205/T1w.json
-rw------- 1 yoh yoh 207 Dec 4 15:41 ds000208/T1w.json
-rw------- 1 yoh yoh 141 Dec 4 15:49 ds000213/T1w.json
-rw------- 1 yoh yoh 169 Dec 4 15:48 ds000214/T1w.json
-rw------- 1 yoh yoh 226 Dec 4 15:48 ds000222/T1w.json
-rw------- 1 yoh yoh 62 Dec 4 15:48 ds000229/T1w.json
-rw------- 1 yoh yoh 285 Dec 4 15:44 ds000231/T1w.json
-rw------- 1 yoh yoh 408 Dec 4 15:49 ds000239/T1w.json
-rw------- 1 yoh yoh 217 Dec 4 15:44 ds000240/T1w.json
-rw------- 1 yoh yoh 73 Dec 4 16:05 ds000244/dir-0_epi.json
-rw------- 1 yoh yoh 74 Dec 4 16:05 ds000244/dir-1_epi.json
-rw------- 1 yoh yoh 197 Dec 4 16:05 ds000244/dwi.json
-rw------- 1 yoh yoh 252 Dec 4 15:47 ds000245/T1w.json
-rw------- 1 yoh yoh 195 Dec 4 15:42 ds000248/acq-epi_T1w.json
-rw------- 1 yoh yoh 77 Dec 4 15:42 ds000248/acq-flipangle05_run-01_MEFLASH.json
-rw------- 1 yoh yoh 78 Dec 4 15:42 ds000248/acq-flipangle30_run-01_MEFLASH.json
-rw------- 1 yoh yoh 144 Dec 4 15:48 ds000254/T1w.json
-rw------- 1 yoh yoh 176 Dec 4 15:43 ds000255/T1w.json
-rw------- 1 yoh yoh 215 Dec 4 15:55 ds001021/T1w.json
-rw------- 1 yoh yoh 157 Dec 4 15:55 ds001021/dwi.json
-rw------- 1 yoh yoh 54 Dec 4 15:55 ds001021/phasediff.json
-rw------- 1 yoh yoh 69 Dec 4 15:39 ds001105/dir-AP_epi.json
-rw------- 1 yoh yoh 68 Dec 4 15:39 ds001105/dir-PA_epi.json
-rw------- 1 yoh yoh 259 Dec 4 16:01 ds001246/T1w.json
-rw------- 1 yoh yoh 253 Dec 4 16:01 ds001246/inplaneT2.json
-rw------- 1 yoh yoh 977 Dec 4 15:52 ds001386/bold.json
-rw------- 1 yoh yoh 75 Dec 4 15:57 ds001454/phasediff.json
-rw------- 1 yoh yoh 376 Dec 4 16:04 ds001486/T1w.json
-rw------- 1 yoh yoh 247 Dec 4 16:07 ds001525/T1w.json
-rw------- 1 yoh yoh 75 Dec 4 16:09 ds001545/phasediff.json
-rw------- 1 yoh yoh 517 Dec 4 16:16 ds001597/T1w.json
-rw------- 1 yoh yoh 517 Dec 4 16:16 ds001597/T2w.json
A list (click to expand) of all interesting task- "corner cases" where it is not just task-_bold.json across openneuro datasets
$> ls -l */*json | grep -v -e dataset_de -e participa | grep task-.*_[^b]
-rw------- 1 yoh yoh 284 Dec 4 15:47 ds000164/task-stroop_events.json
-rw------- 1 yoh yoh 76 Dec 4 15:59 ds000201/task-hands_physio.json
-rw------- 1 yoh yoh 596 Dec 4 15:48 ds000214/task-Cyberball_events.json
-rw------- 1 yoh yoh 884 Dec 4 15:46 ds000234/task-motorphotic_asl.json
-rw------- 1 yoh yoh 786 Dec 4 15:44 ds000235/task-rest_asl.json
-rw------- 1 yoh yoh 786 Dec 4 15:42 ds000236/task-rest_asl.json
-rw------- 1 yoh yoh 224 Dec 4 15:47 ds000237/task-MemorySpan_acq-multiband_bold.json
-rw------- 1 yoh yoh 934 Dec 4 15:44 ds000240/task-restEyesOpen_asl.json
-rw------- 1 yoh yoh 1628 Dec 4 16:05 ds000244/task-ArchiEmotional_acq-ap_bold.json
-rw------- 1 yoh yoh 1628 Dec 4 16:05 ds000244/task-ArchiEmotional_acq-ap_sbref.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-ArchiEmotional_acq-pa_bold.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-ArchiEmotional_acq-pa_sbref.json
-rw------- 1 yoh yoh 1625 Dec 4 16:05 ds000244/task-ArchiSocial_acq-ap_bold.json
-rw------- 1 yoh yoh 1625 Dec 4 16:05 ds000244/task-ArchiSocial_acq-ap_sbref.json
-rw------- 1 yoh yoh 1624 Dec 4 16:05 ds000244/task-ArchiSocial_acq-pa_bold.json
-rw------- 1 yoh yoh 1624 Dec 4 16:05 ds000244/task-ArchiSocial_acq-pa_sbref.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ArchiSpatial_acq-ap_bold.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ArchiSpatial_acq-ap_sbref.json
-rw------- 1 yoh yoh 1625 Dec 4 16:05 ds000244/task-ArchiSpatial_acq-pa_bold.json
-rw------- 1 yoh yoh 1625 Dec 4 16:05 ds000244/task-ArchiSpatial_acq-pa_sbref.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-ArchiStandard_acq-ap_bold.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-ArchiStandard_acq-ap_sbref.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ArchiStandard_acq-pa_bold.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ArchiStandard_acq-pa_sbref.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ClipsTrn01_acq-pa_bold.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ClipsTrn01_acq-pa_sbref.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ClipsTrn02_acq-pa_bold.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ClipsTrn02_acq-pa_sbref.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-ClipsTrn03_acq-ap_bold.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-ClipsTrn03_acq-ap_sbref.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ClipsTrn04_acq-pa_bold.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ClipsTrn04_acq-pa_sbref.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ClipsTrn05_acq-pa_bold.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ClipsTrn05_acq-pa_sbref.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-ClipsTrn06_acq-ap_bold.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-ClipsTrn06_acq-ap_sbref.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ClipsTrn07_acq-pa_bold.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ClipsTrn07_acq-pa_sbref.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ClipsTrn08_acq-pa_bold.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ClipsTrn08_acq-pa_sbref.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-ClipsTrn09_acq-ap_bold.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-ClipsTrn09_acq-ap_sbref.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ClipsTrn10_acq-pa_bold.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ClipsTrn10_acq-pa_sbref.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ClipsTrn11_acq-pa_bold.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ClipsTrn11_acq-pa_sbref.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-ClipsTrn12_acq-ap_bold.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-ClipsTrn12_acq-ap_sbref.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ClipsVal01_acq-pa_bold.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ClipsVal01_acq-pa_sbref.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-ClipsVal02_acq-ap_bold.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-ClipsVal02_acq-ap_sbref.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-ClipsVal03_acq-ap_bold.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-ClipsVal03_acq-ap_sbref.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ClipsVal04_acq-pa_bold.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ClipsVal04_acq-pa_sbref.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-ClipsVal05_acq-ap_bold.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-ClipsVal05_acq-ap_sbref.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-ClipsVal06_acq-ap_bold.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-ClipsVal06_acq-ap_sbref.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ClipsVal07_acq-pa_bold.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-ClipsVal07_acq-pa_sbref.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-ClipsVal08_acq-ap_bold.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-ClipsVal08_acq-ap_sbref.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-ClipsVal09_acq-ap_bold.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-ClipsVal09_acq-ap_sbref.json
-rw------- 1 yoh yoh 1623 Dec 4 16:05 ds000244/task-ContRing_acq-ap_bold.json
-rw------- 1 yoh yoh 1623 Dec 4 16:05 ds000244/task-ContRing_acq-ap_sbref.json
-rw------- 1 yoh yoh 1622 Dec 4 16:05 ds000244/task-ExpRing_acq-pa_bold.json
-rw------- 1 yoh yoh 1622 Dec 4 16:05 ds000244/task-ExpRing_acq-pa_sbref.json
-rw------- 1 yoh yoh 1624 Dec 4 16:05 ds000244/task-HcpEmotion_acq-ap_bold.json
-rw------- 1 yoh yoh 1624 Dec 4 16:05 ds000244/task-HcpEmotion_acq-ap_sbref.json
-rw------- 1 yoh yoh 1623 Dec 4 16:05 ds000244/task-HcpEmotion_acq-pa_bold.json
-rw------- 1 yoh yoh 1623 Dec 4 16:05 ds000244/task-HcpEmotion_acq-pa_sbref.json
-rw------- 1 yoh yoh 1625 Dec 4 16:05 ds000244/task-HcpGambling_acq-ap_bold.json
-rw------- 1 yoh yoh 1625 Dec 4 16:05 ds000244/task-HcpGambling_acq-ap_sbref.json
-rw------- 1 yoh yoh 1624 Dec 4 16:05 ds000244/task-HcpGambling_acq-pa_bold.json
-rw------- 1 yoh yoh 1624 Dec 4 16:05 ds000244/task-HcpGambling_acq-pa_sbref.json
-rw------- 1 yoh yoh 1624 Dec 4 16:05 ds000244/task-HcpLanguage_acq-ap_bold.json
-rw------- 1 yoh yoh 1624 Dec 4 16:05 ds000244/task-HcpLanguage_acq-ap_sbref.json
-rw------- 1 yoh yoh 1623 Dec 4 16:05 ds000244/task-HcpLanguage_acq-pa_bold.json
-rw------- 1 yoh yoh 1623 Dec 4 16:05 ds000244/task-HcpLanguage_acq-pa_sbref.json
-rw------- 1 yoh yoh 1622 Dec 4 16:05 ds000244/task-HcpMotor_acq-ap_bold.json
-rw------- 1 yoh yoh 1622 Dec 4 16:05 ds000244/task-HcpMotor_acq-ap_sbref.json
-rw------- 1 yoh yoh 1621 Dec 4 16:05 ds000244/task-HcpMotor_acq-pa_bold.json
-rw------- 1 yoh yoh 1621 Dec 4 16:05 ds000244/task-HcpMotor_acq-pa_sbref.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-HcpRelational_acq-ap_bold.json
-rw------- 1 yoh yoh 1627 Dec 4 16:05 ds000244/task-HcpRelational_acq-ap_sbref.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-HcpRelational_acq-pa_bold.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-HcpRelational_acq-pa_sbref.json
-rw------- 1 yoh yoh 1623 Dec 4 16:05 ds000244/task-HcpSocial_acq-ap_bold.json
-rw------- 1 yoh yoh 1623 Dec 4 16:05 ds000244/task-HcpSocial_acq-ap_sbref.json
-rw------- 1 yoh yoh 1622 Dec 4 16:05 ds000244/task-HcpSocial_acq-pa_bold.json
-rw------- 1 yoh yoh 1622 Dec 4 16:05 ds000244/task-HcpSocial_acq-pa_sbref.json
-rw------- 1 yoh yoh 1619 Dec 4 16:05 ds000244/task-HcpWm_acq-ap_bold.json
-rw------- 1 yoh yoh 1619 Dec 4 16:05 ds000244/task-HcpWm_acq-ap_sbref.json
-rw------- 1 yoh yoh 1618 Dec 4 16:05 ds000244/task-HcpWm_acq-pa_bold.json
-rw------- 1 yoh yoh 1618 Dec 4 16:05 ds000244/task-HcpWm_acq-pa_sbref.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-RSVPLanguage00_acq-ap_bold.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-RSVPLanguage00_acq-ap_sbref.json
-rw------- 1 yoh yoh 1625 Dec 4 16:05 ds000244/task-RSVPLanguage00_acq-pa_bold.json
-rw------- 1 yoh yoh 1625 Dec 4 16:05 ds000244/task-RSVPLanguage00_acq-pa_sbref.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-RSVPLanguage01_acq-ap_bold.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-RSVPLanguage01_acq-ap_sbref.json
-rw------- 1 yoh yoh 1625 Dec 4 16:05 ds000244/task-RSVPLanguage01_acq-pa_bold.json
-rw------- 1 yoh yoh 1625 Dec 4 16:05 ds000244/task-RSVPLanguage01_acq-pa_sbref.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-RSVPLanguage02_acq-ap_bold.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-RSVPLanguage02_acq-ap_sbref.json
-rw------- 1 yoh yoh 1625 Dec 4 16:05 ds000244/task-RSVPLanguage02_acq-pa_bold.json
-rw------- 1 yoh yoh 1625 Dec 4 16:05 ds000244/task-RSVPLanguage02_acq-pa_sbref.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-RSVPLanguage03_acq-ap_bold.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-RSVPLanguage03_acq-ap_sbref.json
-rw------- 1 yoh yoh 1625 Dec 4 16:05 ds000244/task-RSVPLanguage03_acq-pa_bold.json
-rw------- 1 yoh yoh 1625 Dec 4 16:05 ds000244/task-RSVPLanguage03_acq-pa_sbref.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-RSVPLanguage04_acq-ap_bold.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-RSVPLanguage04_acq-ap_sbref.json
-rw------- 1 yoh yoh 1625 Dec 4 16:05 ds000244/task-RSVPLanguage04_acq-pa_bold.json
-rw------- 1 yoh yoh 1625 Dec 4 16:05 ds000244/task-RSVPLanguage04_acq-pa_sbref.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-RSVPLanguage05_acq-ap_bold.json
-rw------- 1 yoh yoh 1626 Dec 4 16:05 ds000244/task-RSVPLanguage05_acq-ap_sbref.json
-rw------- 1 yoh yoh 1625 Dec 4 16:05 ds000244/task-RSVPLanguage05_acq-pa_bold.json
-rw------- 1 yoh yoh 1625 Dec 4 16:05 ds000244/task-RSVPLanguage05_acq-pa_sbref.json
-rw------- 1 yoh yoh 1623 Dec 4 16:05 ds000244/task-WedgeAnti_acq-ap_bold.json
-rw------- 1 yoh yoh 1623 Dec 4 16:05 ds000244/task-WedgeAnti_acq-ap_sbref.json
-rw------- 1 yoh yoh 1622 Dec 4 16:05 ds000244/task-WedgeAnti_acq-pa_bold.json
-rw------- 1 yoh yoh 1622 Dec 4 16:05 ds000244/task-WedgeAnti_acq-pa_sbref.json
-rw------- 1 yoh yoh 1623 Dec 4 16:05 ds000244/task-WedgeClock_acq-ap_bold.json
-rw------- 1 yoh yoh 1623 Dec 4 16:05 ds000244/task-WedgeClock_acq-ap_sbref.json
-rw------- 1 yoh yoh 1622 Dec 4 16:05 ds000244/task-WedgeClock_acq-pa_bold.json
-rw------- 1 yoh yoh 1622 Dec 4 16:05 ds000244/task-WedgeClock_acq-pa_sbref.json
-rw------- 1 yoh yoh 843 Dec 4 15:48 ds000254/task-bilateralfingertapping_echo-1_bold.json
-rw------- 1 yoh yoh 842 Dec 4 15:48 ds000254/task-bilateralfingertapping_echo-2_bold.json
-rw------- 1 yoh yoh 843 Dec 4 15:48 ds000254/task-bilateralfingertapping_echo-3_bold.json
-rw------- 1 yoh yoh 843 Dec 4 15:48 ds000254/task-bilateralfingertapping_echo-4_bold.json
-rw------- 1 yoh yoh 2345 Dec 4 15:55 ds001021/task-BREATHHOLD_acq-1400_bold.json
-rw------- 1 yoh yoh 1916 Dec 4 15:55 ds001021/task-CHECKERBOARD_acq-1400_bold.json
-rw------- 1 yoh yoh 1605 Dec 4 15:55 ds001021/task-CHECKERBOARD_acq-645_bold.json
-rw------- 1 yoh yoh 1593 Dec 4 15:55 ds001021/task-rest_acq-1400_bold.json
-rw------- 1 yoh yoh 1314 Dec 4 15:55 ds001021/task-rest_acq-645_bold.json
-rw------- 1 yoh yoh 1134 Dec 4 15:55 ds001021/task-rest_acq-CAP_bold.json
-rw------- 1 yoh yoh 76 Dec 4 16:11 ds001553/task-checkerboard_events.json
-rw------- 1 yoh yoh 869 Dec 4 16:16 ds001597/task-cuedMFM_events.json
-rw------- 1 yoh yoh 25 Dec 4 16:18 ds001600/task-rest_acq-AP_bold.json
-rw------- 1 yoh yoh 25 Dec 4 16:18 ds001600/task-rest_acq-PA_bold.json
-rw------- 1 yoh yoh 25 Dec 4 16:18 ds001600/task-rest_acq-v1_bold.json
-rw------- 1 yoh yoh 25 Dec 4 16:18 ds001600/task-rest_acq-v2_bold.json
-rw------- 1 yoh yoh 25 Dec 4 16:18 ds001600/task-rest_acq-v4_bold.json
edit 1: "The constraint"
another not entirely clear aspect to me, which is the not spelled out, is the requirement to have only a single "applicable" file at any given level, which is demonstrated in Example 1: Two JSON files at same level that are applicable for NIfTI file.:
"violating the constraint that no more than one file may be defined at a given level of the directory structure"
(wording around soon to be tuned up a bit in a https://github.com/bids-standard/bids-specification/pull/98/files#diff-ba564f153b960d803d493fe37fbbb34eL148). I do not see a clear definition of such constraint in the actual text describing inheritance principle. While working on fixing auto aggregation of common fields into the top level files to be inherited within heudiconv I placed myself into a corner with an example of having e.g.
sub-1_task-task1_run-1_bold.json
andsub-1_task-task1_acq-X_run-1_bold.json
per subject (should be ok), and then trying to aggregate over them while retaining also _acq-
if defined. Then I would end up with
task-task1_bold.json
task-task1_acq-X_bold.json
at the top level. Is this legit???
Should then _acq-X_bold
leaf files inherit also from task-task1_bold.json
? It shouldn't be so I guess.
And it is not just a matter of having that constraint "no more than one file may be defined at a given level of the directory structure", because I could potentially place the _acq-X
in per-subject directory, thus avoiding it. It is a matter of clear definition on how we "expand" the common filename to match any leaf one. If it is a matter of the fact that we could expand into a leaf file with arbitrary additional _key-value
pairs, then the situation above could be "Ok" so that task-task1_acq-X_bold.json
could extend (or overwrite, but not delete) fields defined in task-task1_bold.json
.