Loading ci/create_trajectories.py 0 → 100644 +25 −0 Original line number Diff line number Diff line import numpy as np FRAMES_PER_SEC = 50 def random_trajectory(duration_sec): n_frames = int(FRAMES_PER_SEC * duration_sec) trj = np.random.random((n_frames, 4)) trj[:, 0] = -3 trj[:, 1] *= 180 trj[:, 2] *= 90 trj[:, 3] *= 180 return trj def constant_trajectory(duration_sec, yaw=0, pitch=0, roll=0): n_frames = int(FRAMES_PER_SEC * duration_sec) trj = np.empty((n_frames, 4)) trj[:, 0] = -3 trj[:, 1] = yaw trj[:, 2] = pitch trj[:, 3] = roll return trj ci/run_scheduled_sanitizer_test.py +27 −4 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ import argparse import pathlib import subprocess import sys import numpy as np import json CI_SCRIPT_DIR = "./ci" sys.path.append(CI_SCRIPT_DIR) Loading @@ -41,6 +43,8 @@ from collect_artifacts import ( find_failed_files_for_sanitizer_test, ) from combine_genpatt_and_jbm_profile import combine_error_profiles from create_trajectories import random_trajectory, constant_trajectory SCRIPT_DIR = pathlib.Path("./scripts").resolve() DURATION = "120" Loading @@ -54,9 +58,9 @@ N_FRAMES_DLY_PROFILE = 7500 GENPATT_CMD = f"gen-patt -tailstat -fer -g192 -gamma 0 -rate 0.15 -tol 0.001 -reset -n {N_FRAMES_DLY_PROFILE} {EP_FILE}" MC_MODES = ["5_1", "5_1_2", "5_1_4", "7_1", "7_1_4"] AMBISONICS_MODES = ["HOA3", "HOA2", "FOA", "PlanarHOA3", "PlanarHOA2", "PlanarFOA"] TIMEOUT = ( 60 * 20 ) # timeout of 15 minutes per en/decoding to safeguard against endless loops # timeout of 15 minutes per en/decoding to safeguard against endless loops TIMEOUT = (60 * 20) HEAD_TRAJ_FILE = "head_traj.csv" CONSOLE_OUT_FILE = "output_san.txt" Loading Loading @@ -112,6 +116,17 @@ def get_modes(in_format: str) -> list: return mode_list def assemble_oc_dict(out_formats: list): oc_dict = {of: [] for of in out_formats} head_rot_args = ["-t", HEAD_TRAJ_FILE] oc_dict["BINAURAL"].extend(head_rot_args) oc_dict["BINAURAL_ROOM_IR"].extend(head_rot_args) oc_dict["BINAURAL_ROOM_REVERB"].extend(head_rot_args) return json.dumps(oc_dict) def get_md_file_command(in_format: str) -> list: cmd = list() Loading @@ -124,10 +139,18 @@ def get_md_file_command(in_format: str) -> list: return cmd def create_trajectory_file(duration): traj = random_trajectory(duration) np.savetext(HEAD_TRAJ_FILE, traj, fmt="%.2f", delimiter=",") def run_check(in_format: str, out_formats: list, tests: list, run_fec: bool = True): modes = get_modes(in_format) md_file_command = get_md_file_command(in_format) oc_str = assemble_oc_dict(out_formats) create_trajectory_file(DURATION) if len(modes) == 0: return 0 Loading @@ -146,7 +169,7 @@ def run_check(in_format: str, out_formats: list, tests: list, run_fec: bool = Tr "-m", *modes, "--oc", *out_formats, oc_str, *md_file_command, "--usan_supp_file", USAN_SUPP_FILE, Loading Loading
ci/create_trajectories.py 0 → 100644 +25 −0 Original line number Diff line number Diff line import numpy as np FRAMES_PER_SEC = 50 def random_trajectory(duration_sec): n_frames = int(FRAMES_PER_SEC * duration_sec) trj = np.random.random((n_frames, 4)) trj[:, 0] = -3 trj[:, 1] *= 180 trj[:, 2] *= 90 trj[:, 3] *= 180 return trj def constant_trajectory(duration_sec, yaw=0, pitch=0, roll=0): n_frames = int(FRAMES_PER_SEC * duration_sec) trj = np.empty((n_frames, 4)) trj[:, 0] = -3 trj[:, 1] = yaw trj[:, 2] = pitch trj[:, 3] = roll return trj
ci/run_scheduled_sanitizer_test.py +27 −4 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ import argparse import pathlib import subprocess import sys import numpy as np import json CI_SCRIPT_DIR = "./ci" sys.path.append(CI_SCRIPT_DIR) Loading @@ -41,6 +43,8 @@ from collect_artifacts import ( find_failed_files_for_sanitizer_test, ) from combine_genpatt_and_jbm_profile import combine_error_profiles from create_trajectories import random_trajectory, constant_trajectory SCRIPT_DIR = pathlib.Path("./scripts").resolve() DURATION = "120" Loading @@ -54,9 +58,9 @@ N_FRAMES_DLY_PROFILE = 7500 GENPATT_CMD = f"gen-patt -tailstat -fer -g192 -gamma 0 -rate 0.15 -tol 0.001 -reset -n {N_FRAMES_DLY_PROFILE} {EP_FILE}" MC_MODES = ["5_1", "5_1_2", "5_1_4", "7_1", "7_1_4"] AMBISONICS_MODES = ["HOA3", "HOA2", "FOA", "PlanarHOA3", "PlanarHOA2", "PlanarFOA"] TIMEOUT = ( 60 * 20 ) # timeout of 15 minutes per en/decoding to safeguard against endless loops # timeout of 15 minutes per en/decoding to safeguard against endless loops TIMEOUT = (60 * 20) HEAD_TRAJ_FILE = "head_traj.csv" CONSOLE_OUT_FILE = "output_san.txt" Loading Loading @@ -112,6 +116,17 @@ def get_modes(in_format: str) -> list: return mode_list def assemble_oc_dict(out_formats: list): oc_dict = {of: [] for of in out_formats} head_rot_args = ["-t", HEAD_TRAJ_FILE] oc_dict["BINAURAL"].extend(head_rot_args) oc_dict["BINAURAL_ROOM_IR"].extend(head_rot_args) oc_dict["BINAURAL_ROOM_REVERB"].extend(head_rot_args) return json.dumps(oc_dict) def get_md_file_command(in_format: str) -> list: cmd = list() Loading @@ -124,10 +139,18 @@ def get_md_file_command(in_format: str) -> list: return cmd def create_trajectory_file(duration): traj = random_trajectory(duration) np.savetext(HEAD_TRAJ_FILE, traj, fmt="%.2f", delimiter=",") def run_check(in_format: str, out_formats: list, tests: list, run_fec: bool = True): modes = get_modes(in_format) md_file_command = get_md_file_command(in_format) oc_str = assemble_oc_dict(out_formats) create_trajectory_file(DURATION) if len(modes) == 0: return 0 Loading @@ -146,7 +169,7 @@ def run_check(in_format: str, out_formats: list, tests: list, run_fec: bool = Tr "-m", *modes, "--oc", *out_formats, oc_str, *md_file_command, "--usan_supp_file", USAN_SUPP_FILE, Loading