From eee28caa3516eaa9b8deed982e18d189a8640c0b Mon Sep 17 00:00:00 2001 From: Stella <30465823+stellaprins@users.noreply.github.com> Date: Fri, 18 Jul 2025 15:52:38 +0100 Subject: [PATCH] fix alpha_power input checking bug `medium.alpha_coeff` was incorrectly checked instead of `medium.alpha_power`. Thanks to @cldonovan for spotting the issue and suggesting the correct fix! --- k-Wave/private/kspaceFirstOrder_inputChecking.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k-Wave/private/kspaceFirstOrder_inputChecking.m b/k-Wave/private/kspaceFirstOrder_inputChecking.m index 20ebb6d..bc63619 100644 --- a/k-Wave/private/kspaceFirstOrder_inputChecking.m +++ b/k-Wave/private/kspaceFirstOrder_inputChecking.m @@ -213,7 +213,7 @@ end % check y is real and within 0 to 3 - if ~isreal(medium.alpha_coeff) || (medium.alpha_power >= 3 || medium.alpha_power < 0) + if ~isreal(medium.alpha_power) || (medium.alpha_power >= 3 || medium.alpha_power < 0) error('medium.alpha_power must be a real number between 0 and 3.'); end