frequency-correlation value

- add function to estimate the frequency-correlation value
- fix some small bugs