<?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: Alpha version of kWaveArray (off-grid sources)</title>
		<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 21:36:36 +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/alpha-version-of-kwavearray-off-grid-sources" rel="self" type="application/rss+xml" />

		<item>
			<title>nhaidour on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources/page/2#post-8873</link>
			<pubDate>Fri, 28 Jul 2023 10:50:03 +0000</pubDate>
			<dc:creator>nhaidour</dc:creator>
			<guid isPermaLink="false">8873@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Bradley,&#60;/p&#62;
&#60;p&#62;I'm simulating a disc element using karray.addDiscElement, but when I draw the 3D plot of this element, it seems the shape of the element is not a disc, it looks like it's rectangle, is this normal?&#60;/p&#62;
&#60;p&#62;Cordially,
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Jinhyuk Kim on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources/page/2#post-8778</link>
			<pubDate>Tue, 30 May 2023 02:15:16 +0000</pubDate>
			<dc:creator>Jinhyuk Kim</dc:creator>
			<guid isPermaLink="false">8778@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Thanks, Bradley!&#60;/p&#62;
&#60;p&#62;I have to adjust the position of the ultrasound transducer, right?&#60;/p&#62;
&#60;p&#62;I'll try and research successfully!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources/page/2#post-8761</link>
			<pubDate>Thu, 18 May 2023 06:25:54 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">8761@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Jinhyuk Kim,&#60;/p&#62;
&#60;p&#62;In &#60;code&#62;kWaveArray&#60;/code&#62;, the element positions must be set in physical space (not grid space). So, in your example, there are no elements within the grid, so the mask ends up being zero (hence the error message).&#60;/p&#62;
&#60;p&#62;Brad
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Jinhyuk Kim on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources/page/2#post-8746</link>
			<pubDate>Thu, 27 Apr 2023 10:02:31 +0000</pubDate>
			<dc:creator>Jinhyuk Kim</dc:creator>
			<guid isPermaLink="false">8746@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi everyone,&#60;/p&#62;
&#60;p&#62;I have a problem with the kspaceFirstOrder2D.&#60;/p&#62;
&#60;p&#62;error message is 'source.p_mask must be a binary grid with at least one element set to 1.&#60;/p&#62;
&#60;p&#62;I want to find acoustic fiend arising from array used kwavearray class, however, I found above error messasge.&#60;/p&#62;
&#60;p&#62;Here is my code.&#60;/p&#62;
&#60;p&#62;karray = kWaveArray;&#60;br /&#62;
% define the grid parameters&#60;br /&#62;
pml_size = 20;&#60;br /&#62;
Nx = 552 - 2 * pml_size; % [grid points]&#60;br /&#62;
Ny = 552 - 2 * pml_size; % [grid points]&#60;br /&#62;
dx = 1e-3; % [m]&#60;br /&#62;
dy = 1e-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;%% ALPHA COEFF&#60;/p&#62;
&#60;p&#62;medium.alpha_coeff = 0.02 * ones(Nx, Ny); % [dB/(MHz^y cm)] WATER&#60;br /&#62;
medium.alpha_power = 1.5;&#60;/p&#62;
&#60;p&#62;%% SPEED&#60;br /&#62;
medium.sound_speed = 1500 * ones(Nx, Ny); % WATER default fill! [m/s]&#60;br /&#62;
% %skull&#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;freq = 200*10^3; % [Hz]&#60;br /&#62;
amp = 0.3e6; % 0.53[MPa]&#60;/p&#62;
&#60;p&#62;radius    = 10e-3;              % [m]&#60;br /&#62;
diameter  = 15e-3;              % [m]&#60;br /&#62;
focus_pos = [Nx/2, Ny/2];        % [m]&#60;/p&#62;
&#60;p&#62;% add arc shaped element&#60;br /&#62;
elem_pos  = [Nx/10, Ny/2];    % [m]&#60;br /&#62;
karray.addArcElement(elem_pos, radius, diameter, focus_pos);&#60;/p&#62;
&#60;p&#62;% add arc shaped element&#60;br /&#62;
elem_pos  = [Nx/10, Ny/2.5];         % [m]&#60;br /&#62;
karray.addArcElement(elem_pos, radius, diameter, focus_pos);&#60;/p&#62;
&#60;p&#62;% add arc shaped element&#60;br /&#62;
elem_pos  = [Nx/10, Ny/3.0];     % [m]&#60;br /&#62;
karray.addArcElement(elem_pos, radius, diameter, focus_pos);&#60;/p&#62;
&#60;p&#62;source.p_mask = karray.getArrayBinaryMask(kgrid);&#60;/p&#62;
&#60;p&#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 = 100; % points per wavelength&#60;br /&#62;
cfl = 0.1; % cfl number&#60;br /&#62;
ppp = 41; % points per period&#60;br /&#62;
T = 1 / freq; % period [s]&#60;br /&#62;
dt = 4e-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 = 40.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;/p&#62;
&#60;p&#62;source.p = createCWSignals(kgrid.t_array, freq, [amp, amp, amp], 0);&#60;/p&#62;
&#60;p&#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 = 15;&#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', 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;Thanks
&#60;/p&#62;</description>
		</item>
		<item>
			<title>zengqw2021 on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources/page/2#post-8745</link>
			<pubDate>Fri, 21 Apr 2023 06:03:48 +0000</pubDate>
			<dc:creator>zengqw2021</dc:creator>
			<guid isPermaLink="false">8745@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi everyone,&#60;/p&#62;
&#60;p&#62;   Is there a way for me to get grid points form part of the specified element. As for example_at_array_as_sensor.m, I got a sensor_data array of size 6748 by 1207. There is 20 elements.&#60;br /&#62;
 But, how could I tell which transducer these 6748 time series belong to.&#60;/p&#62;
&#60;p&#62; I find a property named 'getElementBinaryMask' may be work. But when I run it in the following way, I get an error 'Method, attribute, or field 'getElementBinaryMask' of class 'kWaveArray' not recognized.'.&#60;/p&#62;
&#60;p&#62;mask2 = karray.getElementBinaryMask(kgrid, 1); % grid points form part of the specified element&#60;/p&#62;
&#60;p&#62;Does anyone know how to solve this problem？
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources/page/2#post-8673</link>
			<pubDate>Mon, 28 Nov 2022 15:56:34 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">8673@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi HN,&#60;/p&#62;
&#60;p&#62;Yes at the moment you need to define them manually. The &#60;a href=&#34;http://www.k-wave.org/documentation/example_at_linear_array_transducer.php&#34;&#62;Modelling A Linear Array Transducer Example&#60;/a&#62; shows one way to do this.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>nhaidour on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources/page/2#post-8672</link>
			<pubDate>Mon, 28 Nov 2022 13:37:46 +0000</pubDate>
			<dc:creator>nhaidour</dc:creator>
			<guid isPermaLink="false">8672@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Thank you for your response ! &#60;/p&#62;
&#60;p&#62;I want to modelise a 2D Probe that contain elements and an inter-space element in 3D, and I think the best way is to use KwaveArray class! But I did not find the function that would allow me to declare the number of elements with an inter-space and their position. Or do I have to declare each element manually?  &#60;/p&#62;
&#60;p&#62;Best Regards,&#60;br /&#62;
HN
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources/page/2#post-8670</link>
			<pubDate>Tue, 22 Nov 2022 21:11:11 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">8670@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Yes - there are several examples in the included documentation under “modelling transducer arrays”.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>nhaidour on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources/page/2#post-8669</link>
			<pubDate>Tue, 22 Nov 2022 16:12:49 +0000</pubDate>
			<dc:creator>nhaidour</dc:creator>
			<guid isPermaLink="false">8669@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;Is there some examples for using the KwaveArray ?&#60;/p&#62;
&#60;p&#62;Best Regards,&#60;br /&#62;
HN
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources#post-8642</link>
			<pubDate>Tue, 08 Nov 2022 10:13:50 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">8642@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Noting that &#60;code&#62;kWaveArray&#60;/code&#62; is now part of k-Wave v1.4.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bencox on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources#post-8573</link>
			<pubDate>Wed, 13 Jul 2022 17:31:30 +0000</pubDate>
			<dc:creator>bencox</dc:creator>
			<guid isPermaLink="false">8573@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi quetaijiangchu and LewisR, &#60;/p&#62;
&#60;p&#62;There is not such an example yet, no, although the idea behind kWaveArray does have the capability of modelling just such sources. Essentially, given a desired surface, it is necessary to convolve it with the bandlimited interpolant, which has the form &#60;code&#62;sinc(x * pi / dx)&#60;/code&#62;, and then sample the resulting function at the grid points to give the weights used in kWaveArray. The details are given in &#60;a href=&#34;http://bug.medphys.ucl.ac.uk/papers/2019-Wise-JASA.pdf&#34;&#62;this paper&#60;/a&#62;. We will add more functionality in due course when we integrate it into k-Wave properly.&#60;/p&#62;
&#60;p&#62;Best wishes&#60;br /&#62;
Ben
&#60;/p&#62;</description>
		</item>
		<item>
			<title>quetaijiangchu on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources#post-8552</link>
			<pubDate>Wed, 15 Jun 2022 08:28:47 +0000</pubDate>
			<dc:creator>quetaijiangchu</dc:creator>
			<guid isPermaLink="false">8552@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Is there an example of how to create 3D irregularities using function addCustomElement?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>LewisR on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources#post-8524</link>
			<pubDate>Wed, 04 May 2022 14:19:03 +0000</pubDate>
			<dc:creator>LewisR</dc:creator>
			<guid isPermaLink="false">8524@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Brad,&#60;/p&#62;
&#60;p&#62;Can kWaveArray support rectangular curved elements? Specifically curvature to both the height and width of the element. Or would this need to be done using the custom element option? I'm a little confused with how to use the addCustomElement method, would it be possible for you to do an example? If in fact it can be used to solve my problem.&#60;/p&#62;
&#60;p&#62;Thanks in advance,&#60;/p&#62;
&#60;p&#62;Lewis
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Eric Miller on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources#post-8211</link>
			<pubDate>Fri, 11 Jun 2021 21:21:05 +0000</pubDate>
			<dc:creator>Eric Miller</dc:creator>
			<guid isPermaLink="false">8211@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Brad, &#60;/p&#62;
&#60;p&#62;Works like a charm!&#60;/p&#62;
&#60;p&#62;Another question: I have an annular array with a rectangular central aperture. Trying to work though the kWaveArray class to see what I'll need to tweak. I have my ring inner and outer diameters, I only need to remove the parts of the rings that overlap with the rectangular aperture. Any guidance on doing this such that the grid weights come out correct? &#60;/p&#62;
&#60;p&#62;-Eric
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources#post-8203</link>
			<pubDate>Thu, 10 Jun 2021 09:22:46 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">8203@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Eric,&#60;/p&#62;
&#60;p&#62;I've just up-dated the linked file with the missing function. Note, &#60;code&#62;focusedAnnulusONeil&#60;/code&#62; requires an updated version of &#60;code&#62;focusedBowlONeil&#60;/code&#62; that also returns the complex pressure, so I've added that also.&#60;/p&#62;
&#60;p&#62;Let me know any problems!&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Eric Miller on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources#post-8201</link>
			<pubDate>Wed, 09 Jun 2021 17:40:43 +0000</pubDate>
			<dc:creator>Eric Miller</dc:creator>
			<guid isPermaLink="false">8201@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Brad, k-wave team,&#60;/p&#62;
&#60;p&#62;Thanks so much for the annular array support! It helps my work quite a bit, really awesome work.&#60;/p&#62;
&#60;p&#62;Could the 0.3 kArray Alpha package be missing the function &#34;focusedAnnulusOneil.m&#34;? I have &#34;focusedBowlOneil.m&#34; as a part of k-wave 1.3, but I don't see the annulus code in either the k-wave 1.3 or kArray 0.3 downloads and &#34;ex08_focused_annular_array_3D.m&#34; calls that function. I may very well be missing it.&#60;/p&#62;
&#60;p&#62;Thanks again,&#60;br /&#62;
Eric
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources#post-8174</link>
			<pubDate>Tue, 08 Jun 2021 14:44:12 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">8174@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;@Kris: Unfortunately, there is currently no good way to use kWaveArray with time reversal. This is because time reversal uses the &#60;code&#62;source.p_mode = &#38;#39;dirichlet&#38;#39;&#60;/code&#62; option, and that doesn't make much sense when the source mask is non-local. I'll give it some thought.&#60;/p&#62;
&#60;p&#62;@Zeng: It's just a matter of adding the downloaded folder to the MATLAB path. What error message do you get?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>zengqw2021 on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources#post-8172</link>
			<pubDate>Mon, 07 Jun 2021 16:15:11 +0000</pubDate>
			<dc:creator>zengqw2021</dc:creator>
			<guid isPermaLink="false">8172@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Dear all,&#60;br /&#62;
     I copy the alpha codes to my installation path of k-Wave:&#34;\k-Wave\ &#34; and &#34;k-Wave\private&#34;. I tried to run a example, but it doesn't work. Does anyone know how this bag works?&#60;br /&#62;
     Cheers&#60;br /&#62;
     Zeng
&#60;/p&#62;</description>
		</item>
		<item>
			<title>kdreher on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources#post-8161</link>
			<pubDate>Mon, 31 May 2021 16:08:06 +0000</pubDate>
			<dc:creator>kdreher</dc:creator>
			<guid isPermaLink="false">8161@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi everyone,&#60;br /&#62;
I really like the new kWaveArray class, so thank you very much for that!&#60;/p&#62;
&#60;p&#62;However, I wondered how to use it in combination with the time reversal reconstruction? It doesn't seem to work the same way as before since the number of time series doesn't match the number of source elements in the sensor mask anymore.&#60;/p&#62;
&#60;p&#62;Is there some method that does the inverse of the combineSensorData method?&#60;/p&#62;
&#60;p&#62;Cheers,&#60;br /&#62;
Kris
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources#post-7899</link>
			<pubDate>Sun, 01 Nov 2020 22:27:37 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">7899@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Frank,&#60;/p&#62;
&#60;p&#62;This is a bug - thanks for reporting. In all cases it should be &#60;code&#62;element_num&#60;/code&#62;. New download link with bug fix in the original post above.&#60;/p&#62;
&#60;p&#62;Applying the affine transform won't work here (these are angles, rather than a position as in the other elements). I've left it as an issue for now. What needs to happen is the angles extracted from the affine transform, and these angles added to the individual element angles.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
