Hi,
I'm using K-wave to run simulations varying different parameters in hopes of optimizing the image reconstruction and I was trying to perform a reconstruction with the source having a pulse frequency instead of just single emission.
This is all I could get. With the kspaceFirstOrder2D I had to delete the p-final part of the sensor structure so that sensor would be just a double instead of a structure, and I'm guessing that's part of the problem. I don't know if there is a way to reconstruct an image with a pulse speed, but if there is any help would be appreciated.
ux = disc_magnitude*(disc_1 + disc_2);
source.u_mask = zeros(Nx, Ny);
source.u_mask = disc_magnitude*(disc_1 + disc_2);
% define a time varying sinusoidal velocity source in the x-direction
source_freq = 0.125e6; % [Hz]
source_mag = 2/(medium.sound_speed*medium.density);
source.ux = -source_mag*sin(2*pi*source_freq*kgrid.t_array);
% filter the source to remove high frequencies not supported by the grid
source.ux = filterTimeSeries(kgrid, medium, source.ux);
% define a single sensor point
sensor.mask = zeros(Nx, Ny);
sensor.mask(Nx/4, Ny/2) = 1;
% define the acoustic parameters to record
sensor.record = {'p', 'p_final'};
This is a portion of the code I used. I tried combining the 2D modeling with directivity and the time varying source in a homogeneous medium examples.