<?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; Topic: An unexceppted result in TR reconstruction</title>
		<link>http://www.k-wave.org/forum/topic/an-unexceppted-result-in-tr-reconstruction</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 17:26:36 +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/topic/an-unexceppted-result-in-tr-reconstruction" rel="self" type="application/rss+xml" />

		<item>
			<title>Bradley Treeby on "An unexceppted result in TR reconstruction"</title>
			<link>http://www.k-wave.org/forum/topic/an-unexceppted-result-in-tr-reconstruction#post-6499</link>
			<pubDate>Sun, 24 Jun 2018 19:36:41 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">6499@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi lulu8568,&#60;/p&#62;
&#60;p&#62;As you recreate &#60;code&#62;kgrid&#60;/code&#62; for the two simulations with different medium properties, the time steps for the two simulations are different. You are using the data recorded from one simulation as input to the next, so the time steps should be the same. You could do this either by giving the second &#60;code&#62;kgrid&#60;/code&#62; a different name, and then copying the &#60;code&#62;Nt&#60;/code&#62; and &#60;code&#62;dt&#60;/code&#62; using the &#60;code&#62;setTime&#60;/code&#62; method. Alternatively, you could just create the grid once and use it for both simulations.&#60;/p&#62;
&#60;p&#62;Note, your simulation runs for a very long time due to the large prime factors (you should fix this), and the layer of air at the top. I didn't run it to completion, so there might also be other issues.&#60;/p&#62;
&#60;p&#62;Hope that helps,&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>lulu8568 on "An unexceppted result in TR reconstruction"</title>
			<link>http://www.k-wave.org/forum/topic/an-unexceppted-result-in-tr-reconstruction#post-6479</link>
			<pubDate>Mon, 04 Jun 2018 13:41:36 +0000</pubDate>
			<dc:creator>lulu8568</dc:creator>
			<guid isPermaLink="false">6479@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi,&#60;br /&#62;
I am new in k-Wave. And in my TR reconstruction, there are two steps.&#60;br /&#62;
At the first step, I have two sources and a scatter in a waveguide. The sound spped and density of the scatter are both 2000. After running the codes,I got sensor_data from Receivers.&#60;br /&#62;
Codes of the first step are followings:&#60;br /&#62;
'H=120;&#60;br /&#62;
pml_size=16;&#60;br /&#62;
Nz=801-2*pml_size;&#60;br /&#62;
Nx=801-2*pml_size;&#60;br /&#62;
dz=0.25;&#60;br /&#62;
dx=0.25;&#60;br /&#62;
kgrid=kWaveGrid(Nz,dz,Nx,dx);&#60;/p&#62;
&#60;p&#62;%Medium&#60;br /&#62;
medium.sound_speed=343*ones(Nz,Nx);&#60;br /&#62;
for i=8:(H/dz)+8&#60;br /&#62;
    medium.sound_speed(i+1,:)=1520-i/16;&#60;br /&#62;
end&#60;br /&#62;
medium.sound_speed(H/dz+10:end,:)=1800;&#60;br /&#62;
medium.sound_speed(60/dz+1:100/dz+1,120/dx+1:140/dx+1)=2000;      %scatter&#60;br /&#62;
medium.density=ones(Nz,Nx);&#60;br /&#62;
medium.density(9:H/dz+9,:)=1000;&#60;br /&#62;
medium.density(H/dz+10:end,:)=1800;&#60;br /&#62;
medium.density(60/dz+1:100/dz+1,120/dx+1:140/dx+1)=2000;       %scatter&#60;/p&#62;
&#60;p&#62;%Source1&#60;br /&#62;
disc_x_pos_1=80/dx+1;&#60;br /&#62;
disc_z_pos_1=70/dz+1;&#60;br /&#62;
disc_radius_1=4/dx;&#60;br /&#62;
disc_mag_1=9;&#60;br /&#62;
p1=disc_mag_1*makeDisc(Nz,Nx,disc_z_pos_1,disc_x_pos_1,disc_radius_1);&#60;br /&#62;
%Source2&#60;br /&#62;
disc_x_pos_2=100/dx+1;&#60;br /&#62;
disc_z_pos_2=90/dz+1;&#60;br /&#62;
disc_radius_2=2/dx;&#60;br /&#62;
disc_mag_2=3;&#60;br /&#62;
p2=disc_mag_2*makeDisc(Nz,Nx,disc_z_pos_2,disc_x_pos_2,disc_radius_2);&#60;br /&#62;
%Source&#60;br /&#62;
source.p0=p1+p2;&#60;/p&#62;
&#60;p&#62;%Receivers&#60;br /&#62;
mask=zeros(Nz,Nx);&#60;br /&#62;
mask((3:4:123)/dz-3,1)=1;&#60;br /&#62;
[row,col]=find(mask==1);&#60;br /&#62;
sensor.mask=[kgrid.x_vec(row) kgrid.y_vec(col)].';&#60;br /&#62;
input_args={'PMLInside',false,'PMLSize',pml_size,'Smooth',false,'PlotPML',false,'PlotSim',false,'RecordMovie',true};&#60;br /&#62;
kgrid.makeTime(medium.sound_speed);&#60;br /&#62;
sensor_data=kspaceFirstOrder2D(kgrid,medium,source,sensor,input_args{:});'&#60;/p&#62;
&#60;p&#62;Then, at the second step,I want to emit the time reversal of sensor_data from Receivers to the same waveguide but without the sources and the scatters. Although codes run without errors, an unexcepted result occurs--the window of the result becomes black. And I have no idea to deal withit.&#60;br /&#62;
Codes of the second step are followings:&#60;br /&#62;
' H=120;&#60;br /&#62;
pml_size=16;&#60;br /&#62;
Nz=801-2*pml_size;&#60;br /&#62;
Nx=801-2*pml_size;&#60;br /&#62;
dz=0.25;&#60;br /&#62;
dx=0.25;&#60;br /&#62;
kgrid=makeGrid(Nz,dz,Nx,dx);&#60;br /&#62;
%介质&#60;br /&#62;
medium.sound_speed=343*ones(Nz,Nx);&#60;br /&#62;
for i=8:(H/dz)+8&#60;br /&#62;
    medium.sound_speed(i+1,:)=1520-i/16;&#60;br /&#62;
end&#60;br /&#62;
medium.sound_speed(H/dz+10:end,:)=1800;&#60;/p&#62;
&#60;p&#62;medium.density=ones(Nz,Nx);&#60;br /&#62;
medium.density(9:(H/dz+9),:)=1000;&#60;br /&#62;
medium.density((H/dz+10):end,:)=1800;&#60;/p&#62;
&#60;p&#62;mask=zeros(Nz,Nx);&#60;br /&#62;
mask((3:4:123)/dz-3,1)=1;&#60;br /&#62;
[row,col]=find(mask==1);&#60;br /&#62;
sensor.mask=[kgrid.x_vec(row) kgrid.y_vec(col)].';&#60;br /&#62;
sensor.record={'p_final','p'};&#60;br /&#62;
input_args={'PMLInside',false,'PMLSize',pml_size,'Smooth',false,'PlotPML',false,'PlotSim',false,'RecordMovie',true};&#60;br /&#62;
kgrid.makeTime(medium.sound_speed);&#60;/p&#62;
&#60;p&#62;source.p_mask=mask;&#60;br /&#62;
source.p=fliplr(sensor_data);&#60;br /&#62;
source.p_mode='dirichlet';&#60;/p&#62;
&#60;p&#62;test3=kspaceFirstOrder2D(kgrid,medium,source,sensor,input_args{:});'&#60;/p&#62;
&#60;p&#62;I have no idea about waht's wrong with my model. Could you please give me some advice?Thank you very much.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
