


{"id":397384,"date":"2024-12-13T09:52:25","date_gmt":"2024-12-13T09:52:25","guid":{"rendered":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/397384\/"},"modified":"2024-12-13T09:52:25","modified_gmt":"2024-12-13T09:52:25","slug":"397384","status":"publish","type":"reply","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/397384\/","title":{"rendered":"Reply To: Data Extraction and Graph Drawing in var FDTD"},"content":{"rendered":"<p>&lt;p&gt;Hi Subscriber,&nbsp;&lt;\/p&gt;&lt;p&gt;Thank you for reaching out to us!&lt;\/p&gt;&lt;p&gt;I believe the error occurs because T is a &#8220;dataset&#8221; type data.&lt;br&gt;With the following icon:&lt;br&gt;<img decoding=\"async\" src=\"https:\/\/lumerical.zendesk.com\/attachments\/token\/6n9vVWqeV6pyRTZbdn24A4GpI\/?name=inline-1881576072.png\" \/>\u200b&lt;br&gt;&lt;br&gt;That is, T contains not only the transmission data but also the corresponded wavelength data.&lt;br&gt;Because log10 could only load matrix type data, this error occurs.&lt;br&gt;The solution is to load the matrix from the dataset.&nbsp;&lt;br&gt;<a href=\"https:\/\/support.lumerical.com\/hc\/en-us\/articles\/360034409554-Introduction-to-Lumerical-datasets\" rel=\"noreferrer\">More information about dataset<\/a>.&lt;br&gt;&lt;br&gt;You may try the following commands :&nbsp;&lt;br&gt;&lt;br&gt;Trans = getresult(&#8220;FDTD::ports::port 2&#8221;, &#8220;T&#8221;);&lt;br&gt;T_=Trans.T;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# get transmission matrix from a dataset&lt;br&gt;Loss=-10*log10(T_);&lt;br&gt;f=Trans.f;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # get frequency array&lt;br&gt;plot(c\/f*1e6,Loss, &#8220;wavelength&#8221;,&#8221;dB&#8221;);&lt;\/p&gt;&lt;p&gt;Let me know if that helped.&lt;\/p&gt;&lt;p&gt;Kind Regards,&lt;\/p&gt;&lt;p&gt;Niki&lt;\/p&gt;<\/p>\n","protected":false},"template":"","class_list":["post-397384","reply","type-reply","status-publish","hentry"],"aioseo_notices":[],"acf":[],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/397384","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/reply"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/397384\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=397384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}