


{"id":223140,"date":"2022-08-03T12:58:19","date_gmt":"2022-08-03T12:58:19","guid":{"rendered":"\/forum\/forums\/topic\/understanding-grating_s_parameters-results-phase-retrieval\/"},"modified":"2022-08-03T12:58:19","modified_gmt":"2022-08-03T12:58:19","slug":"understanding-grating_s_parameters-results-phase-retrieval","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/understanding-grating_s_parameters-results-phase-retrieval\/","title":{"rendered":"Understanding &#8220;grating_s_parameters&#8221; results + Phase retrieval"},"content":{"rendered":"<p>Hello,&nbsp;<\/p>\n<p>I ran the example in <a href=\"https:\/\/optics.ansys.com\/hc\/en-us\/articles\/360042097313-Metalens-Zemax-Interoperability\">https:\/\/optics.ansys.com\/hc\/en-us\/articles\/360042097313-Metalens-Zemax-Interoperability<\/a> from the project file &#8220;unit_cell.fsp&#8221;.&nbsp;<\/p>\n<p>The example simulates a pillar on a substrate, using one wavelength, whereas, I need a wvl range, so I changed the source&#8217;s wavelength to 0.5-1um.&nbsp;<\/p>\n<p>The height and radius dimensions are the same (as all other parameters from this example) &#8211;&nbsp;<\/p>\n<p>Height =1um, Radius = 0.144um.&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">A few questions regarding the results &#8211;&nbsp;<\/span><\/p>\n<ol>\n<li>What is the difference between &#8220;T&#8221; and &#8220;T_Gn&#8221; or &#8220;R&#8221;, &#8220;R_Gn&#8221;?&nbsp;<\/li>\n<li>(abs^2(S21_ Gn)) is the intensity of the transmitted beam, normalized to the incident beam. Sometimes I see results larger than 1. What does this mean? I&#8217;m attaching here the scattering data where the transmitted is larger than 1. (I also observed it happen for &#8220;S11_Gn&#8221;, in other simulations). <img decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2022\/08\/03-08-2022-1659529470-mceclip0.png\"><\/li>\n<\/ol>\n<p>(note &#8211;&nbsp; the Re(S21) is&nbsp; also larger than 1, not just the abs^2(S21))<\/p>\n<p>Next, I would like to retrieve the phase data of the transmitted beam.&nbsp;<\/p>\n<p>I see two options to achieve that &#8211;&nbsp;<\/p>\n<ol>\n<li>&#8220;angle(S21_Gn)&#8221; via the GUI &#8220;S-&gt;visualize&#8221;<\/li>\n<li>By using the script &#8220;fdtd_unit_cell_plot_phase_T&#8221; after running the height and radius sweep.&nbsp;<\/li>\n<\/ol>\n<p>the two methods give different results.&nbsp;<\/p>\n<p>These graphs describe the scattering of <span style=\"text-decoration: underline\">my resonators (<\/span>not the original example).&nbsp;<\/p>\n<p>This graph was taken from the GUI &#8211; S-&gt;visualize (angle(S21_Gn))<\/p>\n<p><img decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2022\/08\/03-08-2022-1659530517-mceclip1.png\"><\/p>\n<p>And this graph was taken after running the sweep and using the script. The &#8220;S.S21&#8221; matrix dimensions are &#8211; lambda, radius, height. In order to retrieve just the phase I&#8217;m using the lines &#8211;&nbsp;<\/p>\n<p>lambda = linspace(3, 8, 1000);<\/p>\n<p>folder_name = &#8220;phase_data_tr&#8221;;<\/p>\n<p>&nbsp;<\/p>\n<p>for(hei=1:nd)<\/p>\n<p>{<\/p>\n<p>for(r=1:nd)<\/p>\n<p>{<\/p>\n<p>phase1 = pinch(angle(S.S21_Gn),2,r);<\/p>\n<p>phase2 = pinch(phase1,2,hei);<\/p>\n<p>&nbsp;<\/p>\n<p>A1 = [lambda, phase2];<\/p>\n<p>filename = &#8220;phase_vs_wvl_r_&#8221; + num2str(radius(r,1))+ &#8220;_h_&#8221; + num2str(height(hei));<\/p>\n<p>matlabsave(folder_name +&#8217;\\&#8217;+ filename, A1);<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>Then I plotted the phase in matlab (for the same radius and height as in the graph above) &#8211;&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2022\/08\/03-08-2022-1659530702-mceclip2.png\"><\/p>\n<p>The graphs share the same behaviour for wvl =4-5.5um. However, around wvl =6.6um, the last graph shows a large dip, which has no sign in the first graph.&nbsp;<\/p>\n<p>Which of the methods is the correct one?&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>One last question &#8211;&nbsp;<\/p>\n<p>How can I get the source&#8217;s wavelength (of the &#8220;grating_s_parameters&#8221; object) through the script?&nbsp;<\/p>\n<p>I mean, I know the &#8220;start wavelength&#8221; and the &#8220;end wavelength&#8221; but are they evenly spaced?<\/p>\n<p>Is it ok to use &#8211;&nbsp;<\/p>\n<p>lambda = linspace(start wavelength, end wavelength, number of points);&nbsp; &nbsp;<\/p>\n<p>in order to plot phase vs wvl?&nbsp;<\/p>\n<p>thanks a lot in advance,<\/p>\n<p>any help is much appreciated,&nbsp;<\/p>\n<p>Shany<\/p>\n","protected":false},"template":"","class_list":["post-223140","topic","type-topic","status-closed","hentry"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["260348","2592"],"_bbp_author_ip":["23.218.93.111"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["1393"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["223140"],"_bbp_forum_id":["27833"],"_bbp_engagement":["2592","260348"],"_bbp_voice_count":["2"],"_bbp_reply_count":["1"],"_bbp_last_reply_id":["223203"],"_bbp_last_active_id":["223203"],"_bbp_last_active_time":["2022-08-03 23:21:40"]},"test":"shanycobiu-ac-il"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/223140","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/223140\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=223140"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}