Commit e6d2a6ac authored by Jan Kiene's avatar Jan Kiene
Browse files

add --measures arg

parent 00b447a1
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ BINS_FOR_MEASURES = {
    "DELTA_ODG": [-5, -4, -3, -2, -1, -0.5, -0.4, -0.3, -0.2, -0.1, 0, 0.1, 0.5],
}

MEASURES_TO_PLOT = ["MAX_ABS_DIFF", "MLD", "MIN_SSNR", "MIN_ODG"]
DEFAULT_MEASURES = ["MAX_ABS_DIFF", "MLD", "MIN_SSNR", "MIN_ODG"]


def get_bins_for_diff(data: pd.Series):
@@ -110,15 +110,20 @@ if __name__ == "__main__":
        help="""Do not use the hardcoded bins for creating the spectrograms.
Use this for visualising diff scores.""",
    )
    allowed_measures = " ".join(BINS_FOR_MEASURES.keys())
    parser.add_argument(
        "--measures",
        nargs="+",
        default=DEFAULT_MEASURES,
        help=f"Measures to plot from the csv file. One of {allowed_measures}",
    )
    args = parser.parse_args()
    df = pd.read_csv(args.csv_report)

    measures = MEASURES_TO_PLOT

    bins_for_measures = BINS_FOR_MEASURES
    if args.no_bins:
        bins_for_measures = {}

    create_histograms(
        df, measures, args.output_folder, args.display_only, bins_for_measures
        df, args.measures, args.output_folder, args.display_only, bins_for_measures
    )