Commit 87e2f087 authored by Vladimir Malenovsky's avatar Vladimir Malenovsky
Browse files

fix MASA MD comaprison prinouts

parent a89e902a
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1959,6 +1959,7 @@ class MLDConformance:
        max_mld_value = None
        keys = IVAS_Bins.keys() if selectTag == "all" else [selectTag]
        for tag in keys:
            mld_header_printed = False
            mdlCutWithTags = None
            if os.path.exists(self.mldcsv[tag]) and os.path.getsize(self.mldcsv[tag]) > 0:
                mdlCutWithTags = np.loadtxt(
@@ -2003,6 +2004,7 @@ class MLDConformance:
                        m5 = np.sum(mdlValues <= 5.0)

                        PCNT = lambda num: int(1000 * num / N) / 10.0
                        mld_header_printed = True
                        print(f"\n##########################################################")
                        print(f"<{tag}> Total Frames: {N}")
                        print(f"<{tag}> MAX MLD across all frames : {mdlValues.max()}")
@@ -2075,6 +2077,15 @@ class MLDConformance:
                )
                masaMDCutWithTags = np.atleast_1d(masaMDCutWithTags)

            will_print_masa = (
                tag in ReferenceMasaMDFiles
                and masaMDCutWithTags is not None
                and masaMDCutWithTags.size > 0
            )
            if mld_header_printed and not will_print_masa:
                print("##########################################################\n")
                mld_header_printed = False

            if tag in ReferenceMasaMDFiles:
                if masaMDCutWithTags is not None and masaMDCutWithTags.size > 0:
                    masaMDValues = masaMDCutWithTags["MASA"]
@@ -2100,6 +2111,7 @@ class MLDConformance:
                        print(
                            f"<{tag}> Frames with MASA metadata diff <= 1 : {m1} frames ({PCNT(m1)}%)"
                        )
                        mld_header_printed = False
                        print("##########################################################\n")

                if self.args.regenerate_mld_ref: