<?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: Modify the steered linear transducer example to get a symmetric focus in middle</title>
		<link>http://www.k-wave.org/forum/topic/modify-the-steered-linear-transducer-example-to-get-a-symmetric-focus-in-middle</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 00:17:11 +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/modify-the-steered-linear-transducer-example-to-get-a-symmetric-focus-in-middle" rel="self" type="application/rss+xml" />

		<item>
			<title>kcox on "Modify the steered linear transducer example to get a symmetric focus in middle"</title>
			<link>http://www.k-wave.org/forum/topic/modify-the-steered-linear-transducer-example-to-get-a-symmetric-focus-in-middle#post-5952</link>
			<pubDate>Thu, 25 May 2017 17:14:12 +0000</pubDate>
			<dc:creator>kcox</dc:creator>
			<guid isPermaLink="false">5952@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;I figure it out! Thank you!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>kcox on "Modify the steered linear transducer example to get a symmetric focus in middle"</title>
			<link>http://www.k-wave.org/forum/topic/modify-the-steered-linear-transducer-example-to-get-a-symmetric-focus-in-middle#post-5947</link>
			<pubDate>Tue, 23 May 2017 22:51:04 +0000</pubDate>
			<dc:creator>kcox</dc:creator>
			<guid isPermaLink="false">5947@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;'% create the computational grid&#60;br /&#62;
Nx = 128;           % number of grid points in the x (row) direction&#60;br /&#62;
Ny = Nx;            % number of grid points in the y (column) direction&#60;br /&#62;
dx = 50e-3/Nx;    	% 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;/p&#62;
&#60;p&#62;% define the properties of the propagation medium&#60;br /&#62;
medium.sound_speed = 1500;  % [m/s]&#60;br /&#62;
medium.alpha_power = 1.5;   % [dB/(MHz^y cm)]&#60;br /&#62;
medium.alpha_coeff = 0.75;  % [dB/(MHz^y cm)]&#60;br /&#62;
medium.density = 1;&#60;/p&#62;
&#60;p&#62;% create the time array&#60;br /&#62;
[kgrid.t_array, dt] = makeTime(kgrid, medium.sound_speed);&#60;br /&#62;
kgrid.t_array = 0:dt:1000*dt;&#60;/p&#62;
&#60;p&#62;% define source mask for a linear transducer with an odd number of elements&#60;br /&#62;
num_elements = 21;      % [grid points]&#60;br /&#62;
x_offset = 25;          % [grid points]&#60;br /&#62;
source.p_mask = zeros(Nx, Ny);&#60;br /&#62;
start_index = Ny/2 - round(num_elements/2) + 1;&#60;br /&#62;
source.p_mask(x_offset, start_index:start_index + num_elements - 1) = 1;&#60;/p&#62;
&#60;p&#62;% define the properties of the tone burst used to drive the transducer&#60;br /&#62;
sampling_freq = 1/dt;   % [Hz]&#60;br /&#62;
steering_angle = 0;    % [deg]&#60;br /&#62;
element_spacing = dx;   % [m]&#60;br /&#62;
tone_burst_freq = 1e6;  % [Hz]&#60;br /&#62;
tone_burst_cycles = 20;&#60;/p&#62;
&#60;p&#62;% create an element index relative to the centre element of the transducer&#60;br /&#62;
element_index = -(num_elements - 1)/2:(num_elements - 1)/2;&#60;/p&#62;
&#60;p&#62;% use geometric beam forming to calculate the tone burst offsets for each&#60;br /&#62;
% transducer element based on the element index&#60;br /&#62;
tone_burst_offset = 40 + element_spacing*element_index*sin(steering_angle*pi/180)/(medium.sound_speed*dt);&#60;/p&#62;
&#60;p&#62;% create the tone burst signals&#60;br /&#62;
source.p = toneBurstCopy(sampling_freq, tone_burst_freq, tone_burst_cycles, 'SignalOffset', tone_burst_offset);&#60;/p&#62;
&#60;p&#62;% assign the input options&#60;br /&#62;
input_args = {'DisplayMask', source.p_mask};&#60;/p&#62;
&#60;p&#62;% run the simulation&#60;br /&#62;
kspaceFirstOrder2D(kgrid, medium, source, [], input_args{:});&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% VISUALISATION&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% plot the input time series&#60;br /&#62;
figure;&#60;br /&#62;
num_source_time_points = length(source.p(1,:));&#60;br /&#62;
[t_sc, scale, prefix] = scaleSI(kgrid.t_array(num_source_time_points));&#60;br /&#62;
stackedPlot(kgrid.t_array(1:num_source_time_points)*scale, source.p);&#60;br /&#62;
xlabel(['Time [' prefix 's]']);&#60;br /&#62;
ylabel('Input Signals');'&#60;/p&#62;
&#60;p&#62;I want to simulate a linear transducer being focused towards the center, i.e. inner elements being delayed from the outer elements, resulting in a symmetric input signal plot. I am confused with the syntax of the tone_burst_offset variable. What exactly would be changing to get this desired effect?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
