<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Simulate a concave multi-element ultrasound array]]></title><description><![CDATA[<p dir="auto">How can I create a spherically concave multi-element random ultrasound array in the Sim4Life acoustic simulation platform? The template acoustic apertures in the Sim4Life does not include the spherical concave model. How can I customize the element arrangement using X, Y and Z coordinates? Thanks!</p>
]]></description><link>https://forum.zmt.swiss/topic/368/simulate-a-concave-multi-element-ultrasound-array</link><generator>RSS for Node</generator><lastBuildDate>Wed, 20 May 2026 01:49:28 GMT</lastBuildDate><atom:link href="https://forum.zmt.swiss/topic/368.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 25 Sep 2021 23:16:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Simulate a concave multi-element ultrasound array on Wed, 06 Jul 2022 06:34:39 GMT]]></title><description><![CDATA[<p dir="auto">Assuming 'sim' is the acoustic simulation you're interested in and that 'elements' is a list of the elements (gotten from entities = model.AllEntities()) and that 'amp' and 'phase' are numpy arrays with the amplitude, phase values you're interested in assigning:</p>
<pre><code># Print current simulation name
print(sim.Name)

# Remove all sources before adding them
to_del = []
for s in sim.AllSettings:
	if isinstance(s,acoustic.SourceSettings):
		to_del.append(s)
for d in to_del:
	sim.Remove(d)

# Add sources with correct element and parameters
for source_idx in np.arange(len(elements)):
	source_settings = acoustic.SourceSettings()
	source_settings.Amplitude = amp[source_idx]
	source_settings.Phase = phases[source_idx]
	sim.Add(source_settings, rings[source_idx])
	print(rings[source_idx].Name, amp[source_idx], phases[source_idx])
</code></pre>
<p dir="auto">Sorry I'm not providing a full example. Easiest way to do that would be to manually create the whole simulation without the sources (just make all sources as materials), then right click on simulation and select 'To Python...' and then add the lines above to your code</p>
<p dir="auto">You could do something like this to get the elements as a list:</p>
<pre><code>src_ents = []
entities = model.AllEntities()
for e in entities:
    if 'Element' in e.Name:
        src_ents.append(e)
</code></pre>
<p dir="auto">Careful, I have no idea how the elements will be sorted in that case but you could use a fixed size numerical suffix and then sort them.</p>
]]></description><link>https://forum.zmt.swiss/post/1425</link><guid isPermaLink="true">https://forum.zmt.swiss/post/1425</guid><dc:creator><![CDATA[montanaro]]></dc:creator><pubDate>Wed, 06 Jul 2022 06:34:39 GMT</pubDate></item><item><title><![CDATA[Reply to Simulate a concave multi-element ultrasound array on Thu, 23 Jun 2022 16:09:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/montanaro">@<bdi>montanaro</bdi></a> Hi Montanaro, I have created a spherically concave surface as you instructed for simulating multi-element ultrasound. Would you please advise how I can assign 128 ultrasound elements to this customized concave surface?</p>
]]></description><link>https://forum.zmt.swiss/post/1422</link><guid isPermaLink="true">https://forum.zmt.swiss/post/1422</guid><dc:creator><![CDATA[Andrew.yukai]]></dc:creator><pubDate>Thu, 23 Jun 2022 16:09:07 GMT</pubDate></item><item><title><![CDATA[Reply to Simulate a concave multi-element ultrasound array on Mon, 27 Sep 2021 07:57:14 GMT]]></title><description><![CDATA[<p dir="auto">The easiest way would be to design it yourself and automate it via python (create spheres and cylinders and use the binary operations to 'subtract' them from one another until you have the geometry you want). Let me know if you need some support with this and I can help.</p>
<p dir="auto">If I remember correctly the SEFT tutorial python script shows a similar method to create the SEFT (single element curved transducer) transducer from scratch</p>
]]></description><link>https://forum.zmt.swiss/post/1089</link><guid isPermaLink="true">https://forum.zmt.swiss/post/1089</guid><dc:creator><![CDATA[montanaro]]></dc:creator><pubDate>Mon, 27 Sep 2021 07:57:14 GMT</pubDate></item></channel></rss>