differt.plugins.deepmimo.DeepMIMO#

class DeepMIMO(*, power, phase, delay, aoa_az, aoa_el, aod_az, aod_el, primitives=None, inter, inter_pos, rx_pos, tx_pos, mask)[source]#

Bases: Module, Generic[ArrayType]

DeepMIMO format data structure.

The generic type parameter ArrayType can be either a JAX array or a NumPy array, indicating whether the data is in JAX or NumPy format.

For elevation and azimuth angles, the reference coordinate system is detailed in Conventions.

Attributes

num_paths

Number of paths.

num_rx

Number of receivers.

num_tx

Number of transmitters.

primitives

Indices of primitives hit along each path.

power

Tap power.

phase

Tap phase.

delay

Tap delay.

aoa_az

Angle of arrival (azimuth) for each path in degrees.

aoa_el

Angle of arrival (elevation) for each path in degrees.

aod_az

Angle of departure (azimuth) for each path in degrees.

aod_el

Angle of departure (elevation) for each path in degrees.

inter

Type of interactions along each path.

inter_pos

3D coordinates in meters of each interaction point along paths.

rx_pos

Receiver positions in 3D coordinates in meters.

tx_pos

Transmitter positions in 3D coordinates in meters.

mask

Mask indicating valid paths.

Methods

asdict()

Convert this class to a dictionary.

iter_paths()

Return an iterator over the path vertices in this DeepMIMO object.

jax()

Return a new instance of this class with arrays converted to JAX arrays.

numpy()

Return a new instance of this class with arrays converted to NumPy arrays.

plot_paths(**kwargs)

Plot the valid paths in this DeepMIMO object.

Detailed documentation

aoa_az: Float[ArrayType, 'num_tx num_rx num_paths']#

Angle of arrival (azimuth) for each path in degrees.

aoa_el: Float[ArrayType, 'num_tx num_rx num_paths']#

Angle of arrival (elevation) for each path in degrees.

aod_az: Float[ArrayType, 'num_tx num_rx num_paths']#

Angle of departure (azimuth) for each path in degrees.

aod_el: Float[ArrayType, 'num_tx num_rx num_paths']#

Angle of departure (elevation) for each path in degrees.

asdict()[source]#

Convert this class to a dictionary.

Return type:

dict[str, TypeVar(ArrayType, bound= setup.<locals>.ArrayType)]

Returns:

A dictionary where keys are attribute names and values are arrays.

delay: Float[ArrayType, 'num_tx num_rx num_paths']#

Tap delay. Propagation delay for each path in seconds.

inter: Int[ArrayType, 'num_tx num_rx num_paths max_num_interactions']#

Type of interactions along each path.

Matches InteractionType, but a value of -1 indicates no interaction, i.e., a path that is terminated early.

inter_pos: Float[ArrayType, 'num_tx num_rx num_paths max_num_interactions 3']#

3D coordinates in meters of each interaction point along paths.

iter_paths()[source]#

Return an iterator over the path vertices in this DeepMIMO object.

Return type:

SizedIterator[Float[Array, 'num_tx num_rx num_paths num_interactions 3']]

Returns:

An iterator of path vertices, grouped by ascending number of interactions, from 0 to max_num_interactions.

jax()[source]#

Return a new instance of this class with arrays converted to JAX arrays.

Return type:

DeepMIMO[Array]

Returns:

A new instance of this with JAX arrays.

mask: Bool[ArrayType, 'num_tx num_rx num_paths']#

Mask indicating valid paths.

property num_paths: int[source]#

Number of paths.

property num_rx: int[source]#

Number of receivers.

property num_tx: int[source]#

Number of transmitters.

numpy()[source]#

Return a new instance of this class with arrays converted to NumPy arrays.

Return type:

DeepMIMO[ndarray]

Returns:

A new instance of this with NumPy arrays.

phase: Float[ArrayType, 'num_tx num_rx num_paths']#

Tap phase. Phase of received signal for each path in degrees. \(\angle a\) (angle of \(a\)), where \(a\) is the complex channel amplitude

plot_paths(**kwargs)[source]#

Plot the valid paths in this DeepMIMO object.

Parameters:

kwargs (Any) – Keyword arguments passed to draw_paths.

Return type:

Any

Returns:

The resulting plot output.

Examples

The following example shows how to call export and use the DeepMIMO object to plot all paths.

>>> import equinox as eqx
>>> from differt.plugins import deepmimo
>>> from differt.scene import TriangleScene, get_sionna_scene
>>> from differt.plotting import reuse
>>>
>>> file = get_sionna_scene("simple_street_canyon")
>>> scene = TriangleScene.load_xml(file)
>>> scene = eqx.tree_at(
...     lambda s: s.transmitters, scene, jnp.array([-33.0, 0.0, 32.0])
... )
>>> scene = eqx.tree_at(
...     lambda s: s.receivers, scene, jnp.array([33.0, 0.0, 2.0])
... )
>>>
>>> with reuse(backend="plotly") as fig:
...     scene.plot()
...     paths = (
...         scene.compute_paths(order=order) for order in [0, 1, 2]
...     )
...     dm = deepmimo.export(paths=paths, scene=scene, frequency=2.4e9)
...     dm.plot_paths()
>>> fig
power: Float[ArrayType, 'num_tx num_rx num_paths']#

Tap power. Received power in dBW for each path, assuming 0 dBW transmitted power. \(10\log10(|a|^2)\), where \(a\) is the complex channel amplitude

primitives: Int[ArrayType, 'num_tx num_rx num_paths max_num_interactions'] | None = None#

Indices of primitives hit along each path.

Note

This field is optional and is provided if include_primitives is set to True in the export function.

A value of -1 indicates no primitive hit, i.e., a path that is terminated early.

rx_pos: Float[ArrayType, 'num_rx 3']#

Receiver positions in 3D coordinates in meters.

tx_pos: Float[ArrayType, 'num_tx 3']#

Transmitter positions in 3D coordinates in meters.