Loading scripts/create_histograms.py +15 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ import argparse import math import pathlib import sys import pandas as pd import numpy as np from typing import List Loading @@ -25,6 +26,19 @@ BINS_FOR_MEASURES = { DEFAULT_MEASURES = ["MAX_ABS_DIFF", "MLD", "MIN_SSNR", "MIN_ODG"] HERE = pathlib.Path(__file__).parent ROOT_DIR = HERE.parent sys.path.append(str(ROOT_DIR)) from tests.constants import CAT_NORMAL, CAT_BITRATE_SWITCHING, CAT_DTX, CAT_JBM, CAT_PLC COLORS_FOR_CATEGORIES = { CAT_DTX: "tab:blue", CAT_PLC: "tab:orange", CAT_NORMAL: "tab:green", CAT_JBM: "tab:red", CAT_BITRATE_SWITCHING: "tab:purple", } def get_bins_for_diff(data: pd.Series): return np.linspace(data.min(), data.max(), num=10) Loading Loading @@ -76,6 +90,7 @@ def create_histograms( linewidth=0.5, label=cat, bottom=bottom, color=COLORS_FOR_CATEGORIES[cat], ) bottom += data Loading Loading
scripts/create_histograms.py +15 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ import argparse import math import pathlib import sys import pandas as pd import numpy as np from typing import List Loading @@ -25,6 +26,19 @@ BINS_FOR_MEASURES = { DEFAULT_MEASURES = ["MAX_ABS_DIFF", "MLD", "MIN_SSNR", "MIN_ODG"] HERE = pathlib.Path(__file__).parent ROOT_DIR = HERE.parent sys.path.append(str(ROOT_DIR)) from tests.constants import CAT_NORMAL, CAT_BITRATE_SWITCHING, CAT_DTX, CAT_JBM, CAT_PLC COLORS_FOR_CATEGORIES = { CAT_DTX: "tab:blue", CAT_PLC: "tab:orange", CAT_NORMAL: "tab:green", CAT_JBM: "tab:red", CAT_BITRATE_SWITCHING: "tab:purple", } def get_bins_for_diff(data: pd.Series): return np.linspace(data.min(), data.max(), num=10) Loading Loading @@ -76,6 +90,7 @@ def create_histograms( linewidth=0.5, label=cat, bottom=bottom, color=COLORS_FOR_CATEGORIES[cat], ) bottom += data Loading