"""Sionna RT 2.0 → DeepMIMO: Run, Export, Convert."""
'Sionna RT 2.0 → DeepMIMO: Run, Export, Convert.'
Sionna RT 2.0 → DeepMIMO: Run, Export, Convert¶
What this notebook covers:
- Load Sionna RT 2.0's built-in Munich scene and visualize it
- Run specular-reflection ray tracing with timing
- Inspect propagation paths directly from Sionna
- Export results to disk with DeepMIMO's
sionna_exporter - Convert to a DeepMIMO scenario with
dm.convert - Explore channels: delay profiles and ray visualization
Why this workflow? Sionna RT does not natively persist ray tracing results to disk. DeepMIMO's exporter serializes all path data (delays, angles, vertices, interaction types) so expensive simulations can be reused without re-running the ray tracer. The converter maps that data into the standardized DeepMIMO format, unlocking the full DeepMIMO toolchain.
Requirements:
pip install 'deepmimo[sionna]'
%pip install 'deepmimo[sionna]' # uncomment if not installed
/home/joao/DeepMIMO/.venv/bin/python: No module named pip
Note: you may need to restart the kernel to use updated packages.
Imports¶
import tempfile
import time
from pathlib import Path
import matplotlib.pyplot as plt
import numpy as np
import sionna.rt as sionna_rt
from sionna.rt import Camera, PathSolver, PlanarArray, Receiver, Transmitter
import deepmimo as dm
from deepmimo.exporters.sionna_exporter import sionna_exporter
Scene Configuration¶
We use Sionna's built-in Munich scene: a realistic urban environment with buildings, streets, and varied geometry. The transmitter is placed on a rooftop; receivers are placed at street level.
We use max_depth=3 with specular reflections, diffuse scattering, and edge
diffraction (UTD around building corners and rooftop edges). Together these
capture LoS, multi-bounce specular, dense scattered multipath, and the
classic NLOS corner-diffraction paths that bend around obstacles.
CARRIER_FREQ = 3.5e9 # 3.5 GHz
# Ray-tracing parameters forwarded to PathSolver
RT_PARAMS = {
"max_depth": 3, # LoS + up to 3 interactions (reflect / diffract)
"los": True,
"specular_reflection": True,
"diffuse_reflection": True, # Lambertian surface scattering
"diffraction": True, # UTD edge diffraction around building corners
"refraction": False,
"samples_per_src": 2_000_000,
}
# Transmitter — rooftop position
TX_POS = [-210.0, 73.0, 105.0]
# Receivers — four street-level positions with confirmed propagation paths
RX_POSITIONS = [
[40.0, 20.0, 1.5],
[20.0, 50.0, 1.5],
[30.0, 60.0, 1.5],
[50.0, 50.0, 1.5],
]
Build the Scene¶
_t0 = time.perf_counter()
scene = sionna_rt.load_scene(sionna_rt.scene.munich)
scene.frequency = CARRIER_FREQ
# Single-element isotropic antenna at TX and RX
single_ant = PlanarArray(
num_rows=1,
num_cols=1,
vertical_spacing=0.5,
horizontal_spacing=0.5,
pattern="iso",
polarization="V",
)
scene.tx_array = single_ant
scene.rx_array = single_ant
# Add transmitter
tx = Transmitter("tx_0", position=TX_POS)
tx.display_radius = 5.0 # metres; default heuristic is too large for Munich
scene.add(tx)
# Add receivers
for i, pos in enumerate(RX_POSITIONS):
rx = Receiver(f"rx_{i}", position=pos)
rx.display_radius = 4.0 # metres
scene.add(rx)
t_scene = time.perf_counter() - _t0
print(f"TX position : {TX_POS}")
print(f"RX count : {len(RX_POSITIONS)}")
print(f"Scene load : {t_scene:.2f} s")
TX position : [-210.0, 73.0, 105.0] RX count : 4 Scene load : 0.36 s
Visualize the Scene¶
Sionna RT renders the 3D scene with device positions before any ray tracing. The top-down view shows the full Munich scene geometry; the oblique view gives a sense of building heights relative to the rooftop TX.
# Top-down view centered between TX and receiver cluster
cam_top = Camera(position=[-80.0, 40.0, 600.0], look_at=[-80.0, 40.0, 0.0])
fig = scene.render(camera=cam_top, show_devices=True)
fig.suptitle("Munich Scene — Top View (TX = red triangle, RX = blue dots)")
plt.show()
# Oblique perspective from the south-west
cam_oblique = Camera(position=[-500.0, -300.0, 400.0], look_at=[-80.0, 40.0, 50.0])
fig = scene.render(camera=cam_oblique, show_devices=True)
fig.suptitle("Munich Scene — Perspective View")
plt.show()
Run Ray Tracing¶
p_solver = PathSolver()
_t = time.perf_counter()
paths = p_solver(scene=scene, **RT_PARAMS)
t_rt = time.perf_counter() - _t
n_rx = paths.tau.shape[0]
n_tx = paths.tau.shape[1]
max_paths = paths.tau.shape[2]
print(f"Ray tracing : {t_rt:.1f} s")
print(f"Receivers : {n_rx}")
print(f"Transmitters : {n_tx}")
print(f"Max paths/pair: {max_paths}")
print(f"a[0] shape : {paths.a[0].shape} (n_rx, n_tx, n_rx_ant, n_tx_ant, n_paths)")
Ray tracing : 0.1 s Receivers : 4 Transmitters : 1 Max paths/pair: 48 a[0] shape : (4, 1, 1, 1, 48) (n_rx, n_tx, n_rx_ant, n_tx_ant, n_paths)
Visualize Propagation Paths¶
Render the scene with the computed ray paths overlaid. Each colored line segment represents a propagation path from TX to RX.
fig = scene.render(camera=cam_top, paths=paths, show_devices=True)
fig.suptitle("Propagation Paths — Top View")
plt.show()
# Perspective view of paths
fig = scene.render(camera=cam_oblique, paths=paths, show_devices=True)
fig.suptitle("Propagation Paths — Perspective View")
plt.show()
Power-Delay Profiles (Sionna)¶
Plot the per-receiver power-delay profile directly from the Paths object,
before any conversion. Delays are in nanoseconds; power is derived from the
complex channel coefficient a.
# Complex channel coefficients — shape: (n_rx, n_tx, n_rx_ant, n_tx_ant, max_paths)
a_complex = paths.a[0].numpy() + 1j * paths.a[1].numpy()
tau_np = paths.tau.numpy() # (n_rx, n_tx, max_paths)
fig, axes = plt.subplots(2, (n_rx + 1) // 2, figsize=(10, 7), sharey=True)
axes = axes.flatten()
for rx_idx in range(n_rx):
ax = axes[rx_idx]
delays_ns = tau_np[rx_idx, 0, :] * 1e9
power_lin = np.abs(a_complex[rx_idx, 0, 0, 0, :]) ** 2
valid = delays_ns > 0
if valid.any():
ax.stem(
delays_ns[valid],
10 * np.log10(power_lin[valid] + 1e-30),
basefmt="none",
markerfmt="C0o",
linefmt="C0-",
)
ax.set_title(f"RX {rx_idx}")
ax.set_xlabel("Delay (ns)")
if rx_idx % ((n_rx + 1) // 2) == 0:
ax.set_ylabel("Power (dBW)")
ax.grid(visible=True, alpha=0.3)
for ax in axes[n_rx:]:
ax.set_visible(False)
plt.suptitle("Power-Delay Profiles (from Sionna)", fontsize=13)
plt.tight_layout()
plt.show()
Export with sionna_exporter¶
sionna_exporter serializes paths, materials, RT parameters, and full scene
geometry (vertices and face connectivity) into .pkl files. Face
connectivity is used by the converter to split merged city meshes into
individual building components.
save_folder = str(Path(tempfile.mkdtemp()) / "munich_sionna_rt")
_t = time.perf_counter()
sionna_exporter(scene, paths, RT_PARAMS, save_folder)
t_export = time.perf_counter() - _t
print(f"Export : {t_export:.2f} s → {save_folder}")
for f in sorted(Path(save_folder).iterdir()):
size_kb = f.stat().st_size / 1024
print(f" {f.name:40s} {size_kb:7.1f} KB")
Export : 0.01 s → /tmp/tmpx4ssypfk/munich_sionna_rt sionna_faces.pkl 456.4 KB sionna_material_indices.pkl 0.2 KB sionna_materials.pkl 1.1 KB sionna_objects.pkl 0.3 KB sionna_paths.pkl 14.9 KB sionna_rt_params.pkl 0.6 KB sionna_vertices.pkl 399.1 KB
Convert to DeepMIMO Format¶
dm.convert auto-detects the Sionna .pkl files and routes them through
the Sionna RT converter, producing a scenario folder in the DeepMIMO
scenarios directory.
_t = time.perf_counter()
scenario_name = dm.convert(save_folder, overwrite=True)
t_convert = time.perf_counter() - _t
print(f"Convert : {t_convert:.2f} s → {scenario_name}")
Determining converter... Using Sionna RT converter converting from sionna RT
Processing receivers for TX 0, Ant 0: 0%| | 0/4 [00:00<?, ?it/s]
Processing receivers for TX 0, Ant 0: 100%|██████████| 4/4 [00:00<00:00, 2337.96it/s]
Convert : 63.18 s → munich_sionna_rt
Load and Inspect the DeepMIMO Dataset¶
_t = time.perf_counter()
dataset = dm.load(scenario_name)
t_load = time.perf_counter() - _t
print(dataset)
print(f"\nLoad : {t_load:.2f} s")
Loading TXRX PAIR: TXset 0 (tx_idx 0) & RXset 1 (rx_idxs 4)
{'aoa_az': array([[168.0305 , 167.93126 , 167.93126 , 167.93443 , 167.93443 ,
168.0305 , 167.92096 , 168.19212 , 167.92882 , 167.5692 ,
14.972552 , 23.705832 , 14.972552 , 106.40097 , 14.972699 ,
168.202 , 164.37828 , 19.138586 , 167.55943 , 19.138586 ,
23.703562 , 164.4448 , 19.137142 , -74.858315 , 19.137144 ],
[-20.969456 , -41.29406 , -20.969416 , -21.093536 , -20.971441 ,
-41.29509 , -41.334812 , -41.177902 , 108.3206 , -22.651028 ,
-25.263477 , -20.816635 , 96.722984 , 75.45665 , 96.722984 ,
-22.650774 , 106.81274 , -25.262482 , -19.320957 , -22.650774 ,
-41.64541 , -25.262482 , -21.893612 , nan, nan],
[176.8995 , 176.85039 , 176.85039 , -43.632908 , -43.72962 ,
176.84518 , 177.062 , 176.8995 , 176.36943 , -43.579906 ,
-34.834766 , 176.85088 , -40.735344 , -23.790205 , 176.11069 ,
100.66815 , 100.668144 , 81.09627 , 176.84573 , 177.07388 ,
-34.83513 , -38.205128 , -38.205124 , 176.35785 , -38.20443 ],
[174.94469 , -26.413996 , -26.413942 , -26.295292 , 175.0552 ,
174.94469 , -29.09897 , -29.092749 , -42.017437 , 178.45486 ,
-34.63395 , -23.760057 , 5.9981747, 174.26547 , 103.64909 ,
103.64909 , -47.733738 , -47.73374 , -42.017754 , 5.9984164,
29.888536 , 5.9984164, 174.46118 , 178.4431 , -47.73206 ]],
dtype=float32),
'aoa_el': array([[ 67.95211 , 69.268585, 69.26861 , 69.16437 , 69.16436 ,
112.6231 , 69.43449 , 69.197075, 69.12482 , 69.244514,
71.55382 , 71.74513 , 72.7175 , 83.646355, 107.77757 ,
111.38557 , 110.72352 , 71.62771 , 111.33561 , 72.78603 ,
108.74659 , 70.47063 , 107.70745 , 72.2837 , 108.86622 ],
[ 73.86253 , 106.24131 , 106.6046 , 107.68485 , 73.81825 ,
106.283585, 106.25151 , 106.24113 , 97.64707 , 73.86343 ,
73.88009 , 106.65377 , 99.508766, 97.2728 , 101.08587 ,
106.60326 , 97.63348 , 106.58629 , 107.68327 , 107.68361 ,
106.25443 , 107.66573 , 75.04606 , nan, nan],
[ 66.70238 , 68.03856 , 68.038574, 106.26916 , 107.32669 ,
68.20727 , 68.008446, 113.897896, 68.00019 , 106.26718 ,
72.56861 , 112.58726 , 73.745224, 76.30284 , 67.99063 ,
103.62731 , 103.62731 , 106.80944 , 112.42282 , 112.601585,
107.903885, 72.60799 , 73.69953 , 112.607506, 107.86361 ],
[ 68.37026 , 74.36058 , 106.069214, 75.333755, 69.62242 ,
112.196304, 75.84898 , 104.57263 , 71.40895 , 70.54943 ,
106.05187 , 72.138435, 74.792206, 69.58758 , 103.33606 ,
103.33606 , 71.47611 , 72.6448 , 109.08967 , 105.62637 ,
104.758255, 105.62637 , 111.01116 , 110.00261 , 109.02117 ]],
dtype=float32),
'aod_az': array([[-1.1969495e+01, -7.2729044e+00, -7.2729044e+00, -5.9975386e+00,
-5.9975386e+00, -1.1969481e+01, -7.6452217e+00, -2.2398273e+01,
-2.2272508e+00, 1.0409760e+01, -9.3138113e+00, -8.1996393e+00,
-1.9874959e+00, 2.8162979e+01, -2.2559292e+00, -2.2698679e+01,
-5.6390166e+00, -8.8162374e+00, 1.0033315e+01, -1.0765431e+00,
-8.1996384e+00, -6.4347248e+00, -1.3581792e+00, -8.8162374e+00,
-8.8162384e+00],
[ 1.2669377e-01, -7.9360452e+00, -1.6425912e-01, -8.5267239e+00,
1.1178869e+00, -7.3712268e+00, -1.0879637e+01, 1.7406401e-01,
2.4790255e+01, -4.3558094e-01, -1.3291367e+00, 1.2376377e+01,
1.9096058e+01, 9.6730833e+00, 7.8681245e-02, -7.1861279e-01,
2.4167440e+01, -1.5989146e+00, -8.1996384e+00, -8.8162374e+00,
-4.8231953e+01, -9.3138113e+00, -7.2526016e+01, nan,
nan],
[-3.1004901e+00, -9.7747719e-01, -9.7747719e-01, -3.4738791e+00,
-1.0456894e+01, -1.1329758e+00, -1.1408784e+01, -3.1004989e+00,
2.1519072e+01, 7.5844198e-02, -8.1996384e+00, -9.9897659e-01,
-1.4078299e+00, -8.7456732e+00, 4.4700771e+01, -6.9924154e+00,
-6.9924145e+00, 1.9569277e+01, -1.1537193e+00, -1.1729765e+01,
-8.1996384e+00, -8.8162374e+00, -5.3565961e-01, 2.1125431e+01,
-8.8162374e+00],
[-5.0553126e+00, -8.7781906e+00, -8.7782059e+00, 1.3807812e+00,
-1.1275238e+01, -5.0552969e+00, -7.2365997e+01, -7.2225143e+01,
-8.1996393e+00, -8.3975426e+01, -9.6658792e+00, -8.9289837e+00,
-2.9868362e+00, 4.6304180e+01, -6.1381588e+00, -6.1381578e+00,
-8.8162374e+00, -1.1575677e+00, -8.1996403e+00, -2.9868364e+00,
2.6992400e+00, -2.9868364e+00, 2.3028973e+01, -8.3913376e+01,
-8.8162374e+00]], dtype=float32),
'aod_el': array([[112.04789 , 148.8809 , 148.8809 , 152.46828 , 152.46828 ,
112.62334 , 147.65903 , 153.53719 , 159.34428 , 148.07735 ,
108.445366, 108.25465 , 149.13872 , 110.25701 , 148.66174 ,
153.11453 , 115.60346 , 108.3716 , 147.61446 , 149.06882 ,
108.74727 , 115.61603 , 148.59589 , 107.716194, 108.86691 ],
[150.00362 , 150.90929 , 149.55954 , 107.6851 , 151.65038 ,
152.58018 , 151.5183 , 149.91818 , 114.89608 , 150.09637 ,
150.2527 , 150.2978 , 112.7175 , 115.00601 , 121.759224,
149.65085 , 114.58967 , 149.80534 , 107.68369 , 107.68402 ,
158.70132 , 107.666145, 122.59519 , nan, nan],
[113.297615, 148.20831 , 148.20831 , 150.39761 , 107.32688 ,
147.09352 , 150.82384 , 113.898155, 147.81604 , 149.79852 ,
107.43095 , 148.20917 , 150.12346 , 103.95629 , 149.66037 ,
119.85536 , 119.85536 , 149.65906 , 147.09439 , 150.38634 ,
107.90435 , 107.39158 , 149.94019 , 147.36165 , 107.86405 ],
[111.62973 , 105.639305, 106.06948 , 151.31474 , 151.00226 ,
112.19654 , 123.04359 , 123.43431 , 108.59017 , 127.21888 ,
106.052605, 103.96189 , 105.20742 , 151.65163 , 117.21172 ,
117.21171 , 108.52314 , 148.9341 , 109.09051 , 105.62696 ,
104.758736, 105.62696 , 149.44788 , 127.74054 , 109.021935]],
dtype=float32),
'delay': array([[9.1970128e-07, 9.2681671e-07, 9.2681671e-07, 9.2695535e-07,
9.2695535e-07, 9.2350427e-07, 9.2742829e-07, 9.2747928e-07,
9.2808466e-07, 9.2758313e-07, 1.0911457e-06, 1.1021513e-06,
1.0995122e-06, 1.3813592e-06, 1.1025263e-06, 9.3108082e-07,
9.2707199e-07, 1.0953748e-06, 9.3117671e-07, 1.1037503e-06,
1.1053268e-06, 9.2335097e-07, 1.1067530e-06, 1.1345255e-06,
1.0985699e-06],
[1.1751872e-06, 1.2036270e-06, 1.1780078e-06, 1.1693937e-06,
1.1752009e-06, 1.2036401e-06, 1.2036386e-06, 1.2037112e-06,
1.1790206e-06, 1.1752727e-06, 1.1764463e-06, 1.1784680e-06,
1.1605083e-06, 1.2160316e-06, 1.1965938e-06, 1.1780930e-06,
1.1811061e-06, 1.1792640e-06, 1.1694875e-06, 1.1694666e-06,
1.2067439e-06, 1.1706118e-06, 1.2563477e-06, nan,
nan],
[8.7290124e-07, 8.7933870e-07, 8.7933870e-07, 1.2016224e-06,
1.1928046e-06, 8.7990702e-07, 8.7982107e-07, 8.7690728e-07,
8.8037427e-07, 1.2016397e-06, 1.1525011e-06, 8.8313169e-07,
1.1669393e-06, 1.4371631e-06, 8.8329494e-07, 1.1722035e-06,
1.1722035e-06, 1.1681185e-06, 8.8367312e-07, 8.8361764e-07,
1.1555381e-06, 1.1550287e-06, 1.1637703e-06, 8.8417193e-07,
1.1580594e-06],
[9.3660407e-07, 1.2806506e-06, 1.2833843e-06, 1.2900392e-06,
9.4403276e-07, 9.4033874e-07, 1.3195290e-06, 1.3220111e-06,
1.0829431e-06, 9.8164048e-07, 1.2847048e-06, 1.3654244e-06,
1.3161272e-06, 9.4789254e-07, 1.2175899e-06, 1.2175898e-06,
1.0867236e-06, 1.0950423e-06, 1.0861746e-06, 1.3187876e-06,
1.3944903e-06, 1.3187876e-06, 9.4840459e-07, 9.8501823e-07,
1.0899441e-06]], dtype=float32),
'inter': array([[ 0., 2., 2., 2., 2., 1., 2., 2., 2., 2., 2.,
2., 12., 2., 121., 21., 21., 2., 21., 12., 21., 2.,
121., 21., 21.],
[ 11., 111., 111., 11., 21., 211., 211., 211., 121., 12., 12.,
211., 121., 121., 121., 121., 121., 121., 21., 21., 211., 21.,
211., nan, nan],
[ 0., 2., 2., 111., 11., 2., 2., 1., 2., 211., 2.,
21., 12., 2., 2., 211., 211., 121., 21., 21., 21., 2.,
12., 21., 21.],
[ 0., 1., 11., 21., 2., 1., 21., 211., 2., 2., 121.,
2., 2., 2., 211., 211., 2., 12., 21., 21., 21., 21.,
21., 21., 21.]], dtype=float32),
'inter_pos': array([[[[ nan, nan, nan],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-204.74632 , 72.32951 , 96.22685 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-204.74632 , 72.32951 , 96.22685 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-205.96762 , 72.576355 , 97.221756 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-205.96762 , 72.576355 , 97.221756 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[ 36.4789 , 20.746532 , 0. ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-203.73367 , 72.15886 , 95.014565 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-206.37584 , 71.506355 , 97.12513 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-207.34842 , 72.89687 , 97.96104 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-204.78755 , 73.95758 , 96.49321 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[ 67.81153 , 27.437872 , 11.102143 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[ 69.111496 , 32.781223 , 11.986848 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-204.90689 , 72.82326 , 96.47184 ],
[ 67.81153 , 27.437872 , 10.4567 ],
[ nan, nan, nan]],
[[ -7.507546 , 181.40709 , 20.232714 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-204.71881 , 72.791954 , 96.32029 ],
[ 67.81153 , 27.437872 , 7.7311 ],
[ 44.519493 , 21.208736 , 0. ]],
[[-206.26866 , 71.43925 , 97.02263 ],
[ 36.250504 , 20.78311 , 0. ],
[ nan, nan, nan]],
[[-116.546745 , 63.77257 , 60. ],
[ 36.181713 , 21.067661 , 0. ],
[ nan, nan, nan]],
[[ 68.33152 , 29.831245 , 11.459444 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-204.58769 , 73.95758 , 96.33428 ],
[ 36.24988 , 20.827303 , 0. ],
[ nan, nan, nan]],
[[-204.89897 , 72.904144 , 96.48582 ],
[ 68.33152 , 29.831245 , 10.7907295],
[ nan, nan, nan]],
[[ 69.111496 , 32.781223 , 9.290813 ],
[ 44.046818 , 21.776688 , 0. ],
[ nan, nan, nan]],
[[-109.79525 , 61.69874 , 56.650864 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-204.71169 , 72.87462 , 96.33531 ],
[ 68.33152 , 29.831245 , 8.075364 ],
[ 44.438393 , 21.540182 , 0. ]],
[[ 68.33152 , 29.831245 , 15.023292 ],
[ 42.62467 , 10.300591 , 4.7099586],
[ nan, nan, nan]],
[[ 68.33152 , 29.831245 , 8.748126 ],
[ 44.146973 , 21.438997 , 0. ],
[ nan, nan, nan]]],
[[[-205.2593 , 73.01048 , 96.787636 ],
[ 68.72658 , 31.325403 , 16.598694 ],
[ nan, nan, nan]],
[[-205.4803 , 72.36994 , 96.79805 ],
[ 65.024185 , 10.453552 , 15.957504 ],
[ 23.86877 , 46.60198 , 0. ]],
[[-205.09802 , 72.98595 , 96.65825 ],
[ 68.7266 , 31.325487 , 14.061466 ],
[ 24.697111 , 48.19992 , 0. ]],
[[ 68.69752 , 31.215488 , 15.142926 ],
[ 24.389242 , 48.306934 , 0. ],
[ nan, nan, nan]],
[[-205.80396 , 73.08188 , 97.221756 ],
[ 68.72611 , 31.323648 , 16.642467 ],
[ nan, nan, nan]],
[[-205.99808 , 72.482285 , 97.221756 ],
[ 65.02364 , 10.452499 , 16.005566 ],
[ 23.85804 , 46.611168 , 0. ]],
[[-205.68886 , 72.171394 , 96.90837 ],
[ 65.00413 , 10.414357 , 15.9722185],
[ 23.863771 , 46.601425 , 0. ]],
[[-205.231 , 73.01449 , 96.76699 ],
[ 65.0812 , 10.565011 , 15.948393 ],
[ 23.87563 , 46.60976 , 0. ]],
[[ -39.917484 , 151.55411 , 18.052094 ],
[ -17.774601 , 164.08217 , 14.636048 ],
[ 16.488289 , 60.605667 , 0. ]],
[[-205.27934 , 72.96411 , 96.79149 ],
[ 68.33152 , 29.831245 , 16.65191 ],
[ nan, nan, nan]],
[[-205.31589 , 72.89132 , 96.8014 ],
[ 67.81153 , 27.437872 , 16.779093 ],
[ nan, nan, nan]],
[[-205.6361 , 73.95758 , 97.16792 ],
[ 68.76237 , 31.460758 , 14.105814 ],
[ 24.687178 , 48.21805 , 0. ]],
[[ -16.629934 , 139.94551 , 19.327694 ],
[ 8.51512 , 147.42876 , 14.933193 ],
[ 18.951605 , 58.89367 , 0. ]],
[[ -27.93366 , 104.03313 , 18.853048 ],
[ 41.29016 , 132.0668 , 9.320891 ],
[ 22.951427 , 61.37696 , 0. ]],
[[-114.50262 , 73.13114 , 45.883106 ],
[ 8.51512 , 147.42876 , 17.722878 ],
[ 19.103743 , 57.602932 , 0. ]],
[[-205.11865 , 72.938774 , 96.662346 ],
[ 68.33152 , 29.831245 , 14.116108 ],
[ 24.6426 , 48.06266 , 0. ]],
[[ -35.856262 , 151.14444 , 17.653013 ],
[ -14.171749 , 163.09142 , 14.334678 ],
[ 16.762781 , 60.713703 , 0. ]],
[[-205.15646 , 72.8648 , 96.67294 ],
[ 67.81153 , 27.437872 , 14.247182 ],
[ 24.554398 , 47.850792 , 0. ]],
[[ 69.111496 , 32.781223 , 15.092572 ],
[ 24.439875 , 48.44336 , 0. ],
[ nan, nan, nan]],
[[ 68.33152 , 29.831245 , 15.197604 ],
[ 24.34183 , 48.188103 , 0. ],
[ nan, nan, nan]],
[[-208.05594 , 70.82324 , 97.513916 ],
[ 64.85124 , 10.115509 , 15.999854 ],
[ 23.844591 , 46.581135 , 0. ]],
[[ 67.81153 , 27.437872 , 15.337813 ],
[ 24.259405 , 47.989986 , 0. ],
[ nan, nan, nan]],
[[-204.31186 , 54.930916 , 92.88752 ],
[-205.9449 , 67.7426 , 89.43827 ],
[ 68.50978 , 30.50546 , 15.463445 ]],
[[ nan, nan, nan],
[ nan, nan, nan],
[ nan, nan, nan]],
[[ nan, nan, nan],
[ nan, nan, nan],
[ nan, nan, nan]]],
[[[ nan, nan, nan],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-204.56297 , 72.907234 , 96.22685 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-204.56297 , 72.907234 , 96.22685 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-205.33401 , 72.71675 , 96.77206 ],
[ 70.579254 , 21.312263 , 14.862769 ],
[ 33.720066 , 56.4533 , 0. ]],
[[ 70.53428 , 21.22436 , 16.000746 ],
[ 33.47435 , 56.676414 , 0. ],
[ nan, nan, nan]],
[[-203.5398 , 72.87224 , 95.014565 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-205.46686 , 72.085236 , 96.71731 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[ 26.619684 , 60.183064 , 0. ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-205.1335 , 74.91884 , 96.68794 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-205.18744 , 73.00637 , 96.731674 ],
[ 70.60388 , 21.360409 , 14.85617 ],
[ 33.723827 , 56.456257 , 0. ]],
[[ 69.111496 , 32.781223 , 16.461035 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-204.56319 , 72.9052 , 96.22685 ],
[ 26.39963 , 60.19804 , 0. ],
[ nan, nan, nan]],
[[-205.27048 , 72.883766 , 96.764824 ],
[ 67.81153 , 27.437872 , 16.048822 ],
[ nan, nan, nan]],
[[ 113.34516 , 23.257439 , 23.697603 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-206.86462 , 76.1028 , 97.46326 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-132.18443 , 63.455906 , 60. ],
[ 14.01584 , 144.85051 , 19.433113 ],
[ 28.854618 , 66.08043 , 0. ]],
[[-132.18442 , 63.455906 , 60. ],
[ 14.015775 , 144.85056 , 19.43313 ],
[ 28.854532 , 66.080376 , 0. ]],
[[-205.66753 , 74.54011 , 97.14423 ],
[ 41.29016 , 132.0668 , 20.537556 ],
[ 30.768475 , 64.90541 , 0. ]],
[[-203.54005 , 72.8699 , 95.014565 ],
[ 26.370365 , 60.200016 , 0. ],
[ nan, nan, nan]],
[[-205.32025 , 72.028336 , 96.591125 ],
[ 26.401394 , 60.183903 , 0. ],
[ nan, nan, nan]],
[[ 69.111496 , 32.781223 , 13.894685 ],
[ 33.81102 , 57.347893 , 0. ],
[ nan, nan, nan]],
[[ 68.33152 , 29.831245 , 16.778763 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-205.22372 , 72.955345 , 96.746796 ],
[ 68.33152 , 29.831245 , 15.764238 ],
[ nan, nan, nan]],
[[-204.94086 , 74.95474 , 96.53177 ],
[ 26.405092 , 60.228863 , 0. ],
[ nan, nan, nan]],
[[ 68.33152 , 29.831245 , 14.221622 ],
[ 33.65738 , 57.121548 , 0. ],
[ nan, nan, nan]]],
[[[ nan, nan, nan],
[ nan, nan, nan],
[ nan, nan, nan]],
[[ 100.10007 , 25.114847 , 17.160229 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[ 100.100044 , 25.114777 , 14.614409 ],
[ 54.663666 , 47.683422 , 0. ],
[ nan, nan, nan]],
[[-205.70828 , 73.10345 , 97.153946 ],
[ 100.13551 , 25.226603 , 16.135695 ],
[ nan, nan, nan]],
[[-205.52512 , 72.10784 , 96.76745 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[ 46.338 , 50.324013 , 0. ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-204.26904 , 54.97086 , 92.693985 ],
[ 99.29165 , 22.565788 , 15.723097 ],
[ nan, nan, nan]],
[[-204.23145 , 55.005928 , 92.52407 ],
[ 99.293526 , 22.571732 , 13.165773 ],
[ 55.041992 , 47.194565 , 0. ]],
[[ 69.111496 , 32.781223 , 10.152243 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-208.30775 , 56.965527 , 92.753204 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[ 98.61633 , 20.43641 , 14.920121 ],
[ 79.77921 , 29.430645 , 8.913995 ],
[ 54.289436 , 47.037014 , 0. ]],
[[ 113.04945 , 22.244385 , 23.697603 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[ 109.99139 , 56.303673 , 17.897425 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-207.28949 , 75.8368 , 97.72788 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-122.98526 , 63.64219 , 60. ],
[ 28.630186 , 138.00064 , 19.968176 ],
[ 48.50683 , 56.148956 , 0. ]],
[[-122.98524 , 63.64219 , 60. ],
[ 28.630192 , 138.00064 , 19.968178 ],
[ 48.50683 , 56.148956 , 0. ]],
[[ 68.33152 , 29.831245 , 10.631567 ],
[ nan, nan, nan],
[ nan, nan, nan]],
[[-204.84644 , 72.89587 , 96.44359 ],
[ 68.33152 , 29.831245 , 10.017374 ],
[ nan, nan, nan]],
[[ 69.111496 , 32.781223 , 7.403037 ],
[ 53.220043 , 47.09883 , 0. ],
[ nan, nan, nan]],
[[ 109.99139 , 56.303673 , 15.372711 ],
[ 55.333523 , 50.560448 , 0. ],
[ nan, nan, nan]],
[[ 116.82514 , 88.40835 , 18.805157 ],
[ 54.936817 , 52.837482 , 0. ],
[ nan, nan, nan]],
[[ 109.99139 , 56.303673 , 15.372715 ],
[ 55.3335 , 50.56043 , 0. ],
[ nan, nan, nan]],
[[-205.761 , 74.80188 , 97.196686 ],
[ 46.112885 , 50.376987 , 0. ],
[ nan, nan, nan]],
[[-208.29605 , 57.020435 , 92.5614 ],
[ 45.880985 , 50.112022 , 0. ],
[ nan, nan, nan]],
[[ 68.33152 , 29.831245 , 7.8962574],
[ 52.926495 , 46.780113 , 0. ],
[ nan, nan, nan]]]], dtype=float32),
'load_params': {'compat_v3': False,
'matrices': 'all',
'max_paths': 25,
'rx_sets': {1: array([0, 1, 2, 3])},
'tx_sets': {0: array([0])}},
'materials': MaterialList(5 materials, names=['material_0', 'material_1', 'material_2', 'material_3', 'material_4']),
'name': 'munich_sionna_rt',
'phase': array([[ 0. , -28.40796 , -28.416729 , 142.89426 ,
142.86494 , -130.81396 , 135.58534 , 137.43144 ,
135.54807 , 137.9133 , 143.02397 , 132.0713 ,
143.34119 , -44.996876 , -31.151268 , -18.193506 ,
-27.249004 , 107.3604 , -18.291328 , 104.812065 ,
-39.8504 , -5.6818304 , -69.89141 , -29.429955 ,
-64.38564 ],
[-141.11917 , 43.53177 , 42.47271 , 44.955276 ,
21.821655 , -153.10133 , -145.02 , -161.863 ,
61.486416 , 60.050232 , 118.511955 , -177.40671 ,
-30.240063 , -28.093214 , -155.28218 , -116.59103 ,
-66.23628 , -58.221893 , -91.70967 , -120.806564 ,
178.6537 , -56.994385 , 17.689684 , nan,
nan],
[ 0. , -30.89508 , -30.906862 , 44.370472 ,
46.345364 , 135.60579 , 138.4528 , -78.069374 ,
137.1976 , -145.03398 , 151.70251 , -165.846 ,
128.93886 , -45.006023 , 136.72812 , -10.826852 ,
-10.835394 , -47.558144 , -0.94320077, 6.777595 ,
-22.531656 , 102.09454 , 105.86922 , 5.826313 ,
-72.11715 ],
[ 0. , -141.04044 , 41.74222 , 46.812786 ,
140.0643 , -142.08067 , -2.8735194 , 178.43387 ,
145.81377 , -44.870953 , 179.48491 , -45.005302 ,
145.04893 , 140.98117 , -23.727892 , -23.73824 ,
127.56492 , 133.03226 , -24.991848 , -32.99615 ,
-46.416332 , -46.75584 , -22.704725 , 148.35863 ,
-43.22046 ]], dtype=float32),
'power': array([[ -92.138504, -102.99465 , -102.99643 , -111.03398 , -111.03942 ,
-123.341255, -123.368996, -126.52222 , -127.4453 , -130.37671 ,
-142.35101 , -142.46649 , -142.80122 , -157.22128 , -161.0383 ,
-162.92725 , -163.46947 , -166.3614 , -166.50427 , -166.67894 ,
-167.5509 , -170.99008 , -184.78835 , -186.11264 , -191.61545 ],
[-101.96 , -118.24747 , -118.403366, -119.758156, -120.99573 ,
-128.76639 , -130.56302 , -138.73923 , -140.94762 , -143.95668 ,
-145.68597 , -151.44814 , -153.42595 , -156.03365 , -157.506 ,
-160.30368 , -161.5914 , -162.00491 , -162.84843 , -165.74828 ,
-168.17053 , -168.844 , -183.5961 , nan, nan],
[ -91.68487 , -103.15477 , -103.157135, -118.771225, -120.10712 ,
-122.39563 , -123.75479 , -124.49647 , -132.69208 , -132.96753 ,
-144.02342 , -144.48978 , -145.46445 , -145.74007 , -149.63792 ,
-156.40102 , -156.40227 , -161.1458 , -161.86136 , -164.5781 ,
-167.96944 , -168.12979 , -168.96704 , -173.3617 , -192.07388 ],
[ -92.296684, -102.20479 , -117.864525, -120.5085 , -121.53432 ,
-121.94298 , -128.82109 , -133.95447 , -141.17155 , -143.38435 ,
-143.77701 , -144.43727 , -146.78827 , -150.0171 , -158.92941 ,
-158.93097 , -166.18178 , -166.7073 , -166.72461 , -167.35245 ,
-167.8434 , -167.90947 , -169.62732 , -175.54793 , -191.66862 ]],
dtype=float32),
'rt_params': {'diffuse_diffractions': 0,
'diffuse_final_interaction_only': True,
'diffuse_random_phases': True,
'diffuse_reflections': 2,
'diffuse_transmissions': 0,
'frequency': 3500000000,
'gps_bbox': [0, 0, 0, 0],
'max_diffractions': 0,
'max_path_depth': 3,
'max_reflections': 3,
'max_scattering': 1,
'max_transmissions': 0,
'num_rays': 2000000,
'raw_params': {'bandwidth': [1000000.0],
'diffraction': False,
'diffuse_reflection': True,
'frequency': [3500000000.0],
'los': True,
'max_depth': 3,
'max_num_paths_per_src': 1000000,
'num_samples': 2000000,
'raytracer_version': '2.0.1',
'reflection': True,
'refraction': False,
'rx_array_ant_pos': [[0.0], [0.0], [0.0]],
'rx_array_num_ant': 1,
'rx_array_size': 1,
'samples_per_src': 2000000,
'scattering': True,
'seed': 42,
'specular_reflection': True,
'synthetic_array': True,
'tx_array_ant_pos': [[0.0], [0.0], [0.0]],
'tx_array_num_ant': 1,
'tx_array_size': 1},
'ray_casting_method': 'uniform',
'ray_casting_range_az': 360,
'ray_casting_range_el': 180,
'raytracer_name': 'Sionna Ray Tracing',
'raytracer_version': '2.0.1',
'synthetic_array': True,
'terrain_diffraction': False,
'terrain_reflection': True,
'terrain_scattering': True},
'rx_pos': array([[40. , 20. , 1.5],
[20. , 50. , 1.5],
[30. , 60. , 1.5],
[50. , 50. , 1.5]], dtype=float32),
'scene': Scene(2049 objects [buildings: 2048, terrain: 1], dims = 1475.5 x 1205.6 x 98.6 m),
'tx_pos': array([[-210., 73., 105.]], dtype=float32),
'txrx': {'rx_set_id': 1, 'tx_idx': 0, 'tx_set_id': 0}}
Load : 0.14 s
Ray Visualization (DeepMIMO)¶
DeepMIMO stores the full 3D interaction geometry for each path.
dataset.plot_rays draws TX → bounce points → RX segments, color-coded by
interaction type (LoS = green, reflected = red), with the reconstructed scene
overlaid automatically.
The converter automatically deduplicates buildings that share multiple
material groups in the same physical space (e.g. concrete walls + glass
windows), so each building appears once. Pass deduplicate=False to
dm.convert to disable this if needed.
n_ue = len(dataset.rx_pos)
n_cols = min(n_ue, 2)
n_rows = (n_ue + n_cols - 1) // n_cols
fig, axes = plt.subplots(n_rows, n_cols, figsize=(10, 5 * n_rows), subplot_kw={"projection": "3d"})
axes = np.array(axes).flatten()
for u_idx in range(n_ue):
dataset.plot_rays(u_idx, ax=axes[u_idx])
axes[u_idx].set_title(f"UE {u_idx}")
for ax in axes[n_ue:]:
ax.set_visible(False)
plt.suptitle("Propagation Rays — DeepMIMO", fontsize=13)
plt.tight_layout()
plt.show()
Summary¶
t_total = t_scene + t_rt + t_export + t_convert + t_load
rows = [
("Scene load", t_scene),
("Ray tracing", t_rt),
("Export", t_export),
("Convert", t_convert),
("Dataset load", t_load),
("─" * 14, None),
("Total", t_total),
]
print(f"{'Step':<16} {'Time':>8}")
print("─" * 26)
for label, val in rows:
if val is None:
print(f"{label}")
else:
print(f"{label:<16} {val:>7.2f} s")
print(
f"\nRT params: max_depth={RT_PARAMS['max_depth']}, "
f"diffraction={RT_PARAMS['diffraction']}, "
f"diffuse={RT_PARAMS['diffuse_reflection']}, "
f"samples={RT_PARAMS['samples_per_src']:,}"
)
Step Time ────────────────────────── Scene load 0.36 s Ray tracing 0.12 s Export 0.01 s Convert 63.18 s Dataset load 0.14 s ────────────── Total 63.81 s RT params: max_depth=3, diffraction=True, diffuse=True, samples=2,000,000
The complete Sionna RT 2.0 → DeepMIMO pipeline:
| Step | Tool | Output |
|---|---|---|
| 1. Load scene | sionna_rt.load_scene |
Scene object |
| 2. Visualize | scene.render |
RGBA renders |
| 3. Ray trace | PathSolver |
Paths object |
| 4. Export | sionna_exporter |
.pkl files on disk |
| 5. Convert | dm.convert |
DeepMIMO scenario folder |
| 6. Load | dm.load |
Dataset object |
| 7. Explore | plot_rays, delay profiles |
Figures |
From here you can use any DeepMIMO tool: channel generation, beamforming, dataset manipulation, Doppler, and ML training pipelines.