Spatial Kramers–Kronig relations and the reflection of waves