Skip to content

Commit

Permalink
add zip file and session columns
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcieslak committed Apr 8, 2022
1 parent 7bb409b commit 405d3c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/generic/fs_euler_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
def process_zip(zip_path):
freesurfer_zip = Path(zip_path)
subid = freesurfer_zip.stem.split("_")[0]
sesid = ""
if "ses-" in freesurfer_zip.stem:
sesid = freesurfer_zip.stem.split("_")[1]
if not freesurfer_zip.exists():
raise ValueError("Must provide a zip file")

Expand All @@ -29,7 +32,7 @@ def read_qc(target_str):

rh_euler, lh_euler = read_qc("lheno")
rh_holes, lh_holes = read_qc("lhholes")
return {"rbc_id": subid,
return {"rbc_id": subid, "archive": zip_path, "session": sesid,
"lh_euler": lh_euler, "rh_euler": rh_euler,
"lh_holes": lh_holes, "rh_holes": rh_holes}

Expand Down

0 comments on commit 405d3c4

Please sign in to comment.