


{"id":347836,"date":"2024-01-31T12:23:31","date_gmt":"2024-01-31T12:23:31","guid":{"rendered":"\/forum\/forums\/reply\/347836\/"},"modified":"2024-01-31T12:23:31","modified_gmt":"2024-01-31T12:23:31","slug":"347836","status":"publish","type":"reply","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/347836\/","title":{"rendered":"Reply To: the outputs of AWG"},"content":{"rendered":"<p>&lt;p class=&#8221;MsoNormal&#8221;&gt;Dear Jing,&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&nbsp;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;Thank you for contacting us.&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&nbsp;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;To get the plot described in Step 4 of the <a href=\"https:\/\/optics.ansys.com\/hc\/en-us\/articles\/360042800633-Arrayed-waveguide-grating-AWG\">Arrayed waveguide grating (AWG) &ndash; Ansys Optics<\/a>, you need to run the &ldquo;AWG&rdquo; analysis first. Then you can either right-click on the T result that has appeared in the Result View window and visualize it or run a script to do that.&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span style=&#8221;mso-no-proof: yes;&#8221;&gt;<img loading=\"lazy\" decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2024\/01\/31-01-2024-1706702976-mceclip0.png\" width=\"253\" height=\"418\" \/>&lt;br&gt;&lt;!&#8211;[endif]&#8211;&gt;&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;If you choose the first option, you will need to go to the plot settings to check the &ldquo;log10y&rdquo; option and to change the lambda units.&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span style=&#8221;mso-no-proof: yes;&#8221;&gt;<img loading=\"lazy\" decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2024\/01\/31-01-2024-1706703009-mceclip1.png\" width=\"373\" height=\"358\" \/>&lt;br&gt;&lt;!&#8211;[endif]&#8211;&gt;&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;<strong>&nbsp;<\/strong>You can also change the axis limits.&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&nbsp;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;If you want to use script so that you can also post-process the results, you can use the following script:&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;###################################################################################&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;n=8;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&nbsp;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;Tres=getresult(&#8220;AWG&#8221;,&#8221;T&#8221;);&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;lambda=Tres.lambda;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&nbsp;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;T=matrix(n,length(lambda));&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&nbsp;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;for (i=1:n) {&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp;&nbsp;&nbsp; &lt;\/span&gt;T(i,:)=Tres.getattribute(&#8220;T&#8221;+num2str(i));&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp;&nbsp;&nbsp; &lt;\/span&gt;plot(lambda*1e9,pinch(T,1,i),&#8221;lambda&#8221;, &#8220;T&#8221;);&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp;&nbsp;&nbsp; &lt;\/span&gt;holdon;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;}&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&nbsp;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;leg=cell(n);&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;y=linspace(1,n,n);&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;for (i=1:n){&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;leg{i}=&#8221;Re(T&#8221;+num2str(y(i))+&#8221;)&#8221;;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;}&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&nbsp;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;legend(leg);&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;setplot(&#8220;log10y&#8221;,1);&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;setplot(&#8220;y max&#8221;,1);&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;setplot(&#8220;y min&#8221;,1e-7);&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;setplot(&#8220;legend position&#8221;,8);&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;holdoff;&lt;\/p&gt;&lt;h6 class=&#8221;MsoNormal&#8221;&gt;#################################################################################&lt;\/h6&gt;&lt;p&gt;The above script should be used as an external script and not in the AWG analysis group. If you want to use it inside the AWG analysis group you can add it at the end of the analysis script but you need to remove the second line (i.e. the&nbsp;T=getresult(&#8220;AWG&#8221;,&#8221;T&#8221;); line).&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;Does the above answer your question or do you need something regarding the analysis script?&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&nbsp;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;Best regards,&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;Afroditi&lt;\/p&gt;<\/p>\n","protected":false},"template":"","class_list":["post-347836","reply","type-reply","status-publish","hentry"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Dear Jing, Thank you for contacting us. To get the plot described in Step 4 of the Arrayed waveguide grating (AWG) \u2013 Ansys Optics, you need to run the \u201cAWG\u201d analysis first. Then you can either right-click on the T result that has appeared in the Result View window and visualize it\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/347836\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Ansys Learning Forum | Ansys Innovation Space\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Reply To: the outputs of AWG | Ansys Learning Forum\" \/>\n\t\t<meta property=\"og:description\" content=\"Dear Jing, Thank you for contacting us. To get the plot described in Step 4 of the Arrayed waveguide grating (AWG) \u2013 Ansys Optics, you need to run the \u201cAWG\u201d analysis first. Then you can either right-click on the T result that has appeared in the Result View window and visualize it\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/347836\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/innovationspace.ansys.com\/forum\/forum\/wp-content\/uploads\/sites\/2\/2024\/01\/31-01-2024-1706702976-mceclip0.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/innovationspace.ansys.com\/forum\/forum\/wp-content\/uploads\/sites\/2\/2024\/01\/31-01-2024-1706702976-mceclip0.png\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2024-01-31T12:23:31+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2024-01-31T12:23:31+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Reply To: the outputs of AWG | Ansys Learning Forum\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Dear Jing, Thank you for contacting us. To get the plot described in Step 4 of the Arrayed waveguide grating (AWG) \u2013 Ansys Optics, you need to run the \u201cAWG\u201d analysis first. Then you can either right-click on the T result that has appeared in the Result View window and visualize it\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/innovationspace.ansys.com\/forum\/forum\/wp-content\/uploads\/sites\/2\/2024\/01\/31-01-2024-1706702976-mceclip0.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/347836\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/347836\\\/#listItem\",\"name\":\"Reply To: the outputs of AWG\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/347836\\\/#listItem\",\"position\":2,\"name\":\"Reply To: the outputs of AWG\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum#listItem\",\"name\":\"Home\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#organization\",\"name\":\"Ansys Learning Forum\",\"description\":\"Ansys Innovation Space\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/347836\\\/#webpage\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/347836\\\/\",\"name\":\"Reply To: the outputs of AWG | Ansys Learning Forum\",\"description\":\"Dear Jing, Thank you for contacting us. To get the plot described in Step 4 of the Arrayed waveguide grating (AWG) \\u2013 Ansys Optics, you need to run the \\u201cAWG\\u201d analysis first. Then you can either right-click on the T result that has appeared in the Result View window and visualize it\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/347836\\\/#breadcrumblist\"},\"datePublished\":\"2024-01-31T12:23:31+00:00\",\"dateModified\":\"2024-01-31T12:23:31+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#website\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/\",\"name\":\"Ansys Learning Forum\",\"description\":\"Ansys Innovation Space\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Reply To: the outputs of AWG | Ansys Learning Forum","description":"Dear Jing, Thank you for contacting us. To get the plot described in Step 4 of the Arrayed waveguide grating (AWG) \u2013 Ansys Optics, you need to run the \u201cAWG\u201d analysis first. Then you can either right-click on the T result that has appeared in the Result View window and visualize it","canonical_url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/347836\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/347836\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum#listItem","position":1,"name":"Home","item":"https:\/\/innovationspace.ansys.com\/forum","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/347836\/#listItem","name":"Reply To: the outputs of AWG"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/347836\/#listItem","position":2,"name":"Reply To: the outputs of AWG","previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum#listItem","name":"Home"}}]},{"@type":"Organization","@id":"https:\/\/innovationspace.ansys.com\/forum\/#organization","name":"Ansys Learning Forum","description":"Ansys Innovation Space","url":"https:\/\/innovationspace.ansys.com\/forum\/"},{"@type":"WebPage","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/347836\/#webpage","url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/347836\/","name":"Reply To: the outputs of AWG | Ansys Learning Forum","description":"Dear Jing, Thank you for contacting us. To get the plot described in Step 4 of the Arrayed waveguide grating (AWG) \u2013 Ansys Optics, you need to run the \u201cAWG\u201d analysis first. Then you can either right-click on the T result that has appeared in the Result View window and visualize it","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/#website"},"breadcrumb":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/347836\/#breadcrumblist"},"datePublished":"2024-01-31T12:23:31+00:00","dateModified":"2024-01-31T12:23:31+00:00"},{"@type":"WebSite","@id":"https:\/\/innovationspace.ansys.com\/forum\/#website","url":"https:\/\/innovationspace.ansys.com\/forum\/","name":"Ansys Learning Forum","description":"Ansys Innovation Space","inLanguage":"en-US","publisher":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/#organization"}}]},"og:locale":"en_US","og:site_name":"Ansys Learning Forum | Ansys Innovation Space","og:type":"article","og:title":"Reply To: the outputs of AWG | Ansys Learning Forum","og:description":"Dear Jing, Thank you for contacting us. To get the plot described in Step 4 of the Arrayed waveguide grating (AWG) \u2013 Ansys Optics, you need to run the \u201cAWG\u201d analysis first. Then you can either right-click on the T result that has appeared in the Result View window and visualize it","og:url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/347836\/","og:image":"https:\/\/innovationspace.ansys.com\/forum\/forum\/wp-content\/uploads\/sites\/2\/2024\/01\/31-01-2024-1706702976-mceclip0.png","og:image:secure_url":"https:\/\/innovationspace.ansys.com\/forum\/forum\/wp-content\/uploads\/sites\/2\/2024\/01\/31-01-2024-1706702976-mceclip0.png","article:published_time":"2024-01-31T12:23:31+00:00","article:modified_time":"2024-01-31T12:23:31+00:00","twitter:card":"summary_large_image","twitter:title":"Reply To: the outputs of AWG | Ansys Learning Forum","twitter:description":"Dear Jing, Thank you for contacting us. To get the plot described in Step 4 of the Arrayed waveguide grating (AWG) \u2013 Ansys Optics, you need to run the \u201cAWG\u201d analysis first. Then you can either right-click on the T result that has appeared in the Result View window and visualize it","twitter:image":"https:\/\/innovationspace.ansys.com\/forum\/forum\/wp-content\/uploads\/sites\/2\/2024\/01\/31-01-2024-1706702976-mceclip0.png"},"aioseo_meta_data":{"post_id":"347836","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"content","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":true,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2024-10-28 17:02:24","updated":"2026-08-16 04:25:41","ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/forum\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tReply To: the outputs of AWG\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/innovationspace.ansys.com\/forum"},{"label":"Reply To: the outputs of AWG","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/347836\/"}],"acf":[],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/347836","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\/347836\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=347836"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}