Signal to noise ratio calculation