<?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: concave and linear probe</title>
		<link>http://www.k-wave.org/forum/topic/concave-and-linear-probe</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 01:09:38 +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/concave-and-linear-probe" rel="self" type="application/rss+xml" />

		<item>
			<title>Gwansuk on "concave and linear probe"</title>
			<link>http://www.k-wave.org/forum/topic/concave-and-linear-probe#post-6969</link>
			<pubDate>Wed, 10 Jul 2019 22:29:31 +0000</pubDate>
			<dc:creator>Gwansuk</dc:creator>
			<guid isPermaLink="false">6969@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Thank you, Brad.&#60;br /&#62;
It Works~!&#60;/p&#62;
&#60;p&#62;Best&#60;br /&#62;
Gwansuk
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "concave and linear probe"</title>
			<link>http://www.k-wave.org/forum/topic/concave-and-linear-probe#post-6966</link>
			<pubDate>Wed, 10 Jul 2019 16:09:04 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">6966@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Gwansuk ,&#60;/p&#62;
&#60;p&#62;The values for &#60;code&#62;transducer.focus_distance&#60;/code&#62; and &#60;code&#62;transducer.elevation_focus_distance&#60;/code&#62; can't can't be set to zero. If you change them to, e.g., 1e-3, your simulation runs. If you want the transmit to be unfocused, set them to &#60;code&#62;inf&#60;/code&#62;.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Gwansuk on "concave and linear probe"</title>
			<link>http://www.k-wave.org/forum/topic/concave-and-linear-probe#post-6933</link>
			<pubDate>Wed, 26 Jun 2019 18:26:08 +0000</pubDate>
			<dc:creator>Gwansuk</dc:creator>
			<guid isPermaLink="false">6933@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Brad,&#60;/p&#62;
&#60;p&#62;is it ok, just post a script here?&#60;br /&#62;
----------------------------------------------------------------------------&#60;br /&#62;
clear all; close all;&#60;br /&#62;
clearvars;&#60;/p&#62;
&#60;p&#62;% simulation settings&#60;br /&#62;
DATA_CAST = 'single';&#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 = 10;            % [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 = 160 * 2 - 2*PML_X_SIZE;    % [grid points]&#60;br /&#62;
Ny = 190 * 2 - 2*PML_Y_SIZE;    % [grid points]&#60;br /&#62;
Nz = 190 * 2 - 2*PML_Z_SIZE;     % [grid points]&#60;/p&#62;
&#60;p&#62;% calculate the spacing between the grid points&#60;br /&#62;
dx = 0.2e-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;
c0 = 1540;                      % [m/s]&#60;br /&#62;
rho0 = 1000;                    % [kg/m^3]&#60;br /&#62;
medium.alpha_coeff = 0.75;      % [dB/(MHz^y cm)]&#60;br /&#62;
medium.alpha_power = 1.5;&#60;br /&#62;
medium.BonA = 6;&#60;/p&#62;
&#60;p&#62;% create the time array&#60;br /&#62;
t_end = 40e-6;&#60;br /&#62;
kgrid.makeTime(c0, [], t_end);&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% DEFINE THE SOURCE&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% create a concave sensor&#60;br /&#62;
sphere_offset = 0;                             % [grid points]&#60;br /&#62;
diameter = round(64e-3 / dx) +1 ;               % [grid points]&#60;br /&#62;
radius = round(45e-3 / dx);                                  % [grid points]&#60;br /&#62;
bowl_pos = [1 + sphere_offset, Ny/2, Nz/2];     % [grid points]&#60;br /&#62;
focus_pos = [Nx/2, Ny/2, Nz/2];                 % [grid points]&#60;/p&#62;
&#60;p&#62;source.p_mask = makeBowl([Nx, Ny, Nz], bowl_pos, radius, diameter, focus_pos) ...&#60;br /&#62;
    - makeBowl([Nx, Ny, Nz], bowl_pos, radius, diameter/2, focus_pos);&#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 = 1e6;        % [Hz]&#60;br /&#62;
tone_burst_cycles = 5;&#60;/p&#62;
&#60;p&#62;% create the input signal using toneBurst&#60;br /&#62;
source.p = source_strength .* toneBurst(1/kgrid.dt, tone_burst_freq, tone_burst_cycles);&#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 = 128;    % total number of transducer elements&#60;br /&#62;
transducer.element_width = round(0.2e-3 / dx);       % width of each element [grid points/voxels]&#60;br /&#62;
transducer.element_length = round(3.5e-3 / dx);     % length of each element [grid points/voxels]&#60;br /&#62;
transducer.element_spacing = 0;     % spacing (kerf  width) between the elements [grid points/voxels]&#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([80, 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 = 0e-3;              % focus distance [m]&#60;br /&#62;
transducer.elevation_focus_distance = 0e-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;% 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(double(transducer.mask)+double(source.p_mask));&#60;br /&#62;
% view(127, 18);&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% DEFINE THE MEDIUM PROPERTIES&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% define a random distribution of scatterers for the medium&#60;br /&#62;
background_map_mean = 1;&#60;br /&#62;
background_map_std = 0.008;&#60;br /&#62;
background_map = background_map_mean + background_map_std * randn([Nx, Ny, Nz]);&#60;/p&#62;
&#60;p&#62;% define a random distribution of scatterers for the highly scattering&#60;br /&#62;
% region&#60;br /&#62;
scattering_map = randn([Nx, Ny, Nz]);&#60;br /&#62;
scattering_c0 = c0 + 25 + 75 * scattering_map;&#60;br /&#62;
scattering_c0(scattering_c0 &#38;gt; 1600) = 1600;&#60;br /&#62;
scattering_c0(scattering_c0 &#38;lt; 1400) = 1400;&#60;br /&#62;
scattering_rho0 = scattering_c0 / 1.5;&#60;/p&#62;
&#60;p&#62;% define properties&#60;br /&#62;
sound_speed_map = c0 * ones(Nx, Ny, Nz) .* background_map;&#60;br /&#62;
density_map = rho0 * ones(Nx, Ny, Nz) .* background_map;&#60;/p&#62;
&#60;p&#62;% define a sphere for a highly scattering region&#60;br /&#62;
radius = 8e-3;&#60;br /&#62;
x_pos = 32e-3;&#60;br /&#62;
y_pos = dy * Ny/2;&#60;br /&#62;
scattering_region1 = makeBall(Nx, Ny, Nz, round(x_pos / dx), round(y_pos / dx), Nz/2, round(radius / dx));&#60;/p&#62;
&#60;p&#62;% assign region&#60;br /&#62;
sound_speed_map(scattering_region1 == 1) = scattering_c0(scattering_region1 == 1);&#60;br /&#62;
density_map(scattering_region1 == 1) = scattering_rho0(scattering_region1 == 1);&#60;/p&#62;
&#60;p&#62;% assign to the medium inputs&#60;br /&#62;
medium.sound_speed = sound_speed_map;&#60;br /&#62;
medium.density = density_map;&#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.active_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, 'PlotScale', [-1/4, 1/4] * source_strength};&#60;/p&#62;
&#60;p&#62;% run the simulation&#60;br /&#62;
sensor_data = kspaceFirstOrder3D(kgrid, medium, source, transducer, input_args{:});&#60;/p&#62;
&#60;p&#62;% extract a single scan line from the sensor data using the current&#60;br /&#62;
% beamforming settings&#60;br /&#62;
scan_line = transducer.scan_line(sensor_data);&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% VISUALISATION&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% plot the recorded time series&#60;br /&#62;
figure;&#60;br /&#62;
stackedPlot(kgrid.t_array * 1e6, sensor_data);&#60;br /&#62;
xlabel('Time [\mus]');&#60;br /&#62;
ylabel('Transducer Element');&#60;br /&#62;
title('Recorded Pressure');&#60;br /&#62;
scaleFig(1, 1.5);&#60;/p&#62;
&#60;p&#62;------------------------------------------------------------------------------&#60;/p&#62;
&#60;p&#62;Thanks&#60;br /&#62;
Gwansuk
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "concave and linear probe"</title>
			<link>http://www.k-wave.org/forum/topic/concave-and-linear-probe#post-6930</link>
			<pubDate>Wed, 26 Jun 2019 10:44:22 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">6930@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Gwansuk,&#60;/p&#62;
&#60;p&#62;It's difficult to say without seeing the rest of the code. Is it possible that you could post a script that reproduces the error?&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Gwansuk on "concave and linear probe"</title>
			<link>http://www.k-wave.org/forum/topic/concave-and-linear-probe#post-6927</link>
			<pubDate>Wed, 26 Jun 2019 01:21:21 +0000</pubDate>
			<dc:creator>Gwansuk</dc:creator>
			<guid isPermaLink="false">6927@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi all&#60;/p&#62;
&#60;p&#62;I am trying to simulate a concave transducer and linear probe.&#60;br /&#62;
the concave transducer acts as a HIFU transducer and linear probe is used as a receiver.&#60;br /&#62;
However, the following error occurred during execution.&#60;/p&#62;
&#60;p&#62;-----------------------------------------------------------------------&#60;br /&#62;
Matrix dimensions must agree.&#60;br /&#62;
Error in kspaceFirstOrder3D (line 978)&#60;br /&#62;
                    current_vals = sum(transducer_receive_mask .*&#60;br /&#62;
                    sensor_data_buffer, 2);&#60;br /&#62;
-----------------------------------------------------------------------&#60;/p&#62;
&#60;p&#62;I don't think 'transducer_receive_mask' and 'sensor_data_buffer' are not user-defined arrays.&#60;br /&#62;
I was wondering if you have any information regarding this error.&#60;/p&#62;
&#60;p&#62;Best,&#60;br /&#62;
Gwansuk Kang
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
