Commit 13a83a72 authored by Jan Kiene's avatar Jan Kiene
Browse files

do not set SSNR to zero for same channels, use inf instead

parent fc25a189
Loading
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -578,8 +578,4 @@ def ssnr(
        ssnr = np.round(10 * np.log10(10 ** (np.sum(ss, axis=0) / segment_counter) - 1), 2)
    ssnr[segment_counter == 0] = -np.inf

    # set to zero for channels with no diff (this handles e.g. the corner-case of an all-zero channel in both ref and dut)
    zero_diff_mask = np.asarray([np.all(diff_sig_norm[:, c] == 0) for c in range(ref_sig.shape[1])])
    ssnr[zero_diff_mask] = 0

    return ssnr