<?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: Image Reconstruction using multiple pulses</title>
		<link>http://www.k-wave.org/forum/topic/image-reconstruction-using-multiple-pulses</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 05:18:54 +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/image-reconstruction-using-multiple-pulses" rel="self" type="application/rss+xml" />

		<item>
			<title>Bradley Treeby on "Image Reconstruction using multiple pulses"</title>
			<link>http://www.k-wave.org/forum/topic/image-reconstruction-using-multiple-pulses#post-4608</link>
			<pubDate>Tue, 01 Jul 2014 17:42:19 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">4608@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;There is lots of information on how to define the sensor in the &#60;a href=&#34;http://www.k-wave.org/documentation.php&#34;&#62;k-Wave User Manual&#60;/a&#62; that should help you get started. If you get stuck on specific issues, let us know.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jtimo on "Image Reconstruction using multiple pulses"</title>
			<link>http://www.k-wave.org/forum/topic/image-reconstruction-using-multiple-pulses#post-4606</link>
			<pubDate>Tue, 01 Jul 2014 04:41:54 +0000</pubDate>
			<dc:creator>jtimo</dc:creator>
			<guid isPermaLink="false">4606@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;This was amazing! Thank you so much, everything is running smooth now!&#60;/p&#62;
&#60;p&#62;I just have one more quick question if you don't mind. &#60;/p&#62;
&#60;p&#62;Is it possible to set a sensor array of transducers?&#60;/p&#62;
&#60;p&#62;I want to model a specific model (512 transducers in a hemisphere with certain transducer propterties)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Image Reconstruction using multiple pulses"</title>
			<link>http://www.k-wave.org/forum/topic/image-reconstruction-using-multiple-pulses#post-4602</link>
			<pubDate>Fri, 27 Jun 2014 10:01:58 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">4602@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi jtimo,&#60;/p&#62;
&#60;p&#62;Here's one example of how you might create the forward data for multiple laser pulses. An important thing to note is that for a given initial pressure distribution, assigning this to &#60;code&#62;source.p0&#60;/code&#62; is the same as assigning this to two successive time points in &#60;code&#62;source.p&#60;/code&#62; after scaling by &#60;code&#62;1/(4*CFL)&#60;/code&#62;. This is used in this example to create an initial pressure distribution using &#60;code&#62;source.p&#60;/code&#62; instead of &#60;code&#62;source.p0&#60;/code&#62;. Using the forward data, you can then investigate how this might affect the reconstruction.&#60;/p&#62;
&#60;p&#62;Good luck with your simulations,&#60;/p&#62;
&#60;p&#62;Brad.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;% Example of using k-Wave to generate photoacoustic forward data using
% multiple laser pulses.
%
% author: Bradley Treeby
% date: 27th June 2014

clear all;

% create the computational grid
Nx = 128;           % number of grid points in the x (row) direction
Ny = 128;           % number of grid points in the y (column) direction
dx = 0.1e-3;        % grid point spacing in the x direction [m]
dy = 0.1e-3;        % grid point spacing in the y direction [m]
kgrid = makeGrid(Nx, dx, Ny, dy);

% define the properties of the propagation medium
medium.sound_speed = 1500;  % [m/s]
medium.alpha_coeff = 0.75;  % [dB/(MHz^y cm)]
medium.alpha_power = 1.5; 

% create time array
t_end = 20e-6;
CFL = 0.3;
kgrid.t_array = makeTime(kgrid, medium.sound_speed, CFL, t_end);

% create initial pressure distribution
disc_magnitude = 5; % [Pa]
disc_x_pos = 50;    % [grid points]
disc_y_pos = 50;    % [grid points]
disc_radius = 8;    % [grid points]
p0 = disc_magnitude*makeDisc(Nx, Ny, disc_x_pos, disc_y_pos, disc_radius);

% smooth the initial pressure distribution
p0 = smooth(kgrid, p0, true);

% reorder p0 to be a 1D vector following MATLAB&#38;#39;s linear matrix indexing
p0 = reshape(p0, Nx*Ny, 1);

% create mask for time varying pressure source
source.p_mask = ones(Nx, Ny);

% define pulsed source settings
pulse_sep  = 3e-6;  % [s]
num_pulses = 3;

% convert to units of time points
pulse_sep_tp  = round(pulse_sep/kgrid.dt); % [time points]

% create empty time varying pressure source
source.p = zeros(Nx*Ny, pulse_sep_tp*3 + 1);

% assign initial pressure as pulses
for j = 1:num_pulses
    source.p(:, 1 + (j-1)*pulse_sep_tp) = p0 / (4*CFL);
    source.p(:, 2 + (j-1)*pulse_sep_tp) = p0 / (4*CFL);
end

% define a centered circular sensor
sensor_radius = 4e-3;   % [m]
num_sensor_points = 50;
sensor.mask = makeCartCircle(sensor_radius, num_sensor_points);

% run the simulation
sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor);

% plot the simulated sensor data
figure;
imagesc(sensor_data, [-1, 1]);
colormap(getColorMap);
ylabel(&#38;#39;Sensor Position&#38;#39;);
xlabel(&#38;#39;Time Step&#38;#39;);
colorbar;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>jtimo on "Image Reconstruction using multiple pulses"</title>
			<link>http://www.k-wave.org/forum/topic/image-reconstruction-using-multiple-pulses#post-4600</link>
			<pubDate>Thu, 26 Jun 2014 16:02:32 +0000</pubDate>
			<dc:creator>jtimo</dc:creator>
			<guid isPermaLink="false">4600@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Sorry, as you can tell I'm new to all of this, so thank you so much for your help!&#60;/p&#62;
&#60;p&#62;What I want to set up is have the source emit several pulses to see its effects on reconstruction since we will have the ability to do so with the equipment we have.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Image Reconstruction using multiple pulses"</title>
			<link>http://www.k-wave.org/forum/topic/image-reconstruction-using-multiple-pulses#post-4599</link>
			<pubDate>Thu, 26 Jun 2014 15:12:27 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">4599@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi jtimo,&#60;/p&#62;
&#60;p&#62;From your code snippet, your source is set to produce a continuous wave (CW) sinusoid at a particular frequency, rather than multiple &#34;pulses&#34;. Is that what you intended? Incidentally, is there any reason you chose to use a velocity source (which produces a dipole field) rather than a pressure source? &#60;/p&#62;
&#60;p&#62;In the case of a CW source, it's not possible to directly use time reversal reconstruction as in the k-Wave examples, as there is no longer a single t_0 that corresponds to the arrival of the optical pulse. &#60;/p&#62;
&#60;p&#62;Perhaps you can you say a bit more about the experimental setup that you are trying to replicate?&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jtimo on "Image Reconstruction using multiple pulses"</title>
			<link>http://www.k-wave.org/forum/topic/image-reconstruction-using-multiple-pulses#post-4590</link>
			<pubDate>Mon, 23 Jun 2014 18:35:52 +0000</pubDate>
			<dc:creator>jtimo</dc:creator>
			<guid isPermaLink="false">4590@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Brad,&#60;/p&#62;
&#60;p&#62;Sorry I should have elaborated more. &#60;/p&#62;
&#60;p&#62;I had made 2 discs using the makeDisc functions and set them to ux. Then based off of the code in the example for the time varying source problems (the homogeneous medium monopole specifically) I tried to set the discs to have multiple pulses, but it made a very odd occurrence as you can see. &#60;/p&#62;
&#60;p&#62;the for the time reversal I had to use only 'p' from the sensor.record because an error occurred when attempting to use the sensor structure saying it only accepted doubles.&#60;br /&#62;
The 'p_final' is probably why it's not working (maybe among other things), but I was just wondering if there was some other way to do it.&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Image Reconstruction using multiple pulses"</title>
			<link>http://www.k-wave.org/forum/topic/image-reconstruction-using-multiple-pulses#post-4589</link>
			<pubDate>Mon, 23 Jun 2014 15:25:50 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">4589@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi jtimo,&#60;/p&#62;
&#60;p&#62;I'm not sure I follow what you are trying to do. Are you trying to reconstruct a photoacoustic image given a continuous wave (CW) source, rather than an impulsive source? What is it that is being pulsed?&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jtimo on "Image Reconstruction using multiple pulses"</title>
			<link>http://www.k-wave.org/forum/topic/image-reconstruction-using-multiple-pulses#post-4575</link>
			<pubDate>Sun, 15 Jun 2014 12:41:50 +0000</pubDate>
			<dc:creator>jtimo</dc:creator>
			<guid isPermaLink="false">4575@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;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. &#60;/p&#62;
&#60;p&#62;&#60;img src=&#34;http://i.imgur.com/N2Ktoqq.jpg&#34; /&#62;&#60;/p&#62;
&#60;p&#62;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. &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;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 = {&#38;#39;p&#38;#39;, &#38;#39;p_final&#38;#39;};&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;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.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
