Skip to content

Commit f03356c

Browse files
committed
Merge branch 'expand_interp_cart_grid_testing' of github.com:djps/k-wave-python into djps-expand_interp_cart_grid_testing
2 parents fbc0f11 + 290c1d3 commit f03356c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/matlab_test_data_collectors/matlab_collectors/collect_interpCartData.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,11 @@
5555
% create the time array
5656
kgrid.makeTime(medium_sound_speed);
5757
% mock the simulation
58-
sensor_data = sin(repmat(1:kgrid.Nt,[num_sensor_points,1]));
58+
phase_shifts = linspace(0, 2 * pi, num_sensor_points);
59+
sensor_data = sin(2 * pi * [1:kgrid.Nt]/ kgrid.Nt + repmat(phase_shifts', 1, kgrid.Nt));
5960
% smooth the initial pressure distribution and restore the magnitude
6061
p0 = smooth(p0_binary, true);
61-
62+
6263
% interpolate data to remove the gaps and assign to time reversal data
6364
trbd = interpCartData(kgrid, sensor_data, sensor_mask, binary_sensor_mask);
6465
recorder.recordVariable('trbd', trbd);

0 commit comments

Comments
 (0)