<?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: Simulating bony skull attenuation- why is it amplifying instead?</title>
		<link>http://www.k-wave.org/forum/topic/simulating-bony-skull-attenuation-why-is-it-amplifying-instead</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 23:39:17 +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/simulating-bony-skull-attenuation-why-is-it-amplifying-instead" rel="self" type="application/rss+xml" />

		<item>
			<title>Bradley Treeby on "Simulating bony skull attenuation- why is it amplifying instead?"</title>
			<link>http://www.k-wave.org/forum/topic/simulating-bony-skull-attenuation-why-is-it-amplifying-instead#post-6736</link>
			<pubDate>Tue, 29 Jan 2019 23:24:32 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">6736@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi an803355,&#60;/p&#62;
&#60;p&#62;I can't immediately spot anything wrong in your code. Do you mean the focal pressure is higher when you include attenuation compared to without? Or that the focal pressure is higher when you include the skull compared to without? Or something else?&#60;/p&#62;
&#60;p&#62;Keep in mind the focal pressure will always be much higher than the surface pressure due to the focusing gain of the transducer. &#60;/p&#62;
&#60;p&#62;For single frequency simulations, I would suggest using &#60;code&#62;alpha_coeff = 2&#60;/code&#62;, and then adjust the alpha_coeff values accordingly. One way is to use the new function &#60;a href=&#34;http://www.k-wave.org/downloads/fitPowerLawParamsMulti.m&#34;&#62;&#60;code&#62;fitPowerLawParamsMulti&#60;/code&#62;&#60;/a&#62; (this will be included in a future release of k-Wave). The reason for using &#60;code&#62;alpha_coeff = 2&#60;/code&#62; is explained in Sec. 2.2 in &#60;a href=&#34;http://bug.medphys.ucl.ac.uk/papers/2018-Robertson-PMB.pdf&#34;&#62;this paper&#60;/a&#62;.&#60;/p&#62;
&#60;p&#62;If you're still stuck, can you post an example with an artificial skull that has the same problem, or email me the skull image?&#60;/p&#62;
&#60;p&#62;Brad
&#60;/p&#62;</description>
		</item>
		<item>
			<title>an803355 on "Simulating bony skull attenuation- why is it amplifying instead?"</title>
			<link>http://www.k-wave.org/forum/topic/simulating-bony-skull-attenuation-why-is-it-amplifying-instead#post-6716</link>
			<pubDate>Thu, 17 Jan 2019 17:39:01 +0000</pubDate>
			<dc:creator>an803355</dc:creator>
			<guid isPermaLink="false">6716@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Bradley,  here is my code.   The image mask is not included, but essentially it is black and white skull curved strip.   The masks apply well (I've checked the matrix).&#60;/p&#62;
&#60;p&#62;Not sure why the amplitude isn't attenuating at the focus though, and I'm getting really weird behaviour within the skull (seems to be amplifying everything) instead of attenuating&#60;/p&#62;
&#60;p&#62;Thanks for your help&#60;/p&#62;
&#60;p&#62;clearvars;&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% ACOUSTIC SIMULATION&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% define the PML size&#60;br /&#62;
pml_size = 20;              % [grid points]&#60;/p&#62;
&#60;p&#62;% define the grid parameters&#60;br /&#62;
Nx = 256 - 2 * pml_size;    % [grid points]&#60;br /&#62;
Ny = 256 - 2 * pml_size;    % [grid points]&#60;br /&#62;
dx = 0.25e-3;               % [m]&#60;br /&#62;
dy = 0.25e-3;               % [m]&#60;/p&#62;
&#60;p&#62;% create the computational grid&#60;br /&#62;
kgrid = kWaveGrid(Nx, dx, Ny, dy);&#60;/p&#62;
&#60;p&#62;%define the properties of the propagation medium&#60;/p&#62;
&#60;p&#62;   %% ALPHA COEFF&#60;/p&#62;
&#60;p&#62;medium.alpha_coeff = 0.05 * ones(Nx, Ny);    % [dB/(MHz^y cm)]  WATER &#60;/p&#62;
&#60;p&#62;%skull&#60;br /&#62;
pix=loadimagecustom('skull216.png');&#60;br /&#62;
pix = pix .* (8/ max(pix(:)));    %set all black pixels to 8, all white to 0.&#60;br /&#62;
medium.alpha_coeff =medium.alpha_coeff + pix;   %  add 8 to the 0.05 water, making the skull layer&#60;/p&#62;
&#60;p&#62; medium.alpha_power = 1.43;&#60;/p&#62;
&#60;p&#62;   %% SPEED&#60;br /&#62;
medium.sound_speed = 1450 * ones(Nx, Ny);   % WATER default fill! [m/s]&#60;/p&#62;
&#60;p&#62;% %skull&#60;br /&#62;
pix=loadimagecustom('skull216.png');&#60;br /&#62;
pix = pix .* (700/ max(pix(:)));    *add 700 to the water speed&#60;br /&#62;
medium.sound_speed =medium.sound_speed +pix;   % 2500   bone! [kg/m^3]&#60;/p&#62;
&#60;p&#62;%% DENSITY&#60;/p&#62;
&#60;p&#62; medium.density = 1000 * ones(Nx, Ny);       % WATER default fill [kg/m^3]&#60;/p&#62;
&#60;p&#62;%skull&#60;br /&#62;
pix=loadimagecustom('skull216.png');&#60;br /&#62;
pix = pix .* (732 / max(pix(:)));&#60;br /&#62;
medium.density =medium.density +pix;   %   bone! [kg/m^3]&#60;/p&#62;
&#60;p&#62;%% define the source parameters&#60;br /&#62;
diameter = 0.03;           % [m]&#60;br /&#62;
radius   = 0.03;           % [m]&#60;br /&#62;
freq     = 500000;             % [Hz]&#60;br /&#62;
amp      = 0.53e6;           % 0.53[MPa]&#60;/p&#62;
&#60;p&#62;% define a focused ultrasound transducer&#60;br /&#62;
source.p_mask = makeArc([Nx, Ny], [1, Ny/2], round(radius / dx), round(diameter / dx) + 1, [Nx/2, Ny/2]);&#60;/p&#62;
&#60;p&#62;% create a display mask to display the transducer&#60;br /&#62;
display_mask = source.p_mask;&#60;/p&#62;
&#60;p&#62;% calculate the time step using an integer number of points per period&#60;br /&#62;
ppw = 12.08; % points per wavelength&#60;br /&#62;
cfl = 0.3;                              % cfl number&#60;br /&#62;
ppp = 41;                  % points per period&#60;br /&#62;
T   = 1 / freq;                         % period [s]&#60;br /&#62;
dt  = 4.878e-8;                          % time step [s]&#60;/p&#62;
&#60;p&#62;% calculate the number of time steps to reach steady state&#60;br /&#62;
t_end = 5.0575e-5;&#60;br /&#62;
Nt = round(t_end / dt);&#60;/p&#62;
&#60;p&#62;% create the time array&#60;br /&#62;
kgrid.setTime(Nt, dt);&#60;/p&#62;
&#60;p&#62;% define the input signal&#60;br /&#62;
source.p = createCWSignals(kgrid.t_array, freq, amp, 0);&#60;/p&#62;
&#60;p&#62;% set the sensor mask to cover the entire grid&#60;br /&#62;
sensor.mask = ones(Nx, Ny);&#60;br /&#62;
sensor.record = {'p', 'p_max_all'};&#60;/p&#62;
&#60;p&#62;% record the last 3 cycles in steady state&#60;br /&#62;
num_periods = 3;&#60;br /&#62;
T_points = round(num_periods * T / kgrid.dt);&#60;br /&#62;
sensor.record_start_index = Nt - T_points + 1;&#60;/p&#62;
&#60;p&#62;% set the input arguements&#60;br /&#62;
input_args = {'PMLInside', false,'PlotLayout', true, 'PlotPML', false, 'DisplayMask', ...&#60;br /&#62;
    display_mask, 'PlotScale', [-1, 1] * amp};&#60;/p&#62;
&#60;p&#62;% run the acoustic simulation&#60;br /&#62;
sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor, input_args{:});&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% CALCULATE PRESSURE&#60;br /&#62;
%===================&#60;/p&#62;
&#60;p&#62;% extract the pressure amplitude at each position&#60;br /&#62;
p = extractAmpPhase(sensor_data.p, 1/kgrid.dt, freq);&#60;/p&#62;
&#60;p&#62;% reshape the data,&#60;br /&#62;
p = reshape(p, Nx, Ny);&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% VISUALISATION&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% plot the thermal dose and lesion map&#60;br /&#62;
figure;&#60;/p&#62;
&#60;p&#62;% plot the acoustic pressure&#60;br /&#62;
subplot(2, 3, 1);&#60;br /&#62;
imagesc(kgrid.y_vec * 1e3, kgrid.x_vec * 1e3, p * 1e-6);&#60;/p&#62;
&#60;p&#62;h = colorbar;&#60;br /&#62;
xlabel(h, '[MPa]');&#60;br /&#62;
ylabel('x-position [mm]');&#60;br /&#62;
xlabel('y-position [mm]');&#60;br /&#62;
axis image;&#60;br /&#62;
title('Acoustic Pressure Amplitude');&#60;br /&#62;
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0, 0.04, 1, 0.96]);&#60;/p&#62;
&#60;p&#62;% set colormap and enlarge figure window&#60;br /&#62;
colormap(jet(256));&#60;br /&#62;
scaleFig(1.5, 1);
&#60;/p&#62;</description>
		</item>
		<item>
			<title>an803355 on "Simulating bony skull attenuation- why is it amplifying instead?"</title>
			<link>http://www.k-wave.org/forum/topic/simulating-bony-skull-attenuation-why-is-it-amplifying-instead#post-6715</link>
			<pubDate>Thu, 17 Jan 2019 17:31:56 +0000</pubDate>
			<dc:creator>an803355</dc:creator>
			<guid isPermaLink="false">6715@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi @Brad.  Yes that was a typo.  I am setting my coefficient to  about +8.00.  Nevertheless, it is not adequately running.&#60;br /&#62;
Question: Do I need to set a different &#34;alpha power&#34; for my skull mask?  Or does the alpha power stay as, say 1.43, for the entire field?&#60;br /&#62;
I'm a bit confused on this point.  ]&#60;/p&#62;
&#60;p&#62;When I try to run &#34; fitPowerLawParams(8, 1.43, 2850, 400000, 500000, true) &#34;, the function gives me an error &#34;not enough input arguments&#34;. &#60;/p&#62;
&#60;p&#62;A bit confused about the whole alpha power.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Simulating bony skull attenuation- why is it amplifying instead?"</title>
			<link>http://www.k-wave.org/forum/topic/simulating-bony-skull-attenuation-why-is-it-amplifying-instead#post-6712</link>
			<pubDate>Thu, 17 Jan 2019 00:26:45 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">6712@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Are you using a negative absorption coefficient, or is that a typo? If so, that would cause an increase in pressure.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>an803355 on "Simulating bony skull attenuation- why is it amplifying instead?"</title>
			<link>http://www.k-wave.org/forum/topic/simulating-bony-skull-attenuation-why-is-it-amplifying-instead#post-6711</link>
			<pubDate>Wed, 16 Jan 2019 21:30:35 +0000</pubDate>
			<dc:creator>an803355</dc:creator>
			<guid isPermaLink="false">6711@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Dear all,&#60;/p&#62;
&#60;p&#62;I am trying to simulate a focused 0.5 MHz transducer directed at the inside of a skull (initial pressure 0.5 MPa).&#60;/p&#62;
&#60;p&#62;Of course, the skull will attenuate the pressure significantly, but in my code, it seems to make it stronger at the focus!&#60;/p&#62;
&#60;p&#62;I am using parameters from this paper:&#60;br /&#62;
&#60;a href=&#34;http://bug.medphys.ucl.ac.uk/papers/2017-Robertson-PMB.pdf&#34; rel=&#34;nofollow&#34;&#62;http://bug.medphys.ucl.ac.uk/papers/2017-Robertson-PMB.pdf&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Specifically, I am using  a 2D image mask to define a skull bone layer and the following parameters:&#60;/p&#62;
&#60;p&#62;medium.alpha_coeff = 0.75 for  WATER&#60;br /&#62;
medium.alpha_coeff= -8.83   for SKULL (0.8 cm thick)&#60;br /&#62;
 medium.alpha_power = 1.43&#60;/p&#62;
&#60;p&#62;I am using standard values for bone speed 2850 m/s and density was 1732 kg/m 3&#60;/p&#62;
&#60;p&#62;For some reason, my simulation is generating a larger value at the focus (1 MPA), even though the wave had to pass through the skull layer!  &#60;/p&#62;
&#60;p&#62;I am confused about what I am doing wrong.  Any help would be appreciated. The mask appears to be applied properly.&#60;/p&#62;
&#60;p&#62;I suspect my coefficients are off or I used the wrong sensor mask method?&#60;/p&#62;
&#60;p&#62;PS: I used the &#34;Heating By A Focused Ultrasound Transducer&#34; as a template script, removed the heating parts and left the &#34;pressure&#34; simulation there, with the addition of a skull.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
