Skip to content

Commit

Permalink
fix: absorption must be applied twice
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-urban committed Oct 1, 2024
1 parent 8b9418b commit 1bee44c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//sourcehash: dc65b20c5b98bd8cd1ccdc2c90c6d9cb5381f4277602d31839d11b1132321279
//sourcehash: f1887470e6068a1679d1c6f911758b35bcdfd019561d265d5f4b41e003238fa8

/*
This file contains docstrings for use in the Python bindings.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ inline t_xtensor_1d compute_cw_range_correction(
// range correction = absorption*R + tvg_factor*log10(R)
if (tools::helper::float_is_finite_and_not_zero(absorption_db_m))
if (tools::helper::float_is_finite_and_not_zero(tvg_factor))
return absorption_db_m * ranges_m + tvg_factor * xt::log10(ranges_m);
return (2*absorption_db_m) * ranges_m + tvg_factor * xt::log10(ranges_m);

if (tools::helper::float_is_finite_and_not_zero(tvg_factor))
return tvg_factor * xt::log10(ranges_m);

if (tools::helper::float_is_finite_and_not_zero(absorption_db_m))
return absorption_db_m * ranges_m;
return (2*absorption_db_m) * ranges_m;

return xt::zeros_like(ranges_m);
// range correction = absorption*R + tvg_factor*log10(R)
Expand Down

0 comments on commit 1bee44c

Please sign in to comment.