pylops.utils.metrics.psnr

pylops.utils.metrics.psnr(xref, xcmp, xmax=None, xmin=0.0)[source]

Peak Signal to Noise Ratio (PSNR)

Compute Peak Signal to Noise Ratio between two vectors

Parameters:
xrefnumpy.ndarray

Reference vector

xcmpnumpy.ndarray

Comparison vector

xmaxfloat, optional

Maximum value to use. If None, the actual maximum of the reference vector is used

xminfloat, optional

Minimum value to use. If None, the actual minimum of the reference vector is used (0 is default for backward compatibility)

Returns:
psnrfloat

Peak Signal to Noise Ratio of xcmp with respect to xref