Skip to content

Commit

Permalink
small adjustment on rcs_sbr
Browse files Browse the repository at this point in the history
  • Loading branch information
rookiepeng committed Mar 29, 2024
1 parent aacba46 commit 544a66c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
30 changes: 15 additions & 15 deletions src/radarsimpy/raytracing/rcs.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ np_float = np.float32
@cython.wraparound(False)
cpdef rcs_sbr(targets,
f,
obs_phi,
obs_theta,
inc_phi=None,
inc_theta=None,
inc_phi,
inc_theta,
inc_pol=[0, 0, 1],
obs_phi=None,
obs_theta=None,
obs_pol=None,
density=1):
"""
rcs_sbr(targets, f, obs_phi, obs_theta, inc_phi=None, inc_theta=None, inc_pol=[0, 0, 1], obs_pol=None, density=1)
rcs_sbr(targets, f, inc_phi, inc_theta, inc_pol=[0, 0, 1], obs_phi=None, obs_theta=None, obs_pol=None, density=1)
Calculate target's RCS by using shooting and bouncing rays (SBR)
Expand All @@ -74,19 +74,19 @@ cpdef rcs_sbr(targets,
}]
:param float f:
Center frequency (Hz)
:param float obs_phi:
Observation angle phi (deg)
:param float obs_theta:
Observation angle theta (deg)
:param float inc_phi:
Incidence angle phi (deg).
``default None`` means ``inc_phi = obs_phi``
:param float inc_theta:
Incidence angle theta (deg).
``default None`` means ``inc_theta = obs_theta``
:param list inc_pol:
Incidence polarization [x, y, z].
``default [0, 0, 1]``
:param float obs_phi:
Observation angle phi (deg)
``default None`` means ``obs_phi = inc_phi``
:param float obs_theta:
Observation angle theta (deg)
``default None`` means ``obs_theta = inc_theta``
:param list obs_pol:
Observer polarization [x, y, z].
``default same as inc_pol``
Expand All @@ -112,11 +112,11 @@ cpdef rcs_sbr(targets,
for idx_c in range(0, len(targets)):
targets_vt.push_back(cp_RCS_Target(targets[idx_c]))

if inc_phi is None:
inc_phi = obs_phi
if obs_phi is None:
obs_phi = inc_phi

if inc_theta is None:
inc_theta = obs_theta
if obs_theta is None:
obs_theta = inc_theta

inc_phi_rad = np.radians(inc_phi)
inc_theta_rad = np.radians(inc_theta)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_rcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ def test_rcs_bistatic():
rcs_sbr(
[target],
freq,
phi_ang,
theta,
inc_phi=inc_phi,
inc_theta=inc_theta,
inc_pol=pol,
obs_phi=phi_ang,
obs_theta=theta,
density=density,
)
)
Expand Down

0 comments on commit 544a66c

Please sign in to comment.