differt.em.path_delay

Contents

differt.em.path_delay#

path_delay(path, **kwargs)[source]#

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

The path is exactly made of path_length vertices.

Parameters:
Return type:

Float[Array, '*batch']

Returns:

The path delay.

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_delay,
... )
>>>
>>> path = jnp.array([[1.0, 0.0, 0.0], [1.0, 1.0, 0.0]])
>>> path_delay(path) * c
Array(1., dtype=float32)
>>> path_delay(path, speed=2.0)
Array(0.5, dtype=float32)