differt.em.path_delays

Contents

differt.em.path_delays#

path_delays(paths, **kwargs)[source]#

Compute the path delay, in seconds, of each path.

Each path is exactly made of path_length vertices.

Parameters:
Return type:

Float[Array, '*batch']

Returns:

The array of path delays.

Examples

The following example shows how to compute the delay of a very simple path.

>>> from differt.em import c
>>> from differt.em import (
...     path_delays,
... )
>>>
>>> path = jnp.array([[1.0, 0.0, 0.0], [1.0, 1.0, 0.0]])
>>> path_delays(path) * c
Array(1., dtype=float32)
>>> path_delays(path, speed=2.0)
Array(0.5, dtype=float32)