<?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[Extract the EM E field along the Spline]]></title><description><![CDATA[<p dir="auto">I want to extract the E field along the Spline from an EM simulation.<br />
My Sim4life version is V8.0.0.15165.<br />
Now I have a simple script that can extract the E field at a specific point, but there are still two Problems.<br />
First, how to get a series of points along the Spline?<br />
Then, how to project the E field to the direction vector of the Spline?</p>
<pre><code>SimulationName = 'test'
PointPosition = (0.0, 0.0, 0.0)

simulation = document.AllSimulations[SimulationName]
simulation_extractor = simulation.Results()

em_sensor_extractor = simulation_extractor["Overall Field"]
document.AllAlgorithms.Add(em_sensor_extractor)

efield_sensor = em_sensor_extractor['EM E(x,y,z,f0)']
efield_sensor.Update()

cell_index = efield_sensor.Data.Grid.FindCell(*PointPosition)
point_index = efield_sensor.Data.Grid.ComputeCellIndex(*cell_index)
point_efield = efield_sensor.Data.Field(0)[point_index]

print(point_efield)
</code></pre>
<p dir="auto">In order to get the E field of the point, I use the cell index, but it seems a little complex.<br />
Is there any easier way to do that?<br />
In fact, I don't know the usage of parameter '0' in function 'Field', I just have a try and it works.<br />
Can anyone explain the meaning of this function and parameter?</p>
]]></description><link>https://forum.zmt.swiss/topic/622/extract-the-em-e-field-along-the-spline</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 19:20:10 GMT</lastBuildDate><atom:link href="https://forum.zmt.swiss/topic/622.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 24 Jul 2024 16:36:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Extract the EM E field along the Spline on Fri, 26 Jul 2024 19:23:06 GMT]]></title><description><![CDATA[<p dir="auto">Thank you so much for hour help with the technical issue!<br />
Your assistance made a big difference, and I truly appreciate your expertise and prompt support!</p>
]]></description><link>https://forum.zmt.swiss/post/1890</link><guid isPermaLink="true">https://forum.zmt.swiss/post/1890</guid><dc:creator><![CDATA[aoshen]]></dc:creator><pubDate>Fri, 26 Jul 2024 19:23:06 GMT</pubDate></item><item><title><![CDATA[Reply to Extract the EM E field along the Spline on Thu, 25 Jul 2024 12:23:18 GMT]]></title><description><![CDATA[<p dir="auto">The parameter '0' is the 'snapshot' index. If you had a broadband simulation, and changed your field sensor to add certain 'Extracted Frequencies', you would change the snapshot accordingly.</p>
<p dir="auto">To extract the Etan, the easiest would be to interpolate onto your spline, then use the tangential field tool. See the attached gif. Then you can use 'To Python'.</p>
<p dir="auto">You can also investigate using the IMSAFE module if your license includes it.</p>
<p dir="auto"><img src="/assets/uploads/files/1721902927233-etan.gif" alt="etan.gif" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.zmt.swiss/post/1889</link><guid isPermaLink="true">https://forum.zmt.swiss/post/1889</guid><dc:creator><![CDATA[brown]]></dc:creator><pubDate>Thu, 25 Jul 2024 12:23:18 GMT</pubDate></item></channel></rss>