Skip to content

Commit d3e2608

Browse files
committed
FIX: Provide FD arguments to combined plot function in BOLD notebook
Provide FD arguments to combined plot function in BOLD notebook. Fixes: ``` File "/home/runner/work/nifreeze/nifreeze/docs/notebooks/bold_realignment.py", line 275, in main plot_combined_profile( TypeError: main.<locals>.plot_combined_profile() missing 2 required positional arguments: 'afni_fd' and 'nifreeze_fd' ``` raised for example in: https://github.com/nipreps/nifreeze/actions/runs/15007162520/job/42168515561?pr=117#step:14:2223 Take advantage of the commit to rename the function definition variables so that they do not shadow the outer variables.
1 parent ebfcbd8 commit d3e2608

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/notebooks/bold_realignment.ipynb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@
245245
"\n",
246246
"\n",
247247
"def plot_combined_profile(\n",
248-
" images, afni_fd, nifreeze_fd, indexing=None, figsize=(15, 1.7), cmap=\"gray\", labels=None\n",
248+
" images, _afni_fd, _nifreeze_fd, indexing=None, figsize=(15, 1.7), cmap=\"gray\", labels=None\n",
249249
"):\n",
250250
" # Calculate the number of profile plots\n",
251251
" n_images = len(images)\n",
@@ -258,7 +258,7 @@
258258
" )\n",
259259
"\n",
260260
" # Plot the framewise displacement on the first axis\n",
261-
" fd = pd.DataFrame({\"afni\": afni_fd, \"nifreeze\": nifreeze_fd})\n",
261+
" fd = pd.DataFrame({\"afni\": _afni_fd, \"nifreeze\": _nifreeze_fd})\n",
262262
" fd_axis = axes[0]\n",
263263
" _ = plot_framewise_displacement(fd, [\"AFNI 3dVolreg FD\", \"nifreeze FD\"], ax=fd_axis)\n",
264264
"\n",
@@ -298,6 +298,7 @@
298298
"source": [
299299
"plot_combined_profile(\n",
300300
" (DATA_PATH / bold_runs[15], afni_realigned[15], afni_realigned[15]),\n",
301+
" afni_fd, nifreeze_fd,\n",
301302
" labels=(\"hmc1\", \"original\", \"hmc2\"),\n",
302303
");"
303304
]

0 commit comments

Comments
 (0)