-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #402 from Remi-Gau/res_in_derivative
[FIX] Add resolution metadata in derivative
- Loading branch information
Showing
33 changed files
with
83 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
"""Add resolution metadata if json filename contains the res entity.""" | ||
import json | ||
from pathlib import Path | ||
from rich import print | ||
|
||
root = Path(__file__).parent.parent | ||
|
||
files_to_update = root.glob("sub-*/*/sub*res-2*.json") | ||
|
||
for event in files_to_update: | ||
with open(event) as f: | ||
metadata = json.load(f) | ||
metadata["Resolution"] = "2mm, isotropic" | ||
with open(event, "w") as f: | ||
json.dump(metadata, f, indent=2) |
3 changes: 2 additions & 1 deletion
3
ds000001-fmriprep/sub-10/anat/sub-10_space-MNI152NLin2009cAsym_res-2_desc-brain_mask.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"RawSources": "tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-02_desc-brain_mask.nii.gz", | ||
"Type": "Brain" | ||
"Type": "Brain", | ||
"Resolution": "2mm, isotropic" | ||
} |
5 changes: 3 additions & 2 deletions
5
ds000001-fmriprep/sub-10/anat/sub-10_space-MNI152NLin2009cAsym_res-2_desc-preproc_T1w.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"SkullStripped": true | ||
} | ||
"SkullStripped": true, | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
...-10_task-balloonanalogrisktask_run-1_space-MNI152NLin2009cAsym_res-2_desc-brain_mask.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"RawSources": [ | ||
"sub-10/func/sub-10_task-balloonanalogrisktask_run-01_bold.nii.gz" | ||
] | ||
], | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
...0_task-balloonanalogrisktask_run-1_space-MNI152NLin2009cAsym_res-2_desc-preproc_bold.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"RepetitionTime": 2.0, | ||
"SkullStripped": false, | ||
"TaskName": "balloon analog risk task" | ||
"TaskName": "balloon analog risk task", | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
...-10_task-balloonanalogrisktask_run-2_space-MNI152NLin2009cAsym_res-2_desc-brain_mask.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"RawSources": [ | ||
"sub-10/func/sub-10_task-balloonanalogrisktask_run-02_bold.nii.gz" | ||
] | ||
], | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
...0_task-balloonanalogrisktask_run-2_space-MNI152NLin2009cAsym_res-2_desc-preproc_bold.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"RepetitionTime": 2.0, | ||
"SkullStripped": false, | ||
"TaskName": "balloon analog risk task" | ||
"TaskName": "balloon analog risk task", | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
...-10_task-balloonanalogrisktask_run-3_space-MNI152NLin2009cAsym_res-2_desc-brain_mask.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"RawSources": [ | ||
"sub-10/func/sub-10_task-balloonanalogrisktask_run-03_bold.nii.gz" | ||
] | ||
], | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
...0_task-balloonanalogrisktask_run-3_space-MNI152NLin2009cAsym_res-2_desc-preproc_bold.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"RepetitionTime": 2.0, | ||
"SkullStripped": false, | ||
"TaskName": "balloon analog risk task" | ||
"TaskName": "balloon analog risk task", | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
ds000001-fmriprep/sub-11/anat/sub-11_space-MNI152NLin2009cAsym_res-2_desc-brain_mask.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"RawSources": "tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-02_desc-brain_mask.nii.gz", | ||
"Type": "Brain" | ||
"Type": "Brain", | ||
"Resolution": "2mm, isotropic" | ||
} |
5 changes: 3 additions & 2 deletions
5
ds000001-fmriprep/sub-11/anat/sub-11_space-MNI152NLin2009cAsym_res-2_desc-preproc_T1w.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"SkullStripped": true | ||
} | ||
"SkullStripped": true, | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
...-11_task-balloonanalogrisktask_run-1_space-MNI152NLin2009cAsym_res-2_desc-brain_mask.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"RawSources": [ | ||
"sub-11/func/sub-11_task-balloonanalogrisktask_run-01_bold.nii.gz" | ||
] | ||
], | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
...1_task-balloonanalogrisktask_run-1_space-MNI152NLin2009cAsym_res-2_desc-preproc_bold.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"RepetitionTime": 2.0, | ||
"SkullStripped": false, | ||
"TaskName": "balloon analog risk task" | ||
"TaskName": "balloon analog risk task", | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
...-11_task-balloonanalogrisktask_run-2_space-MNI152NLin2009cAsym_res-2_desc-brain_mask.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"RawSources": [ | ||
"sub-11/func/sub-11_task-balloonanalogrisktask_run-02_bold.nii.gz" | ||
] | ||
], | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
...1_task-balloonanalogrisktask_run-2_space-MNI152NLin2009cAsym_res-2_desc-preproc_bold.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"RepetitionTime": 2.0, | ||
"SkullStripped": false, | ||
"TaskName": "balloon analog risk task" | ||
"TaskName": "balloon analog risk task", | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
...-11_task-balloonanalogrisktask_run-3_space-MNI152NLin2009cAsym_res-2_desc-brain_mask.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"RawSources": [ | ||
"sub-11/func/sub-11_task-balloonanalogrisktask_run-03_bold.nii.gz" | ||
] | ||
], | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
...1_task-balloonanalogrisktask_run-3_space-MNI152NLin2009cAsym_res-2_desc-preproc_bold.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"RepetitionTime": 2.0, | ||
"SkullStripped": false, | ||
"TaskName": "balloon analog risk task" | ||
"TaskName": "balloon analog risk task", | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
ds000001-fmriprep/sub-13/anat/sub-13_space-MNI152NLin2009cAsym_res-2_desc-brain_mask.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"RawSources": "tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-02_desc-brain_mask.nii.gz", | ||
"Type": "Brain" | ||
"Type": "Brain", | ||
"Resolution": "2mm, isotropic" | ||
} |
5 changes: 3 additions & 2 deletions
5
ds000001-fmriprep/sub-13/anat/sub-13_space-MNI152NLin2009cAsym_res-2_desc-preproc_T1w.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"SkullStripped": true | ||
} | ||
"SkullStripped": true, | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
...-13_task-balloonanalogrisktask_run-1_space-MNI152NLin2009cAsym_res-2_desc-brain_mask.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"RawSources": [ | ||
"sub-13/func/sub-13_task-balloonanalogrisktask_run-01_bold.nii.gz" | ||
] | ||
], | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
...3_task-balloonanalogrisktask_run-1_space-MNI152NLin2009cAsym_res-2_desc-preproc_bold.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"RepetitionTime": 2.0, | ||
"SkullStripped": false, | ||
"TaskName": "balloon analog risk task" | ||
"TaskName": "balloon analog risk task", | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
...-13_task-balloonanalogrisktask_run-2_space-MNI152NLin2009cAsym_res-2_desc-brain_mask.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"RawSources": [ | ||
"sub-13/func/sub-13_task-balloonanalogrisktask_run-02_bold.nii.gz" | ||
] | ||
], | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
...3_task-balloonanalogrisktask_run-2_space-MNI152NLin2009cAsym_res-2_desc-preproc_bold.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"RepetitionTime": 2.0, | ||
"SkullStripped": false, | ||
"TaskName": "balloon analog risk task" | ||
"TaskName": "balloon analog risk task", | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
...-13_task-balloonanalogrisktask_run-3_space-MNI152NLin2009cAsym_res-2_desc-brain_mask.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"RawSources": [ | ||
"sub-13/func/sub-13_task-balloonanalogrisktask_run-03_bold.nii.gz" | ||
] | ||
], | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
...3_task-balloonanalogrisktask_run-3_space-MNI152NLin2009cAsym_res-2_desc-preproc_bold.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"RepetitionTime": 2.0, | ||
"SkullStripped": false, | ||
"TaskName": "balloon analog risk task" | ||
"TaskName": "balloon analog risk task", | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
ds000001-fmriprep/sub-16/anat/sub-16_space-MNI152NLin2009cAsym_res-2_desc-brain_mask.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"RawSources": "tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-02_desc-brain_mask.nii.gz", | ||
"Type": "Brain" | ||
"Type": "Brain", | ||
"Resolution": "2mm, isotropic" | ||
} |
5 changes: 3 additions & 2 deletions
5
ds000001-fmriprep/sub-16/anat/sub-16_space-MNI152NLin2009cAsym_res-2_desc-preproc_T1w.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"SkullStripped": true | ||
} | ||
"SkullStripped": true, | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
...-16_task-balloonanalogrisktask_run-1_space-MNI152NLin2009cAsym_res-2_desc-brain_mask.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"RawSources": [ | ||
"sub-16/func/sub-16_task-balloonanalogrisktask_run-01_bold.nii.gz" | ||
] | ||
], | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
...6_task-balloonanalogrisktask_run-1_space-MNI152NLin2009cAsym_res-2_desc-preproc_bold.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"RepetitionTime": 2.0, | ||
"SkullStripped": false, | ||
"TaskName": "balloon analog risk task" | ||
"TaskName": "balloon analog risk task", | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
...-16_task-balloonanalogrisktask_run-2_space-MNI152NLin2009cAsym_res-2_desc-brain_mask.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"RawSources": [ | ||
"sub-16/func/sub-16_task-balloonanalogrisktask_run-02_bold.nii.gz" | ||
] | ||
], | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
...6_task-balloonanalogrisktask_run-2_space-MNI152NLin2009cAsym_res-2_desc-preproc_bold.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"RepetitionTime": 2.0, | ||
"SkullStripped": false, | ||
"TaskName": "balloon analog risk task" | ||
"TaskName": "balloon analog risk task", | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
...-16_task-balloonanalogrisktask_run-3_space-MNI152NLin2009cAsym_res-2_desc-brain_mask.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"RawSources": [ | ||
"sub-16/func/sub-16_task-balloonanalogrisktask_run-03_bold.nii.gz" | ||
] | ||
], | ||
"Resolution": "2mm, isotropic" | ||
} |
3 changes: 2 additions & 1 deletion
3
...6_task-balloonanalogrisktask_run-3_space-MNI152NLin2009cAsym_res-2_desc-preproc_bold.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"RepetitionTime": 2.0, | ||
"SkullStripped": false, | ||
"TaskName": "balloon analog risk task" | ||
"TaskName": "balloon analog risk task", | ||
"Resolution": "2mm, isotropic" | ||
} |