Skip to content

Commit 81ccc8a

Browse files
committed
prepare script
1 parent c557d1f commit 81ccc8a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)