From 4120be38b4d401659bcd19e6901f49d63bb395f9 Mon Sep 17 00:00:00 2001 From: Anne Heimes Date: Tue, 12 May 2026 22:30:50 +0200 Subject: [PATCH] add sparrowpy as energy based method --- app/services/simulation_service.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/services/simulation_service.py b/app/services/simulation_service.py index ea3d8c5..b95e668 100644 --- a/app/services/simulation_service.py +++ b/app/services/simulation_service.py @@ -434,6 +434,13 @@ def run_solver(simulation_run_id: int, json_path: str): json_path.replace(".json", "_pressure.csv"), json_path.replace(".json", ".wav"), ) + case "sparrowpy": + # TODO: This function is not a general auralization function and should be renamed + imp_tot, fs = auralization_calculation( + None, + json_path.replace(".json", "_pressure.csv"), + json_path.replace(".json", ".wav"), + ) # this should be the only thing getting executed case _: @@ -501,8 +508,7 @@ def run_solver(simulation_run_id: int, json_path: str): raise RuntimeError("Error saving the impulse response to xlsx") except Exception as ex: logger.error(f"Error during saving results: {ex}") - raise RuntimeError(f"Error during saving results: {ex}") - + result_container = {} if json_path is not None: with open(json_path, "r") as json_file: