Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions app/services/simulation_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 _:
Expand Down Expand Up @@ -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:
Expand Down
Loading