differt.em.length_to_delay#
- length_to_delay(length, speed=299792458.0)[source]#
Compute the delay, in seconds, corresponding to the length.
- Parameters:
length (
Float[ArrayLike, '*#batch']) – Input length (in meters).speed (
Float[ArrayLike, '*#batch']) – Speed (in m/s). Defaults to the speed of light in vacuum.
- Return type:
- Returns:
The path delay.
Examples
The following example shows how to compute a delay from a length.
>>> from differt.em import c >>> from differt.em import ( ... length_to_delay, ... ) >>> >>> length = jnp.array([1.0, 2.0, 4.0]) >>> length_to_delay(length) * c Array([1., 2., 4.], dtype=float32) >>> length_to_delay(length, speed=2.0) Array([0.5, 1. , 2. ], dtype=float32)