You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix NaN when alpha_power is near 1.0, respect alpha_mode in all paths
Three issues caused NaN output with attenuation exponents near 1.0:
1. The Python solver ignored medium.alpha_mode entirely, always computing
the dispersion term containing tan(pi*alpha_power/2) which diverges
at alpha_power=1. Now respects 'no_dispersion' and 'no_absorption'.
2. No validation caught alpha_power values *near* 1.0 (only == 1 exactly).
Now raises ValueError when |alpha_power - 1| < 0.05 unless
alpha_mode='no_dispersion'.
3. The C++ backend silently ignored alpha_mode (never written to HDF5).
Now warns that alpha_mode is unsupported by the C++ binary, directing
users to backend='python'.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments