Coverage for src/swiift/lib/_ph_utils.py: 60%
5 statements
« prev ^ index » next coverage.py v7.9.1, created at 2025-09-11 16:23 +0200
« prev ^ index » next coverage.py v7.9.1, created at 2025-09-11 16:23 +0200
1import numpy as np
4def _unit_wavefield(x: np.ndarray, c_wavenumbers: np.ndarray) -> np.ndarray:
5 return np.exp((1j * c_wavenumbers[:, None]) * x)
8def _wavefield(
9 x: np.ndarray, c_amps: np.ndarray, c_wavenumbers: np.ndarray
10) -> np.ndarray:
11 return np.imag(c_amps @ _unit_wavefield(x, c_wavenumbers))