help > RE: conn_module for simultaneous filtering
Feb 5, 2021  02:02 AM | Alfonso Nieto-Castanon - Boston University
RE: conn_module for simultaneous filtering
Dear Lorenzo,

That's a good point, as the current conn_module options do not allow you to filter individual regressors as the GUI or batch options do during denoising. I am attaching a patch to fix this (this patch is for version 20b, simply copy the attached file to your conn distribution folder overwriting the file with the same name there). To try it, simply add the line:

   'reg_filter', [1 0 1 1], ...

to your conn_module syntax. This will apply a band-pass filter (as specified in bp_filter) to the selected regressors (in this case to all regressors except the scrubbing covariates, which I agree would not be all that reasonable to filter) before running the functional_regression step. 

Let me know if you run into any issues

Best
Alfonso
Originally posted by Lorenzo Pasquini:
Dear Conn user

I was wondering whether there is a module function to enable simultaneous filtering (before nuisance regression, filtering of nuisance included).
My syntax looks as follows:

conn_module( 'preprocessing', ...
'structurals', {'/Volumes/My_Book/test/anat.nii'}, ...
'functionals', {'/Volumes/My_Book/test/f.nii'}, ...
'steps', {'default_mni', 'functional_regression', 'functional_bandpass'}, ...
'sliceorder', 'ascending', ...
'fwhm', 6, ...
'reg_names', {'realignment','scrubbing','White Matter','CSF'}, ...
'reg_dimensions',[inf, inf, 5, 5], ...
'reg_deriv', [1, 0, 0, 0], ...
'bp_filter', [0.008 0.09])

Can I just inverse the order of 'functional_regression' and 'functional_bandpass'?
Or should I add another term so that the nuisance regressors are filtered too? 
Will the scrubbing regressors also be filtered and is this likely to add a confound?

Thanks

Threaded View

TitleAuthorDate
Lorenzo Pasquini Feb 4, 2021
RE: conn_module for simultaneous filtering
Alfonso Nieto-Castanon Feb 5, 2021
Lorenzo Pasquini Feb 5, 2021
Lorenzo Pasquini Feb 5, 2021
Lorenzo Pasquini Feb 5, 2021
Alfonso Nieto-Castanon Feb 5, 2021
Lorenzo Pasquini Feb 6, 2021