initial pressure distribution with that produced from the reconstruction, it is convenient to interpolate the reconstructed pressure onto a k-space grid with the same dimensions as <code>source.p0</code>.</p>

<pre class="codeinput">
<span class="comment">% define a second k-space grid using the dimensions of p_xy</span>
[Nx_recon, Ny_recon] = size(p_xy);
kgrid_recon = kWaveGrid(Nx_recon, kgrid.dt * medium.sound_speed, Ny_recon, dy);

<span class="comment">% resample p_xy to be the same size as source.p0</s