Skip to content

Commit

Permalink
Fix radians/degree bug in high-pass model
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinmacaulay committed Dec 3, 2024
1 parent 6df6510 commit 6f41e05
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/echosms/hpmodel.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""A class that provides a high-pass fluid sphere scattering model."""

from math import log10, pi, sin, cos, exp
from math import log10, pi, sin, cos, exp, radians
from .utils import wavenumber, as_dict
from .scattermodelbase import ScatterModelBase

Expand Down Expand Up @@ -159,6 +159,7 @@ def alpha_pic(g, h):
sigma_bs = 1/9 * L*L * (k*a)**4 * a_pic**2 * G\
/ (1 + 16/9*(k*a)**4 * a_pic**2/(R**2 * F))
case 'cylinder':
theta = radians(theta)
a_pic = alpha_pic(g, h)
s = sin(k*L*cos(theta)) / (k*L*cos(theta))
Ka = k*sin(theta)*a
Expand Down

0 comments on commit 6f41e05

Please sign in to comment.