Including Vmedian, Rmedian and changing to noisesignal_ratio.

singalnoise_ratio could lead to a division by 0, noisesignal is
  more convenient.