Bad segments in resting-state data

I need the data covariance matrix to compute sources using beamformers.

Thanks for your suggestions. About the effect of discontinuities in the signal on the connectivity results, Is it possible for you to mention some references for further reading?

Thanks again.