<?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: Missed scaling factor</title>
		<link>http://www.k-wave.org/forum/topic/missed-scaling-factor</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 00:23:07 +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/missed-scaling-factor" rel="self" type="application/rss+xml" />

		<item>
			<title>Bradley Treeby on "Missed scaling factor"</title>
			<link>http://www.k-wave.org/forum/topic/missed-scaling-factor#post-6898</link>
			<pubDate>Sat, 22 Jun 2019 20:35:54 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">6898@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi ourdream,&#60;/p&#62;
&#60;p&#62;In this case, you will still be measuring the output in pascals, although the detected signal will be affected by the directional response of the sensor. If you had a physical sensor that increased in size, you'd measure a larger signal in volts (other things being equal), but this would come out in the wash when you apply the calibration from volts to pascals.&#60;/p&#62;
&#60;p&#62;Is that what you were asking?&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ourdream on "Missed scaling factor"</title>
			<link>http://www.k-wave.org/forum/topic/missed-scaling-factor#post-6859</link>
			<pubDate>Thu, 23 May 2019 13:50:14 +0000</pubDate>
			<dc:creator>ourdream</dc:creator>
			<guid isPermaLink="false">6859@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Dear Bradley,&#60;/p&#62;
&#60;p&#62;I didn't know you replied to my post.&#60;br /&#62;
Sorry for this late response.&#60;/p&#62;
&#60;p&#62;I think you are right. Your recommendation fixed the different amplitude problem.&#60;br /&#62;
Thanks a lot.&#60;/p&#62;
&#60;p&#62;However, your solution causes another confusion to me.&#60;br /&#62;
What is the physical meaning for the measured PA amplitude when we normalize the sensor?&#60;br /&#62;
Referring your 2005 J. of Acoust. Soc. Am. Paper, it is a little bit difficult for me to match the simulated PA amplitude value with the value from those equations in the reference.&#60;/p&#62;
&#60;p&#62;Regards,
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Missed scaling factor"</title>
			<link>http://www.k-wave.org/forum/topic/missed-scaling-factor#post-6733</link>
			<pubDate>Tue, 29 Jan 2019 22:31:36 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">6733@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi ourdream,&#60;/p&#62;
&#60;p&#62;I haven't run your code. However, when you increase the grid resolution, you also increase the number of grid points in your sensor. If you sum over the sensor, this will then change the total amplitude depending on the grid resolution. I'd recommend normalising by the number of grid points in the sensor. For example, replacing:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;sensor_data1 = sum(sensor_data, 1);&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;with&#60;/p&#62;
&#60;p&#62;&#60;code&#62;sensor_data1 = sum(sensor_data, 1) ./ sum(sensor.mask(:));&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Hope that helps,&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ourdream on "Missed scaling factor"</title>
			<link>http://www.k-wave.org/forum/topic/missed-scaling-factor#post-6718</link>
			<pubDate>Sat, 19 Jan 2019 08:47:42 +0000</pubDate>
			<dc:creator>ourdream</dc:creator>
			<guid isPermaLink="false">6718@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Dear, &#60;/p&#62;
&#60;p&#62;I really appreciate you've distributed this good and useful simulation tool for everyone.&#60;/p&#62;
&#60;p&#62;It seems that K-wave tool misses the scaling factor that must be considered between discrete and continuous Fast Fourier transform in Matlab. &#60;/p&#62;
&#60;p&#62;Please run the following simple K-wave code with n=128 and n=256. (or you could try n=64 and n=128. However, for this setup, the difference of the ball surface structure between n=64 and 128 is intensified, which causes additional difference in results.)&#60;/p&#62;
&#60;p&#62;Since all grid values in this simulation code are set by given physical quantities, different n does not affect simulation result much.&#60;/p&#62;
&#60;p&#62;You can verify that the magnitude of the simulated photoacoustic(PA) signals of n=128 and 256 is quite different each other. The PA magnitude of n=256 is almost 4 times larger than that of n=128. As mentioned above, the PA magnitude must be almost the same. (Although there might be slight difference due to grid size difference, for example, maximum frequency values and so on) &#60;/p&#62;
&#60;p&#62;Since Dt(=kgrid.t_array(2)-kgrid.t_array(1)) of n=256 case is twice times smaller than Dt of n=128, the PA  signal magnitudes are the same if you consider PA*Dt^2. &#60;/p&#62;
&#60;p&#62;Related to this PA signal magnitude discrepancy issue, I wonder how much the absolute values of PA signals simulated by K-wave are reliable. We cannot simply consider PA*Dt^2 that is far different from the real PA signal value. I think some factor containing Dt must be missed on converting your theoretical equations to K-wave code.&#60;/p&#62;
&#60;p&#62;-------------------------code------------------------------------&#60;br /&#62;
WinSize = 30e-3; % [m] physical length of the 3D cube where PA imaging happens&#60;/p&#62;
&#60;p&#62;% Ball&#60;br /&#62;
B_radius = 2e-3; %[m] &#60;/p&#62;
&#60;p&#62;% create the computational grid&#60;br /&#62;
n = 256; % grid number in WinSize&#60;/p&#62;
&#60;p&#62;Nx = n;            % number of grid points in the x direction&#60;br /&#62;
Ny = n;            % number of grid points in the y direction&#60;br /&#62;
Nz = n;            % number of grid points in the z direction&#60;/p&#62;
&#60;p&#62;dx = WinSize/Nx;     % grid point spacing in the x direction [m]&#60;/p&#62;
&#60;p&#62;dy = dx;            % grid point spacing in the y direction [m]&#60;br /&#62;
dz = dx;            % grid point spacing in the z direction [m]&#60;/p&#62;
&#60;p&#62;kgrid = kWaveGrid(Nx, dx, Ny, dy, Nz, dz);&#60;br /&#62;
medium.sound_speed  = 1500; % ultrasound speed in soft tissue[m/s]&#60;br /&#62;
kgrid.makeTime(medium.sound_speed);&#60;/p&#62;
&#60;p&#62;% create a concave sensor&#60;br /&#62;
sphere_offset = 10;                             % [grid points]&#60;br /&#62;
f0  = 0.02; % focal length of the focused ultrasound transducer&#60;br /&#62;
NA = 0.375;&#60;br /&#62;
RadiusofC = ceil(f0/dx);  % [grid points; raduis of curvarture  = focal length]&#60;br /&#62;
diameter = 2*ceil(NA*RadiusofC)+1;                   % [grid points; must be an odd number]&#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; focal axis direction: from bowl_pos to focus_pos]&#60;br /&#62;
sensor.mask = makeBowl([Nx, Ny, Nz], bowl_pos, RadiusofC, diameter, focus_pos);&#60;/p&#62;
&#60;p&#62;% create a ball PA object with exponentially attenuated irradiance&#60;br /&#62;
ball_radius = ceil(B_radius/dx);&#60;br /&#62;
ball_pos_x = 1 + sphere_offset + RadiusofC + ball_radius;&#60;br /&#62;
ball_pos_y = Ny/2;&#60;br /&#62;
ball_pos_z = Nz/2;&#60;/p&#62;
&#60;p&#62;source.p0 = makeBall(Nx, Ny, Nz, ball_pos_x, ball_pos_y, ball_pos_z, ball_radius);                       &#60;/p&#62;
&#60;p&#62;sensor_data = kspaceFirstOrder3DG(kgrid, medium, source, sensor);&#60;br /&#62;
sensor_data1 = sum(sensor_data, 1);&#60;/p&#62;
&#60;p&#62;% figure&#60;br /&#62;
plot(kgrid.t_array, sensor_data1, '-');&#60;br /&#62;
----------------------------------------------------------
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
