signal to noise function