Skip to content

Commit

Permalink
post processing same as festim test
Browse files Browse the repository at this point in the history
  • Loading branch information
jhdark committed Oct 25, 2023
1 parent d254c87 commit a5b4448
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a5b4448

Please sign in to comment.