Hi Brad,
the new version does not seem to solve the issue. I would be glad if you took a look at my code :)
Best regards,
Marvin
clear all;
DATA_CAST = 'double';
MASK_PLANE = 'xy';
USE_STATISTICS = true;
PML_X_SIZE = 10;
PML_Y_SIZE = 10;
Nx = 100;
Ny = 100;
c_water = 1500; % [m/s]
c_plastic = 2230; % [m/s]
c_poly = 1560; % [m/s]
c_air = 343; % [m/s] @ 20°C
rho_water = 998; % [kg/m^3]
rho_plastic = 1330; % [kg/m^3]
rho_poly = 1100; % [kg/m^3]
rho_air = 1.22; % [kg/m^3]
freq = 15e3; % [Hz]
lambda = c_water/freq;
x = 1;
dx = x/Nx; % [m]
dy = dx; % [m]
kgrid = makeGrid(Nx, dx, Ny, dy);
tr_pos = [round(0.5*Nx), round(0.5*Ny)];
tr_rad = 10.8e-2/(2);
tr_pos_abs = [tr_pos(1)*dx, tr_pos(2)*dy]
ITC = makeDisc(Nx, Ny, tr_pos(1), tr_pos(2), round(tr_rad/dx));
medium.sound_speed_compression = c_water*ones(Nx, Ny);
medium.sound_speed_shear = zeros(Nx, Ny);
medium.density = rho_water*ones(Nx, Ny);
t_end = 10e-4; % [s]
kgrid.t_array = makeTime(kgrid, c_water*1.5);
delta_t = kgrid.t_array(2) - kgrid.t_array(1);
ncycles = 2;
input_signal = toneBurst(1/delta_t, freq, ncycles);
source.sxx = input_signal;
source.syy = input_signal;
source.s_mask = ITC;
sensor.mask = zeros(Nx, Ny);
sensor.mask(50, 100) = 1;
input_args = {'PlotScale', 'auto','PMLSize', [PML_X_SIZE, PML_Y_SIZE],...
'DataCast', DATA_CAST, 'DataRecast', true,'PlotPML', true};
sensor_data = pstdElastic2D(kgrid, medium, source, sensor, input_args{:});