Bad segments in resting-state data

Thank you for elaborating on that.
I use the empty room recordings to estimate the noise covariance and the actual data for the data covariance matrix. However I want to know if you exclude the bad segments before computing the data covariance matrix and also how do you manage the bad segments prior to connectivity analysis.