We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c557d1f commit 81ccc8aCopy full SHA for 81ccc8a
ds000001-fmriprep/code/update_res_in_json.py
@@ -0,0 +1,15 @@
1
+"""Add resolution metadata if json filename contains the res entity."""
2
+import json
3
+from pathlib import Path
4
+from rich import print
5
+
6
+root = Path(__file__).parent.parent
7
8
+files_to_update = root.glob("sub-*/*/sub*res-2*.json")
9
10
+for event in files_to_update:
11
+ with open(event) as f:
12
+ metadata = json.load(f)
13
+ metadata["Resolution"] = "2mm, isotropic"
14
+ with open(event, "w") as f:
15
+ json.dump(metadata, f, indent=2)
0 commit comments