<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>k-Wave User Forum &#187; User Favorites: xiangwei</title>
		<link><a href='http://www.k-wave.org/forum/profile/xiangwei'>xiangwei</a></link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 10:16:47 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.k-wave.org/forum/search.php</link>
		</textInput>
		<atom:link href="http://www.k-wave.org/forum/rss/profile/" rel="self" type="application/rss+xml" />

		<item>
			<title>Bradley Treeby on "Time reversal reconstruction problem."</title>
			<link>http://www.k-wave.org/forum/topic/time-reversal-reconstruction-problem#post-5422</link>
			<pubDate>Thu, 17 Mar 2016 12:27:54 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">5422@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;HI xiangwei,&#60;/p&#62;
&#60;p&#62;Which artefacts are unexpected in your reconstruction? Because you only have a very small detector, the images have very strong limited view artefacts. If you've not come across this before, you can read more about these artefacts &#60;a href=&#34;http://wweb.uta.edu/faculty/gambarts/med_phys.pdf&#34;&#62;here&#60;/a&#62;. The feature in the bottom left is just a mirror image of your reconstructed field (you would see the entire grid of absorbers if you expanded the grid).&#60;/p&#62;
&#60;p&#62;Hope that helps,&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>xiangwei on "Time reversal reconstruction problem."</title>
			<link>http://www.k-wave.org/forum/topic/time-reversal-reconstruction-problem#post-5403</link>
			<pubDate>Fri, 26 Feb 2016 05:21:55 +0000</pubDate>
			<dc:creator>xiangwei</dc:creator>
			<guid isPermaLink="false">5403@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;I want to get some simulated data using the Kwave and reconstructed by the Time reversal method provided by the toolbox. However, some problem happened in the reconstructed image. There are some unexpected artifact appeared in the image. Could you please tell me why this happens? The following is the related code:&#60;/p&#62;
&#60;p&#62;close all;&#60;br /&#62;
clear all;&#60;br /&#62;
clc;&#60;/p&#62;
&#60;p&#62;addpath('C:\Program Files\MATLAB\R2013b\toolbox\k-Wave')&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% SETUP THE GRID&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% create the computational grid&#60;br /&#62;
Nx = 256;           % number of grid points in the x (row) direction&#60;br /&#62;
Ny = 256;           % number of grid points in the y (column) direction&#60;br /&#62;
dx = 0.04e-3;        % grid point spacing in the x direction [m]&#60;br /&#62;
dy = dx;        % grid point spacing in the y direction [m]&#60;br /&#62;
kgrid = makeGrid(Nx, dx, Ny, dy);&#60;br /&#62;
center_freq = 5e6; % [Hz]&#60;br /&#62;
bandwidth   = 80; % [%]&#60;br /&#62;
sensor.frequency_response = [center_freq, bandwidth];&#60;/p&#62;
&#60;p&#62;% define the properties of the propagation medium&#60;br /&#62;
medium.sound_speed = 1500;    % [m/s]&#60;/p&#62;
&#60;p&#62;% define the array of time points [s]&#60;br /&#62;
[kgrid.t_array, dt] = makeTime(kgrid, medium.sound_speed);&#60;br /&#62;
Nt = round(0.75*length(kgrid.t_array));&#60;br /&#62;
kgrid.t_array = (0:Nt-1)*dt;&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% DEFINE A LINEAR ARRAY OF DIRECTIONAL ELEMENTS&#60;br /&#62;
% =========================================================================&#60;br /&#62;
array_left = zeros(Nx, Ny);&#60;br /&#62;
ut_left_x = 192;&#60;br /&#62;
i = 1;&#60;br /&#62;
for ut_left_y = 32:1:64&#60;br /&#62;
    array_left(ut_left_x, ut_left_y) = 1;&#60;br /&#62;
    ut_left_x = ut_left_x+1;&#60;br /&#62;
    i = i+1;&#60;br /&#62;
end&#60;br /&#62;
sensor.mask = array_left;&#60;br /&#62;
figure, imagesc(sensor.mask); colormap(gray);&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% DEFINE THE SOURCE&#60;br /&#62;
% =========================================================================&#60;br /&#62;
disc_magnitude = 10; % [au]&#60;br /&#62;
disc_radius    = 1;    % [grid points]&#60;/p&#62;
&#60;p&#62;disc_sum   = zeros(Nx, Ny);&#60;br /&#62;
disc_sum_x = zeros(Nx, Ny);&#60;br /&#62;
disc_sum_y = zeros(Nx, Ny);&#60;/p&#62;
&#60;p&#62;for disc_y_pos = 64:30:192&#60;br /&#62;
    disp(num2str(disc_y_pos));&#60;br /&#62;
    for disc_x_pos = 64:30:192&#60;br /&#62;
        disc_temp = disc_magnitude*makeDisc(Nx, Ny, disc_x_pos, disc_y_pos, disc_radius);&#60;br /&#62;
        disc_sum_x = disc_temp+ disc_sum_x;&#60;br /&#62;
    end&#60;br /&#62;
    disc_sum_y = disc_sum_x + disc_sum_y;&#60;br /&#62;
end&#60;br /&#62;
disc_sum  = disc_sum_y;&#60;br /&#62;
disc_sum_index = find(disc_sum &#38;gt;= 1);&#60;br /&#62;
disc_sum(disc_sum_index) = 10;&#60;br /&#62;
figure, imagesc(disc_sum); colormap(gray);&#60;br /&#62;
source.p0 = disc_sum;&#60;/p&#62;
&#60;p&#62;% smooth the initial pressure distribution and restore the magnitude&#60;br /&#62;
% source.p0  = smooth(kgrid, source.p0, true);&#60;br /&#62;
p0 = source.p0;&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% RUN THE SIMULATION&#60;br /&#62;
% =========================================================================&#60;br /&#62;
PML_size = 30;&#60;br /&#62;
input_args = {'PMLInside', true, 'PMLSize', PML_size,'Smooth', false, 'PlotPML',false, 'PlotSim', true};&#60;/p&#62;
&#60;p&#62;% run the simulation&#60;br /&#62;
tic&#60;br /&#62;
sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor, input_args{:});&#60;br /&#62;
toc&#60;/p&#62;
&#60;p&#62;%%%%%%%%%%%%%%%%%%%%% Time reversal reconstruction %%%%%%%%%%%%%%%%%%%%%%%%&#60;br /&#62;
% reset the initial pressure&#60;br /&#62;
source.p0 = 0;&#60;/p&#62;
&#60;p&#62;% assign the time reversal data&#60;br /&#62;
sensor.time_reversal_boundary_data = sensor_data;&#60;br /&#62;
input_args = {'PMLInside', true, 'PMLSize', PML_size,'Smooth', false, 'PlotPML',false, 'PlotSim', true};&#60;/p&#62;
&#60;p&#62;% run the time reversal reconstruction&#60;br /&#62;
p0_recon = kspaceFirstOrder2D(kgrid, medium, source, sensor, input_args{:});&#60;/p&#62;
&#60;p&#62;% add first order compensation for only recording over a half plane&#60;br /&#62;
p0_recon = p0_recon*2;&#60;br /&#62;
% plot the initial pressure and sensor distribution&#60;br /&#62;
obj1 = p0;&#60;br /&#62;
obj1 = interp2(obj1,2);&#60;br /&#62;
% figure(1);imshow(obj1,[]);&#60;br /&#62;
figure; imagesc(kgrid.y_vec*1e3, kgrid.x_vec*1e3, obj1);&#60;br /&#62;
colormap(hot); colorbar;&#60;br /&#62;
ylabel('x-position [mm]');&#60;br /&#62;
xlabel('y-position [mm]');&#60;br /&#62;
axis image;&#60;/p&#62;
&#60;p&#62;% plot the reconstructed initial pressure&#60;br /&#62;
img1 = double(p0_recon);&#60;br /&#62;
img1 = interp2(img1,2);&#60;br /&#62;
% figure(2);imshow(img1,[]);&#60;br /&#62;
figure; imagesc(kgrid.y_vec*1e3, kgrid.x_vec*1e3, img1);&#60;br /&#62;
colormap(hot); colorbar;&#60;br /&#62;
ylabel('x-position [mm]');&#60;br /&#62;
xlabel('y-position [mm]');&#60;br /&#62;
axis image;&#60;/p&#62;
&#60;p&#62;img1_env = abs(hilbert(img1));&#60;br /&#62;
figure; imagesc(kgrid.y_vec*1e3, kgrid.x_vec*1e3, img1_env);&#60;br /&#62;
colormap(hot); colorbar;&#60;br /&#62;
ylabel('x-position [mm]');&#60;br /&#62;
xlabel('y-position [mm]');&#60;br /&#62;
axis image;&#60;/p&#62;
&#60;p&#62;img1_log = 20*log10(img1_env);&#60;br /&#62;
img1_log = img1_log - max(img1_log(:));&#60;br /&#62;
figure; imagesc(kgrid.y_vec*1e3, kgrid.x_vec*1e3, img1_log, [-25,0]);&#60;br /&#62;
colormap(hot); colorbar;&#60;br /&#62;
ylabel('x-position [mm]');&#60;br /&#62;
xlabel('y-position [mm]');&#60;br /&#62;
axis image;
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
