Hello everyone,
I’m currently interested in performing an FFT of my resting-state data. First, I’m using the fmriprep pipeline to get the confounds/transform my data to MNI space:
Following this I’m running a glm with these confounds:
from nilearn.glm.first_level import FirstLevelModel
fmri_glm = FirstLevelModel(t_r=0.720,
hrf_model=None,
drift_model=None,
high_pass=None,
drift_order=None,
fir_delays=[0],
min_onset=-24,
mask_img=run_mask,
target_affine=None,
target_shape=None,
smoothing_fwhm=None,
# memory=Memory(location=None),
memory_level=1,
standardize=False,
signal_scaling=0,
noise_model='ar1',
verbose=0,
n_jobs=n_jobs,
minimize_memory=False,
subject_label=None)
fmri_glm = fmri_glm.fit(nilearn.image.index_img(run,range(start_index,run.get_fdata().shape[3])),
design_matrices = conf.loc[start_index:])
I then get the residuals from this confound-only glm, as my de-noised data
dat = fmri_glm.residuals[0].get_fdata()
Following this, I run voxel-wise fft. Is this an optimal pipeline?
Thanks,
Tom