Conn toolbox bandpass filtering

I just started doing some resting state functional connectivity and was looking at the conn toolbox. I was looking through the code and it seems like the toolbox does bandpass filtering by taking the fft of the data, zeroing out frequencies outside the filter, and doing the inverse fft to get the filtered data back. Is this correct? It seems like the boxy filter would add artifact to the data, but I can’t seem to find any discussion about conn’s bandpass filter specifications. Are there preferred tools to conn in the community?

1 Like

Dear colleage,

Apologies in advance for the self-promotion. We have made publicly available two different toolboxes (both matlab based) to study functional connectivity. The first one, more comprehensive, is GUI oriented, and is called Hermes

http://hermes.ctb.upm.es/downloads/

It implements a range of connectivity methods besides PS based ones. as you can see, there is both a (brief) handbook as well as a paper connected to it.

The second one is thought for those in need of speed, namely if you have to analyze large data sets and thus computational efficiency is an issue

IN both cases, we use a filter based on the filtfilt function of matlab, using both forward and backward filtering to ensure zero phase distortion, and including an initial step to pad the data, because then the padded part of the time series is duly discarded to avoid artefacts associated to the filtering procedure. You can find details in both papers,

I hope it helps, please feel free to make any comments/suggestions, which are of course welcome

Best

Ahoi hoi there,

are you aware of C-PAC?

It’s an open-source software pipeline building upon e.g. FSL, ANTs and AFNI, packing everything in a super comprehensive nipype workflow. It includes tones of processing options which you can check in the great documentation.

It also offers a bunch of different installing options, including running everything via a BIDS app, hence working out of the box with BIDS datasets and ensuring a hustle free setup.

Other highlights include quality control and optimization for large datasets via e.g. SGE.

HTH, best, Peer

1 Like

Hi Benjamin,

Yes, your description of the band-pass filter implementation in conn is correct, the only subtlety is that the timeseries is doubled first using symmetric padding in order to minimize boundary effects (so more strictly speaking is zeroing-out frequencies outside the filter in a discrete cosine transform representation of the original data, rather than in a fft representation of the original data). The emphasis on achieving a sharp transition in frequency domain (vs. achieving for example a more compact response in the temporal domain at the cost of a smoother transition in the frequency domain) is mostly due to the projected application of filtering in the context of functional connectivity analyses, where the goal of filtering is not only to reduce noise but also to identify a frequency-window of interest for the interpretation of frequency-specific functional connectivity measures. To that end the filtering implementation would like to maintain orthogonality of functional connectivity measures across different frequency windows, and a sharp transition allows you to do exactly that (given that you also want a real- and positive- valued frequency response to maintain zero-phase distortion). Incidentally, that is also one of the reasons why the default setting in conn is to use ‘regBP’ denoising (regression followed by band-pass filtering) rather than ‘simult’ (simultaneous regression and filtering), as it affords the frequency-specific functional connectivity measures to form a complete orthogonal decomposition of functional connectivity over the compound/entire frequency range. I imagine that for different analyses, such as non-linear temporal analyses like DCM which may explicitly model frequency-dependencies, the trade-offs would be different so other type of frequency filters (e.g. high order Butterworth with filtfit) may be preferable during denoising? Would love to hear your thoughts

Best
Alfonso