added -r option to measure random noise. to check signal quality.