(:, end) = pi/2; <span class="comment">% max sensitivity in y direction</span>

<span class="comment">% define the directivity size</span>
sensor.directivity_size = 20 * kgrid.dx;

<span class="comment">% run the simulation with directional elements</span>
sensor_data_directional = kspaceFirstOrder2D(kgrid, medium, source, sensor, input_args{:});
</pre>

<a name="heading3"></a>
<h2>Time-reversal image reconstruction</h2>

<p>To examine the effect of sensor directionality on time reversal image reconstructio