From a180a8328d9ae3a169307bff5e95ba8276ba07f2 Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Fri, 2 Jun 2023 17:36:46 +0200 Subject: [PATCH 1/2] [MISC] clarify duplications with different extensions are not permitted --- src/common-principles.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/common-principles.md b/src/common-principles.md index 2565b8076c..947760d355 100644 --- a/src/common-principles.md +++ b/src/common-principles.md @@ -196,6 +196,18 @@ as the labels would collide on a case-insensitive filesystem. Additionally, because the suffix `eeg` is defined, then the suffix `EEG` will not be added to future versions of the standard. +## No duplicate files under different file extensions + +BIDS datasets MUST NOT contain identical data under different extensions. +For example if the files + +- `sub-01_ses-01_sample-A_photo.jpg` and +- `sub-01_ses-01_sample-A_photo.tif` + +contain a representation of the same data, +then the dataset curator MUST decide for one of the two extensions +and delete the other file from the BIDS dataset. + ## Filesystem structure & Filenames richness versus distinctness BIDS provides a rich filesystem structure and rich filenames by using entities, but it is important to keep in mind that files also have to be readable. From 1368a0fe41648750a1e9911644a8efa3c946bdb8 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Tue, 6 Jun 2023 15:33:45 -0400 Subject: [PATCH 2/2] ENH: Reword section to discuss uniqueness of data files --- src/common-principles.md | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/common-principles.md b/src/common-principles.md index 947760d355..356a35eb00 100644 --- a/src/common-principles.md +++ b/src/common-principles.md @@ -196,17 +196,22 @@ as the labels would collide on a case-insensitive filesystem. Additionally, because the suffix `eeg` is defined, then the suffix `EEG` will not be added to future versions of the standard. -## No duplicate files under different file extensions - -BIDS datasets MUST NOT contain identical data under different extensions. -For example if the files - -- `sub-01_ses-01_sample-A_photo.jpg` and -- `sub-01_ses-01_sample-A_photo.tif` - -contain a representation of the same data, -then the dataset curator MUST decide for one of the two extensions -and delete the other file from the BIDS dataset. +## Uniqueness of data files + +Data files MUST be uniquely identified by BIDS path components +(entities, datatype, suffix). +If multiple extensions are permissible (for example, `.nii` and `.nii.gz`), +there MUST only be one such file with the same entities, datatype and suffix. +This limitation does not apply to metadata files, +such as JSON sidecar files or format-specific metadata files. + +Note that duplicating files to make the same data available in multiple formats +is not permitted. +For example, if the files `sub-01_ses-01_sample-A_photo.jpg` and +`sub-01_ses-01_sample-A_photo.tif` contain a representation of the same data, +then the dataset MUST NOT contain both images. +If the files contain different images, +other entities MUST be used to distinguish the two. ## Filesystem structure & Filenames richness versus distinctness