<?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: splitted beam pattern of transducer</title>
		<link>http://www.k-wave.org/forum/topic/splitted-beam-pattern-of-transducer</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 01:11:23 +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/splitted-beam-pattern-of-transducer" rel="self" type="application/rss+xml" />

		<item>
			<title>Gwansuk on "splitted beam pattern of transducer"</title>
			<link>http://www.k-wave.org/forum/topic/splitted-beam-pattern-of-transducer#post-8606</link>
			<pubDate>Tue, 06 Sep 2022 21:48:16 +0000</pubDate>
			<dc:creator>Gwansuk</dc:creator>
			<guid isPermaLink="false">8606@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;&#60;img src=&#34;https://imagizer.imageshack.com/img922/8650/Ppkiwj.jpg&#34; /&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Gwansuk on "splitted beam pattern of transducer"</title>
			<link>http://www.k-wave.org/forum/topic/splitted-beam-pattern-of-transducer#post-8605</link>
			<pubDate>Tue, 06 Sep 2022 03:44:08 +0000</pubDate>
			<dc:creator>Gwansuk</dc:creator>
			<guid isPermaLink="false">8605@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi &#60;/p&#62;
&#60;p&#62;I was wondering how to upload image file in this board.&#60;/p&#62;
&#60;p&#62;Thanks&#60;br /&#62;
Gwansuk
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Gwansuk on "splitted beam pattern of transducer"</title>
			<link>http://www.k-wave.org/forum/topic/splitted-beam-pattern-of-transducer#post-8604</link>
			<pubDate>Mon, 05 Sep 2022 23:37:44 +0000</pubDate>
			<dc:creator>Gwansuk</dc:creator>
			<guid isPermaLink="false">8604@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;clearvars;&#60;/p&#62;
&#60;p&#62;% simulation settings&#60;br /&#62;
DATA_CAST = 'gpuArray-single';       % set to 'single' or 'gpuArray-single' to speed up computations&#60;br /&#62;
MASK_PLANE = 'xz';          % set to 'xy' or 'xz' to generate the beam pattern in different planes&#60;br /&#62;
USE_STATISTICS = true;      % set to true to compute the rms or peak beam patterns, set to false to compute the harmonic beam patterns&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% DEFINE THE K-WAVE GRID&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% set the size of the perfectly matched layer (PML)&#60;br /&#62;
PML_X_SIZE = 20;            % [grid points]&#60;br /&#62;
PML_Y_SIZE = 10;            % [grid points]&#60;br /&#62;
PML_Z_SIZE = 10;            % [grid points]&#60;/p&#62;
&#60;p&#62;% set total number of grid points not including the PML&#60;br /&#62;
Nx = 540 - 2*PML_X_SIZE;    % [grid points]&#60;br /&#62;
Ny = 780 - 2*PML_Y_SIZE;     % [grid points]&#60;br /&#62;
Nz = 380 - 2*PML_Z_SIZE;     % [grid points]&#60;/p&#62;
&#60;p&#62;% set desired grid size in the x-direction not including the PML&#60;br /&#62;
x = 40e-3;                  % [m]&#60;/p&#62;
&#60;p&#62;% calculate the spacing between the grid points&#60;br /&#62;
dx = 0.05e-3;                  % [m]&#60;br /&#62;
dy = dx;                    % [m]&#60;br /&#62;
dz = dx;                    % [m]&#60;/p&#62;
&#60;p&#62;% create the k-space grid&#60;br /&#62;
kgrid = kWaveGrid(Nx, dx, Ny, dy, Nz, dz);&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% DEFINE THE MEDIUM PARAMETERS&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% define the properties of the propagation medium&#60;br /&#62;
medium.sound_speed = 1540;      % [m/s]&#60;br /&#62;
medium.density = 1000;          % [kg/m^3]&#60;br /&#62;
medium.alpha_coeff = 0.0;&#60;br /&#62;
medium.alpha_power = 0.0;&#60;/p&#62;
&#60;p&#62;medium.BonA = 6;&#60;/p&#62;
&#60;p&#62;% create the time array&#60;br /&#62;
t_end = 20e-6;                  % [s]&#60;br /&#62;
kgrid.makeTime(medium.sound_speed, [], t_end);&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% DEFINE THE INPUT SIGNAL&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% define properties of the input signal&#60;br /&#62;
source_strength = 1e6;          % [Pa]&#60;br /&#62;
tone_burst_freq = 7e6;    	% [Hz]&#60;br /&#62;
tone_burst_cycles = 5;&#60;/p&#62;
&#60;p&#62;% create the input signal using toneBurst&#60;br /&#62;
input_signal = toneBurst(1/kgrid.dt, tone_burst_freq, tone_burst_cycles);&#60;/p&#62;
&#60;p&#62;% scale the source magnitude by the source_strength divided by the&#60;br /&#62;
% impedance (the source is assigned to the particle velocity)&#60;br /&#62;
input_signal = (source_strength ./ (medium.sound_speed * medium.density)) .* input_signal;&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% DEFINE THE ULTRASOUND TRANSDUCER&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% physical properties of the transducer&#60;br /&#62;
transducer.number_elements = 1;    % total number of transducer elements&#60;br /&#62;
transducer.element_width = round(35e-3/dx);       % width of each element [grid points]&#60;br /&#62;
transducer.element_length = round(15e-3/dx);     % length of each element [grid points]&#60;br /&#62;
transducer.element_spacing = 0;     % spacing (kerf  width) between the elements [grid points]&#60;br /&#62;
transducer.radius = inf;            % radius of curvature of the transducer [m]&#60;/p&#62;
&#60;p&#62;% calculate the width of the transducer in grid points&#60;br /&#62;
transducer_width = transducer.number_elements * transducer.element_width ...&#60;br /&#62;
    + (transducer.number_elements - 1) * transducer.element_spacing;&#60;/p&#62;
&#60;p&#62;% use this to position the transducer in the middle of the computational grid&#60;br /&#62;
transducer.position = round([1, Ny/2 - transducer_width/2, Nz/2 - transducer.element_length/2]);&#60;/p&#62;
&#60;p&#62;% properties used to derive the beamforming delays&#60;br /&#62;
transducer.sound_speed = 1540;                  % sound speed [m/s]&#60;br /&#62;
transducer.focus_distance = inf;              % focus distance [m]&#60;br /&#62;
transducer.elevation_focus_distance = 16.5e-3;    % focus distance in the elevation plane [m]&#60;br /&#62;
transducer.steering_angle = 0;                  % steering angle [degrees]&#60;/p&#62;
&#60;p&#62;% apodization&#60;br /&#62;
transducer.transmit_apodization = 'Rectangular';&#60;br /&#62;
transducer.receive_apodization = 'Rectangular';&#60;/p&#62;
&#60;p&#62;% define the transducer elements that are currently active&#60;br /&#62;
transducer.active_elements = ones(transducer.number_elements, 1);&#60;/p&#62;
&#60;p&#62;% append input signal used to drive the transducer&#60;br /&#62;
transducer.input_signal = input_signal;&#60;/p&#62;
&#60;p&#62;% create the transducer using the defined settings&#60;br /&#62;
transducer = kWaveTransducer(kgrid, transducer);&#60;/p&#62;
&#60;p&#62;% print out transducer properties&#60;br /&#62;
transducer.properties;&#60;/p&#62;
&#60;p&#62;%voxelPlot(single(transducer.mask));&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% DEFINE SENSOR MASK&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% define a sensor mask through the central plane&#60;br /&#62;
sensor.mask = zeros(Nx, Ny, Nz);&#60;br /&#62;
switch MASK_PLANE&#60;br /&#62;
    case 'xy'&#60;/p&#62;
&#60;p&#62;        % define mask&#60;br /&#62;
        sensor.mask(:, :, Nz/2) = 1;&#60;/p&#62;
&#60;p&#62;        % store y axis properties&#60;br /&#62;
        Nj = Ny;&#60;br /&#62;
        j_vec = kgrid.y_vec;&#60;br /&#62;
        j_label = 'y';&#60;/p&#62;
&#60;p&#62;    case 'xz'&#60;/p&#62;
&#60;p&#62;        % define mask&#60;br /&#62;
        sensor.mask(:, Ny/2, :) = 1;&#60;/p&#62;
&#60;p&#62;        % store z axis properties&#60;br /&#62;
        Nj = Nz;&#60;br /&#62;
        j_vec = kgrid.z_vec;&#60;br /&#62;
        j_label = 'z';&#60;/p&#62;
&#60;p&#62;    case 'xy-xz'&#60;br /&#62;
        sensor.mask(:, :, Nz/2) = 1;&#60;br /&#62;
        sensor.mask(:, Ny/2, :) = 1;&#60;/p&#62;
&#60;p&#62;end &#60;/p&#62;
&#60;p&#62;% set the record mode such that only the rms and peak values are stored&#60;br /&#62;
if USE_STATISTICS&#60;br /&#62;
    sensor.record = {'p_rms', 'p_max'};&#60;br /&#62;
end&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% RUN THE SIMULATION&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% set the input settings&#60;br /&#62;
input_args = {'DisplayMask', transducer.all_elements_mask, ...&#60;br /&#62;
    'PMLInside', false, 'PlotPML', false, 'PMLSize', [PML_X_SIZE, PML_Y_SIZE, PML_Z_SIZE], ...&#60;br /&#62;
    'DataCast', DATA_CAST, 'DataRecast', true, 'PlotScale', [-1/2, 1/2] * source_strength};&#60;/p&#62;
&#60;p&#62;% stream the data to disk in blocks of 100 if storing the complete time&#60;br /&#62;
% history&#60;br /&#62;
if ~USE_STATISTICS&#60;br /&#62;
    input_args = [input_args {'StreamToDisk', 100}];&#60;br /&#62;
end&#60;/p&#62;
&#60;p&#62;% run the simulation&#60;br /&#62;
sensor_data = kspaceFirstOrder3D(kgrid, medium, transducer, sensor, input_args{:});&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% COMPUTE THE BEAM PATTERN USING SIMULATION STATISTICS&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;if USE_STATISTICS&#60;/p&#62;
&#60;p&#62;    % reshape the returned rms and max fields to their original position&#60;br /&#62;
    sensor_data.p_rms = reshape(sensor_data.p_rms, [Nx, Nj]);&#60;br /&#62;
    sensor_data.p_max = reshape(sensor_data.p_max, [Nx, Nj]);&#60;/p&#62;
&#60;p&#62;    save(&#34;WS_LF_7MHz_xz&#34;);&#60;/p&#62;
&#60;p&#62;    % plot the beam pattern using the pressure maximum&#60;br /&#62;
    figure;&#60;br /&#62;
    imagesc(j_vec * 1e3, (kgrid.x_vec - min(kgrid.x_vec(:))) * 1e3, sensor_data.p_max * 1e-6);&#60;br /&#62;
    xlabel([j_label '-position [mm]']);&#60;br /&#62;
    ylabel('x-position [mm]');&#60;br /&#62;
    title('Total Beam Pattern Using Maximum Of Recorded Pressure');&#60;br /&#62;
    colormap(jet(256));&#60;br /&#62;
    c = colorbar;&#60;br /&#62;
    ylabel(c, 'Pressure [MPa]');&#60;br /&#62;
    axis image;&#60;/p&#62;
&#60;p&#62;    % plot the beam pattern using the pressure rms&#60;br /&#62;
    figure;&#60;br /&#62;
    imagesc(j_vec * 1e3, (kgrid.x_vec - min(kgrid.x_vec(:))) * 1e3, sensor_data.p_rms * 1e-6);&#60;br /&#62;
    xlabel([j_label '-position [mm]']);&#60;br /&#62;
    ylabel('x-position [mm]');&#60;br /&#62;
    title('Total Beam Pattern Using RMS Of Recorded Pressure');&#60;br /&#62;
    colormap(jet(256));&#60;br /&#62;
    c = colorbar;&#60;br /&#62;
    ylabel(c, 'Pressure [MPa]');&#60;br /&#62;
    axis image;&#60;/p&#62;
&#60;p&#62;    % end the example&#60;br /&#62;
    return&#60;/p&#62;
&#60;p&#62;end
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Gwansuk on "splitted beam pattern of transducer"</title>
			<link>http://www.k-wave.org/forum/topic/splitted-beam-pattern-of-transducer#post-8603</link>
			<pubDate>Mon, 05 Sep 2022 23:36:59 +0000</pubDate>
			<dc:creator>Gwansuk</dc:creator>
			<guid isPermaLink="false">8603@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I am trying to get a beam pattern of transducer.&#60;br /&#62;
I used kTransducer class&#60;br /&#62;
The transducer has a single element of a cylindrical ceramic and acting as a source.&#60;br /&#62;
However, the beam was divided into two parts as if transducer has two separate elements.&#60;/p&#62;
&#60;p&#62;I was wondering somebody can check this issue.&#60;br /&#62;
Please find the code below.&#60;/p&#62;
&#60;p&#62;Best,&#60;br /&#62;
Gwansuk
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
