Skip to content

Commit 83f248d

Browse files
committed
DEBUG: Debug SynthStrip
1 parent 1e54125 commit 83f248d

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.github/workflows/notebooks.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ jobs:
6969
- name: Download SynthStrip model
7070
run: |
7171
wget https://ftp.nmr.mgh.harvard.edu/pub/dist/freesurfer/synthstrip/models/synthstrip.1.pt -P "${TEST_DATA_HOME}"
72+
echo "Test data home"
73+
tree ${TEST_DATA_HOME}
7274
7375
- name: Install TeX Live
7476
run: |

docs/notebooks/bold_realignment.ipynb

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,25 @@
7474
" bmask_path = (\n",
7575
" OUTPUT_DIR / bold_run.parent / f\"{bold_run.name.rsplit('_', 1)[0]}_label-brain_mask.nii.gz\"\n",
7676
" )\n",
77+
" print(f\"Data path: {DATA_PATH}\")\n",
78+
" for item in DATA_PATH.iterdir():\n",
79+
" print(f\"Item: {item}\")\n",
80+
"\n",
81+
" if not DATA_PATH.exists() or not DATA_PATH.is_dir():\n",
82+
" raise FileNotFoundError(f\"Directory does not exist: {DATA_PATH}\")\n",
83+
"\n",
84+
" _path = DATA_PATH / \"synthstrip.1.pt\"\n",
85+
" if not _path.exists() or not _path.is_dir():\n",
86+
" raise FileNotFoundError(f\"synthstrip file does not exist: {_path}\")\n",
87+
"\n",
7788
" if not bmask_path.exists():\n",
7889
" bmsk_results = SynthStrip(\n",
7990
" in_file=str(avg_path),\n",
8091
" use_gpu=True,\n",
81-
" model=DATA_PATH / \"synthstrip.1.pt\",\n",
92+
" model=str(DATA_PATH / \"synthstrip.1.pt\"),\n",
8293
" ).run(cwd=str(WORKDIR))\n",
94+
" print(f\"Outputs: {bmsk_results.outputs}\")\n",
95+
" print(f\"Out_mask: {bmsk_results.outputs.out_mask}\")\n",
8396
" copy(bmsk_results.outputs.out_mask, bmask_path)\n",
8497
"\n",
8598
" dilmask_path = (\n",

0 commit comments

Comments
 (0)