<?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: finite sensor size</title>
		<link>http://www.k-wave.org/forum/topic/finite-sensor-size</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 23:07:25 +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/finite-sensor-size" rel="self" type="application/rss+xml" />

		<item>
			<title>Bradley Treeby on "finite sensor size"</title>
			<link>http://www.k-wave.org/forum/topic/finite-sensor-size#post-8190</link>
			<pubDate>Tue, 08 Jun 2021 16:56:29 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">8190@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Zeng,&#60;/p&#62;
&#60;p&#62;If you want the signal amplitude to match the pressure amplitude (at least when the interaction is coherent), I would take the average instead of the sum.&#60;/p&#62;
&#60;p&#62;You could use the new &#60;a href=&#34;http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources&#34;&#62;&#60;code&#62;kWaveArray&#60;/code&#62; class&#60;/a&#62; to define a finite-sized sensor and use the inbuilt methods to do the averaging for you (&#60;code&#62;karray.combineSensorData(kgrid, sensor_data)&#60;/code&#62;).&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>zengqw2021 on "finite sensor size"</title>
			<link>http://www.k-wave.org/forum/topic/finite-sensor-size#post-8170</link>
			<pubDate>Mon, 07 Jun 2021 10:27:11 +0000</pubDate>
			<dc:creator>zengqw2021</dc:creator>
			<guid isPermaLink="false">8170@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Dear all,&#60;br /&#62;
   I want to use a finite size sensor (for example circular sensor of 10 mm diameter) instead of using a point sensor? According to Ben's suggestion:make a sensor mask covering the region you want your (single) sensor, then sum the time series together afterwards. I wonder whether the following code could achieve this goal?&#60;/p&#62;
&#60;p&#62;% run the simulation&#60;br /&#62;
sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor, input_args{:});&#60;/p&#62;
&#60;p&#62;%---model the effect of the finite size of the detector&#60;br /&#62;
%--sum the time series together afterwards&#60;br /&#62;
Num_point = 5 ; % Test points that need to be accumulated for a detector&#60;br /&#62;
interval  = 2 ; % interval between the two detectors&#60;br /&#62;
N_elements = floor(num_sensor_points/(Num_point+interval)); %the total detectors&#60;br /&#62;
New_sensor_data = zeros(N_elements,kgrid.Nt);&#60;br /&#62;
for i=1:N_elements&#60;br /&#62;
    loop_point = (N_elements-1)*(Num_point+interval);&#60;br /&#62;
    New_sensor_data(i,:)=sum(sensor_data((loop_point+1):(loop_point+5),:),1);&#60;br /&#62;
end&#60;/p&#62;
&#60;p&#62;Regards,&#60;br /&#62;
  Zeng
&#60;/p&#62;</description>
		</item>
		<item>
			<title>deblina on "finite sensor size"</title>
			<link>http://www.k-wave.org/forum/topic/finite-sensor-size#post-4338</link>
			<pubDate>Sun, 23 Feb 2014 07:35:49 +0000</pubDate>
			<dc:creator>deblina</dc:creator>
			<guid isPermaLink="false">4338@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hello Ben,&#60;/p&#62;
&#60;p&#62;I understand your point but I am bit confused between sum and average because in one of the K-wave examples given as follows:&#60;/p&#62;
&#60;p&#62;clear all;&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% SETUP THE GRID&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% create the computational grid&#60;br /&#62;
Nx = 180;           % number of grid points in the x (row) direction&#60;br /&#62;
Ny = 180;           % number of grid points in the y (column) direction&#60;br /&#62;
dx = 0.1e-3;        % grid point spacing in the x direction [m]&#60;br /&#62;
dy = 0.1e-3;        % 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;/p&#62;
&#60;p&#62;% define the array of time points [s]&#60;br /&#62;
[kgrid.t_array, dt] = makeTime(kgrid, medium.sound_speed);&#60;br /&#62;
Nt = round(0.75*length(kgrid.t_array));&#60;br /&#62;
kgrid.t_array = (0:Nt-1)*dt;&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% DEFINE A FOCUSSED ARRAY OF DIRECTIONAL ELEMENTS&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% define a semicircular sensor centered on the grid&#60;br /&#62;
semicircle_radius = 65; % [grid points]&#60;br /&#62;
arc = makeCircle(Nx, Ny, Nx/2, Ny/2, semicircle_radius, pi);&#60;/p&#62;
&#60;p&#62;% find total number and indices of the grid points constituting the&#60;br /&#62;
% semicircle&#60;br /&#62;
arc_indices = find(arc == 1);&#60;br /&#62;
Nv = length(arc_indices);&#60;/p&#62;
&#60;p&#62;% calculate angles between grid points in the arc and the centre of the&#60;br /&#62;
% grid&#60;br /&#62;
arc_angles = atan((kgrid.y(arc_indices))./kgrid.x(arc_indices));&#60;/p&#62;
&#60;p&#62;% sort the angles into ascending order, and adjust the indices accordingly&#60;br /&#62;
[sorted_arc_angles,sorted_index] = sort(arc_angles);&#60;br /&#62;
sorted_arc_indices = arc_indices(sorted_index);&#60;/p&#62;
&#60;p&#62;% divide the semicircle into Ne separate sensor elements&#60;br /&#62;
Ne = 19;&#60;br /&#62;
sensor.mask = zeros(Nx,Ny);&#60;br /&#62;
for loop = 1:Ne&#60;/p&#62;
&#60;p&#62;    % the indices of the grid points belonging to one element.&#60;br /&#62;
    % (There is a two grid point gap between the elements.)&#60;br /&#62;
    voxel_indices = sorted_arc_indices(floor((loop-1)*Nv/Ne)+2:floor(loop*Nv/Ne)-1);&#60;/p&#62;
&#60;p&#62;    % add the element to the sensor.mask&#60;br /&#62;
    sensor.mask(voxel_indices) = 1;&#60;/p&#62;
&#60;p&#62;end&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% SIMULATION&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% Define an infinitely wide plane wave source. (This is achieved by turning&#60;br /&#62;
% off the PML.)&#60;br /&#62;
source.p_mask = zeros(Nx,Ny);&#60;br /&#62;
source.p_mask(140,:) = 1;&#60;/p&#62;
&#60;p&#62;% set the display mask for the simulation&#60;br /&#62;
display_mask = source.p_mask + sensor.mask;&#60;/p&#62;
&#60;p&#62;% define a time varying sinusoidal source&#60;br /&#62;
source_freq = 1e6;&#60;br /&#62;
source_mag = 0.5;&#60;br /&#62;
source.p = source_mag*sin(2*pi*source_freq*kgrid.t_array);&#60;br /&#62;
source.p = filterTimeSeries(kgrid, medium, source.p);&#60;/p&#62;
&#60;p&#62;% run the simulation with the PML switched off on the sides, so that the&#60;br /&#62;
% source continues up to the edge of the domain (and from there infinitely,&#60;br /&#62;
% because of the periodic assumption implicit in pseudospectral methods).&#60;br /&#62;
input_args = {'PMLAlpha', [2 0], 'DisplayMask', display_mask, 'PlotScale', [-0.75 0.75]};&#60;br /&#62;
sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor, input_args{:});&#60;/p&#62;
&#60;p&#62;% split up the data, recorded on all the grid points, between the elements&#60;br /&#62;
element_data = zeros(Ne,Nt);&#60;br /&#62;
for loop = 1:Ne&#60;/p&#62;
&#60;p&#62;    % the indices of the sensor grid points in the sensor mask&#60;br /&#62;
    sensor_indices = find(sensor.mask==1);&#60;/p&#62;
&#60;p&#62;    % the indices of the grid points belonging to one element.&#60;br /&#62;
    voxel_indices = sorted_arc_indices(floor((loop-1)*Nv/Ne)+2:floor(loop*Nv/Ne)-1);&#60;/p&#62;
&#60;p&#62;    % indices of sensor_data that refer to the data for this element&#60;br /&#62;
    data_indices = zeros(length(voxel_indices),1);&#60;br /&#62;
    for loop2 = 1:length(voxel_indices)&#60;br /&#62;
        data_indices(loop2) = find(sensor_indices == voxel_indices(loop2));&#60;br /&#62;
    end    &#60;/p&#62;
&#60;p&#62;    % for one element per loop, average the time series from each of the&#60;br /&#62;
    % element's grid points to give one time series for the whole element&#60;br /&#62;
    element_data(loop,:) = mean(sensor_data(data_indices,:),1);&#60;/p&#62;
&#60;p&#62;end&#60;/p&#62;
&#60;p&#62;take the mean of sensor_data (last line of the code) to get the time series of one element(combination of multiple sensor points).&#60;/p&#62;
&#60;p&#62;So I wonder which one will be suitable among sum and average (of sensor_data of multiple sensor points)to mimic a finite size sensor?&#60;/p&#62;
&#60;p&#62;Regards,&#60;br /&#62;
Deblina
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bencox on "finite sensor size"</title>
			<link>http://www.k-wave.org/forum/topic/finite-sensor-size#post-4336</link>
			<pubDate>Fri, 21 Feb 2014 14:30:50 +0000</pubDate>
			<dc:creator>bencox</dc:creator>
			<guid isPermaLink="false">4336@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Deblina, &#60;/p&#62;
&#60;p&#62;Yes, that's right. Sum the sensor_data so you only have one time series.&#60;/p&#62;
&#60;p&#62;Best wishes,&#60;br /&#62;
Ben
&#60;/p&#62;</description>
		</item>
		<item>
			<title>deblina on "finite sensor size"</title>
			<link>http://www.k-wave.org/forum/topic/finite-sensor-size#post-4325</link>
			<pubDate>Tue, 18 Feb 2014 17:50:14 +0000</pubDate>
			<dc:creator>deblina</dc:creator>
			<guid isPermaLink="false">4325@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Ben,&#60;/p&#62;
&#60;p&#62;Thanks for your reply. In the post you have mentioned about 'time series'. Is it refer to the time domain signal (sensor_data)? If that is so, then the acquired signal from all the sensor point within that region should be summed or averaged?  &#60;/p&#62;
&#60;p&#62;Thanks and regards,&#60;br /&#62;
Deblina
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bencox on "finite sensor size"</title>
			<link>http://www.k-wave.org/forum/topic/finite-sensor-size#post-4318</link>
			<pubDate>Mon, 17 Feb 2014 14:34:57 +0000</pubDate>
			<dc:creator>bencox</dc:creator>
			<guid isPermaLink="false">4318@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi deblina, &#60;/p&#62;
&#60;p&#62;Probably the easiest thing to do in this case is to make a sensor mask covering the region you want your (single) sensor, then sum the time series together afterwards. That will model the effect of the finite size of the detector.&#60;/p&#62;
&#60;p&#62;Hope that helps,&#60;br /&#62;
Ben
&#60;/p&#62;</description>
		</item>
		<item>
			<title>deblina on "finite sensor size"</title>
			<link>http://www.k-wave.org/forum/topic/finite-sensor-size#post-4309</link>
			<pubDate>Sat, 15 Feb 2014 15:33:07 +0000</pubDate>
			<dc:creator>deblina</dc:creator>
			<guid isPermaLink="false">4309@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;In K-wave, is it possible to use finite size sensor (for example circular sensor of 10 mm diameter) instead of using a point sensor?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
