add function to estimate correlation and coherence