fixing and adding warning when coherence gets over 1
This MR fixs the error when coherence is over 1 that causing failure of generating *_coherence_outlier.txt
and also adds a warning while coherence is over 1, at the same time set the probability = nan