From a5b44483e6cd061381e272c7e793f628349e9fb8 Mon Sep 17 00:00:00 2001 From: J Dark Date: Wed, 25 Oct 2023 13:11:53 -0400 Subject: [PATCH] post processing same as festim test --- test/benchmark.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/benchmark.py b/test/benchmark.py index e86360126..949fe066a 100644 --- a/test/benchmark.py +++ b/test/benchmark.py @@ -170,11 +170,12 @@ def siverts_law(T, S_0, E_S, pressure): analytical_flux = np.abs(analytical_flux) flux_values = np.array(np.abs(flux_values)) + indices = np.where(analytical_flux > 0.01 * np.max(analytical_flux)) + analytical_flux = analytical_flux[indices] + flux_values = flux_values[indices] + relative_error = np.abs((flux_values - analytical_flux) / analytical_flux) - relative_error = relative_error[ - np.where(analytical_flux > 0.01 * np.max(analytical_flux)) - ] error = relative_error.mean() assert error < 0.01