


{"id":235895,"date":"2022-09-21T14:35:07","date_gmt":"2022-09-21T14:35:07","guid":{"rendered":"\/forum\/forums\/topic\/how-to-convert-energy-in-terms-of-wavelength\/"},"modified":"2022-09-21T14:35:07","modified_gmt":"2022-09-21T14:35:07","slug":"how-to-convert-energy-in-terms-of-wavelength","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/how-to-convert-energy-in-terms-of-wavelength\/","title":{"rendered":"How to convert energy in terms of wavelength"},"content":{"rendered":"<p>Hello,<br \/>I was wondering if someone can lead me to get all these spectra wrt wavelengths. <a href=\"https:\/\/optics.ansys.com\/hc\/en-us\/articles\/360042160993\">https:\/\/optics.ansys.com\/hc\/en-us\/articles\/360042160993<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>######################################################<\/p>\n<p>## Script: plasmon_mode_excitation_scattering_linear.lsf<\/p>\n<p>## this script will plot the results from the parameter<\/p>\n<p>## sweep.<\/p>\n<p>##<\/p>\n<p>## Variables:<\/p>\n<p>## run_sim: 0, do not run any simulation (load results from file)<\/p>\n<p>## 1, run simulations (parameter sweep)<\/p>\n<p>##<\/p>\n<p>## Copyright 2019 Lumerical Inc.<\/p>\n<p>#######################################################<\/p>\n<p>clear;<\/p>\n<p>sweep_name = &#8220;sweep_polarization&#8221;;<\/p>\n<p>&nbsp;<\/p>\n<p>run_sim = 1; # 0, do not run any simulation<\/p>\n<p># 1, run sweep<\/p>\n<p>&nbsp;<\/p>\n<p>if (run_sim) {<\/p>\n<p>runsweep(sweep_name);<\/p>\n<p>}<\/p>\n<p>&nbsp;<\/p>\n<p>scat = getsweepresult(sweep_name, &#8220;scat&#8221;);<\/p>\n<p>total = getsweepresult(sweep_name, &#8220;total&#8221;);<\/p>\n<p>&nbsp;<\/p>\n<p>energy = scat.energy;<\/p>\n<p>scat = scat.sigma;<\/p>\n<p>total = -total.sigma;<\/p>\n<p>ext = scat + total;<\/p>\n<p>&nbsp;<\/p>\n<p>#######################################################<\/p>\n<p># Linear x<\/p>\n<p>plot(energy, pinch(scat, 2, 1), pinch(total, 2, 1), pinch(ext, 2, 1),<\/p>\n<p>&#8220;energy (eV)&#8221;, &#8220;cross section (m^2)&#8221;, &#8220;Linear x polarization&#8221;);<\/p>\n<p>setplot(&#8220;x min&#8221;, 2);<\/p>\n<p>setplot(&#8220;x max&#8221;, 3.2);<\/p>\n<p>legend(&#8220;Scattering&#8221;, &#8220;Absorption&#8221;, &#8220;Extinction&#8221;);<\/p>\n<p>&nbsp;<\/p>\n<p>#######################################################<\/p>\n<p># Linear y<\/p>\n<p>plot(energy, pinch(scat, 2, 2), pinch(total, 2, 2), pinch(ext, 2, 2),<\/p>\n<p>&#8220;energy (eV)&#8221;, &#8220;cross section (m^2)&#8221;, &#8220;Linear y polarization&#8221;);<\/p>\n<p>setplot(&#8220;x min&#8221;, 2);<\/p>\n<p>setplot(&#8220;x max&#8221;, 3.2);<\/p>\n<p>legend(&#8220;Scattering&#8221;, &#8220;Absorption&#8221;, &#8220;Extinction&#8221;);<\/p>\n","protected":false},"template":"","class_list":["post-235895","topic","type-topic","status-closed","hentry","topic-tag-plasmonics-1"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["186243","2592"],"_bbp_author_ip":["23.48.209.37"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["418"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["235895"],"_bbp_forum_id":["27833"],"_bbp_engagement":["2592","186243"],"_bbp_voice_count":["2"],"_bbp_reply_count":["5"],"_bbp_last_reply_id":["236088"],"_bbp_last_active_id":["236088"],"_bbp_last_active_time":["2022-09-22 17:32:53"]},"test":"amaity"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/235895","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\/235895\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=235895"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}