Skip to content

Commit

Permalink
Simplified shapes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gert-Jan Both committed Nov 8, 2024
1 parent 5e16c96 commit 32e12c6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions modified_born/02_z_y_x.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,11 @@ def G_fn(k: Array, k0: ArrayLike, alpha: Array) -> Array:
plt.colorbar(fraction=0.046, pad=0.04)

# %% Making the potential
V = (permittivity - alpha)[..., None]
V = (permittivity - alpha)

# %% Now making a source. To prevent aliasing, we settle on a 2D tukey
source = jnp.zeros((*permittivity.shape, 3))
source = source.at[250, :, :].set(jnp.array([0, 1, 1]))
source = source * k0**2 * (jnp.mean(permittivity[roi].real) - permittivity.real)[..., None]
source = source.at[250, :, :].set(k0**2 * jnp.array([0, 1, 1]))

plt.figure(figsize=(10, 5))
plt.subplot(121)
Expand Down

0 comments on commit 32e12c6

Please sign in to comment.