function snr,p1,p2 sp1=size(p1) sp2=size(p2) if (sp1(1) ne sp2(1)) or (sp1(2) ne sp2(2)) then begin print,'Arrays not the same size in snr' return,0. endif tp1=total(float(p1)^2) tp2=total((float(p2)-float(p1))^2) s=fltarr(3) ; Compute the TUB SNR s(0)=10.*alog10(tp1/tp2) std=stdev(p1,mean) error=float(p2)-float(p1) rmse=stdev(error) ; Compute Marty's SNR s(1)=mean/rmse var=error(1:154,1:253)^2/((p1(1:154,1:253))/30.) std=stdev(var,mean) s(2)=mean return,s end