add doc comments to public APIs
fix a typo causing mismatch of SNR to Sample Rate in the result