Skip to content

Commit 6c0be5f

Browse files
committed
Update
1 parent a3aaca8 commit 6c0be5f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

post_fmriprep.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@
141141
# import neuroimaging packages
142142
import nilearn.image as nl_img
143143
import nilearn.masking as nl_mask
144-
import nibabel as nib
145144

146145
# Start tracking execution time
147146
start_time = time.time()
@@ -357,7 +356,7 @@ def fmripop_remove_confounds(args):
357356
*xyz, time_frames = temp_img.shape
358357
data = np.zeros(temp_img.shape, dtype=this_dtype)
359358

360-
if args.add_mean_img:
359+
if args.add_orig_mean_img:
361360
# Compute the mean of the images (in the time dimension of 4th dimension)
362361
orig_mean_img = nl_img.mean_img(args.niipath)
363362
# Smooth mean image
@@ -504,7 +503,7 @@ def fmripop_check_args(args):
504503
Checks input arguments and sets other dependent arguments accrodingly
505504
"""
506505

507-
# Check if we want to regress framwise displacement
506+
# Check if we want to regress framwise displacement or not
508507
if args.fmw_disp_th is not None:
509508
# Add it to the default confound list
510509
args.confound_list.append(fd_label)
@@ -550,7 +549,6 @@ def fmripop_visual_debug(path_to_file, args):
550549
# Extract time series from seed regions
551550
time_series = masker.fit_transform(path_to_file)
552551

553-
554552
import matplotlib.pyplot as plt
555553

556554
for this_time_series, this_label in zip(time_series.T, dmn_labels):
@@ -583,8 +581,8 @@ def fmripop_visual_debug(path_to_file, args):
583581
if args.scrubbing:
584582
out_img = fmripop_scrub_data(out_img, args, params_dict)
585583

586-
#if np.array(args.fwhm).sum() > 0.0: # If fwhm is not zero, performs smoothing
587-
# out_img = fmripop_smooth_data(out_img, args.fwhm) # NOTE: This here is a hack because this version (0.5.0)of nilearn does not really support a ndarray for fwhm
584+
if np.array(args.fwhm).sum() > 0.0: # If fwhm is not zero, performs smoothing
585+
out_img = fmripop_smooth_data(out_img, args.fwhm)
588586

589587
# Save output image and parameters used in this script
590588
params_dict = fmripop_save_imgdata(args, out_img, params_dict, output_tag=args.scrub_tag)

0 commit comments

Comments
 (0)