inpystem.tools.metrics module¶
This module contains several metric functions.
-
inpystem.tools.metrics.
SNR
(xhat, xref)¶ Computes the SNR metric.
- Parameters
xhat (numpy array) – The noised data.
xref (numpy array) – The noise-free image.
- Returns
The SNR value in dB.
- Return type
float
-
inpystem.tools.metrics.
NMSE
(xhat, xref)¶ Computes the normalized mean square metric.
- Parameters
xhat (numpy array) – The noised data.
xref (numpy array) – The noise-free image.
- Returns
The NMSE value.
- Return type
float
-
inpystem.tools.metrics.
aSAD
(xhat, xref)¶ Computes the averaged Spectral Angle Distance metric.
The input data number of dimensions can be:
1: the data are spectra,
2: the data are matrices of shape (n, M),
3: the data are matrices of shape (m, n, M)
where M is the spectrum size.
- Parameters
xhat (numpy array) – The noised data.
xref (numpy array) – The noise-free image.
- Returns
The (mean) aSAD value.
- Return type
float
-
inpystem.tools.metrics.
SSIM
(xhat, xref)¶ Computes the structural similarity index.
- Parameters
xhat (numpy array) – The noised data.
xref (numpy array) – The noise-free image.
- Returns
The (mean) SSIM value.
- Return type
float