Commit 04aa1835 authored by Jouni Paulus's avatar Jouni Paulus
Browse files

remove two debug printouts and suppress a numpy warning

parent 4f640fda
Loading
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -486,7 +486,6 @@ def compare(
        if get_ssnr:
            # length of segment is always 20ms
            len_seg = int(0.02 * fs)
            print(len_seg, ref.shape, test.shape)
            result["SSNR"] = ssnr(
                ref,
                test,
@@ -731,7 +730,7 @@ def ssnr(
    # if the reference signal was outside the thresholds for all segments in a channel, segment_counter is zero
    # for that channel and the division here would trigger a warning. We supress the warning and later
    # set the SSNR for those channels to nan manually instead (overwriting later is simply easier than adding ifs here)
    with warnings.catch_warnings():
    with warnings.catch_warnings(action='ignore'):
        ssnr = np.round(
            10 * np.log10(10 ** (np.sum(ss, axis=0) / segment_counter) - 1), 2
        )
+0 −1
Original line number Diff line number Diff line
@@ -152,7 +152,6 @@ def cmp_pcm(
                odg = float(match_odg.groups()[0])
                msg = f"Channel {n} ODG: {odg}"
                reason += " - " + msg
                print(msg)

        if get_odg_bin:
            odg_files = {}