Skip to content

Commit ffefcdb

Browse files
committed
Rename sim_radar debug parameter to dry_run
Rename the sim_radar boolean flag from `debug` to `dry_run` across the Cython API and header, update the docstring to describe dry-run behavior, and pass the new parameter to the underlying extern call. Remove explicit `debug=False` usages in tests so they rely on the new default. Modified files: src/radarsimpy/includes/radarsimc.pxd, src/radarsimpy/simulator_radar.pyx, tests/test_system_fmcw_radar.py, tests/test_system_interference.py.
1 parent 7199b2d commit ffefcdb

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

src/radarsimpy/includes/radarsimc.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ cdef extern from "simulator_mesh.hpp":
334334
Vec2[int_t] ray_filter, # Ray index filter [min, max]
335335
bool back_propagating, # Enable back-propagation
336336
string log_path, # Debug log file path
337-
bool debug) # Enable debug output
337+
bool dry_run) # Enable dry run mode
338338

339339
# Radar Interference Simulation
340340
# Radar-to-radar interference simulation for EMC analysis

src/radarsimpy/simulator_radar.pyx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,10 @@ cdef inline raise_err(RadarSimErrorCode err):
143143
@cython.boundscheck(False)
144144
@cython.wraparound(False)
145145
cpdef sim_radar(radar, targets, density=1, level=None, interf=None,
146-
ray_filter=None, back_propagating=False, device="gpu", log_path=None, debug=False):
146+
ray_filter=None, back_propagating=False, device="gpu", log_path=None, dry_run=False):
147147
"""
148148
sim_radar(radar, targets, density=1, level=None, interf=None, ray_filter=None,
149-
back_propagating=False, device="gpu", log_path=None, debug=False)
149+
back_propagating=False, device="gpu", log_path=None, dry_run=False)
150150
151151
Simulates the radar's baseband response for a given scene.
152152
@@ -214,9 +214,9 @@ cpdef sim_radar(radar, targets, density=1, level=None, interf=None,
214214
use a module compiled without GPU support.
215215
:param str or None log_path:
216216
Path to save ray-tracing data. Default: ``None`` (does not save data).
217-
:param bool debug:
218-
Whether to enable debug mode. When enabled, additional debug information will be printed
219-
during the simulation process. Default: ``False``.
217+
:param bool dry_run:
218+
Whether to enable dry run mode. When enabled, the simulation will skip actual ray tracing
219+
while still performing setup and validation. Default: ``False``.
220220
221221
:return:
222222
A dictionary containing the simulated baseband response and related data:
@@ -420,7 +420,7 @@ cpdef sim_radar(radar, targets, density=1, level=None, interf=None,
420420
ray_filter_c,
421421
back_propagating,
422422
log_path_c,
423-
debug)
423+
dry_run)
424424
if err:
425425
raise_err(err)
426426
else:
@@ -438,7 +438,7 @@ cpdef sim_radar(radar, targets, density=1, level=None, interf=None,
438438
ray_filter_c,
439439
back_propagating,
440440
log_path_c,
441-
debug)
441+
dry_run)
442442
if err:
443443
raise_err(err)
444444

tests/test_system_fmcw_radar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ def test_fmcw_raytracing_radar_rotation():
652652

653653
targets = [target_1]
654654

655-
data = sim_radar(radar, targets, density=1, level="pulse", debug=False)
655+
data = sim_radar(radar, targets, density=1, level="pulse")
656656

657657
baseband = data["baseband"]
658658

@@ -721,7 +721,7 @@ def test_fmcw_raytracing_radar_speed():
721721

722722
targets = [target_1]
723723

724-
data = sim_radar(radar, targets, density=1, level="pulse", debug=False)
724+
data = sim_radar(radar, targets, density=1, level="pulse")
725725

726726
baseband = data["baseband"]
727727

tests/test_system_interference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def test_scene_interference():
8181

8282
targets = [target_1]
8383

84-
data = sim_radar(radar, targets, density=0.2, debug=False, interf=int_radar)
84+
data = sim_radar(radar, targets, density=0.2, interf=int_radar)
8585

8686
inc_bb = data["interference"]
8787

0 commit comments

Comments
 (0)