differt.em.F#
- F(z)[source]#
Evaluate the transition function at the given points.
The transition function is defined as follows [11, eq. 4.72, p. 184]:
\[F(x) = 2j \sqrt{x} e^{j x} \int\limits_\sqrt{x}^\infty e^{-j u^2} \text{d}u,\]where \(j^2 = -1\).
As detailed in [11, p. 164], the integral can be expressed in terms of Fresnel integrals (\(C(x)\) and \(S(x)\)), so that:
\[C(x) - j S(x) = \int\limits_\sqrt{x}^\infty e^{-j u^2} \text{d}u.\]Thus, the transition function can be rewritten as:
\[2j \sqrt{z} e^{j z} \Big(\sqrt{\frac{\pi}{2}}\frac{1 - j}{2} - C(\sqrt{z}) + j S(\sqrt{z})\Big).\]With Fresnel integrals computed by
jax.scipy.special.fresnel.- Parameters:
z (
Float[Array, '*batch']) – The array of real points to evaluate.- Return type:
- Returns:
The values of the transition function at the given point.
Examples
The following example reproduces the same plot as in [11, fig. 4.16, p. 185].
>>> from differt.em import F >>> >>> x = jnp.logspace(-3, 1, 100) >>> y = F(x) >>> >>> A = jnp.abs(y) # Amplitude of F(x) >>> P = jnp.angle(y, deg=True) # Phase (in deg.) of F(x) >>> >>> fig, ax1 = plt.subplots() >>> >>> ax1.semilogx(x, A) >>> ax1.set_xlabel("$x$") >>> ax1.set_ylabel("Magnitude - solid line") >>> ax2 = plt.twinx() >>> ax2.semilogx(x, P, "--") >>> ax2.set_ylabel("Phase (°) - dashed line") >>> plt.tight_layout()