


{"id":377541,"date":"2024-08-07T11:20:54","date_gmt":"2024-08-07T11:20:54","guid":{"rendered":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/problem-converting-uv-coordinates-to-theta-and-phi\/"},"modified":"2024-08-07T11:20:54","modified_gmt":"2024-08-07T11:20:54","slug":"problem-converting-uv-coordinates-to-theta-and-phi","status":"publish","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/problem-converting-uv-coordinates-to-theta-and-phi\/","title":{"rendered":"Problem converting U,V coordinates to Theta and phi"},"content":{"rendered":"<p>I have farfield calculation that I do and I get the results in sphere like shape and when I take the information out its in U,V coordinates<\/p>\n<p>when I try to convert it back to theta and phi its come out wrong as can seen in the pictures I will upload.<\/p>\n<p>the first is the output in sphere shape and then in the theta phi coordinates with the scripts code.<\/p>\n<p>&#8220;<\/p>\n<p>load(&#8220;Name.fsp&#8221;);<br \/>E2 = farfield3d(&#8220;T&#8221;,1,2000,2000);<br \/>ux = farfieldux(&#8220;T&#8221;,1,2000,2000);<br \/>uy = farfielduy(&#8220;T&#8221;,1,2000,2000);<\/p>\n<p>theta = linspace(-90,90,2000);<br \/>phi = linspace(0,90,500);<br \/>Theta = meshgridx(theta,phi);<br \/>Phi = meshgridy(theta,phi);<br \/>E2_angle = farfieldspherical(E2,ux,uy,Theta,Phi);<br \/>E2_angle = reshape(E2_angle, [length(theta), length(phi)]);<br \/>image(theta, phi, E2_angle, &#8220;theta&#8221;,&#8221;phi&#8221;,&#8221;E2&#8243;);<\/p>\n<p>&#8220;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/forum\/wp-content\/uploads\/sites\/2\/2024\/08\/07-08-2024-1723029579-phiTheta_Lumerical.png\" alt=\"\"><img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/forum\/wp-content\/uploads\/sites\/2\/2024\/08\/07-08-2024-1723029589-noPhase.png\" alt=\"\"><\/p>\n","protected":false},"template":"","class_list":["post-377541","topic","type-topic","status-publish","hentry"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["282801","50911"],"_bbp_author_ip":["132.70.229.198"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["270"],"_bbp_topic_status":["unanswered"],"_bbp_topic_id":["377541"],"_bbp_forum_id":["27833"],"_bbp_engagement":["50911","282801"],"_bbp_voice_count":["2"],"_bbp_reply_count":["2"],"_bbp_last_reply_id":["380880"],"_bbp_last_active_id":["380880"],"_bbp_last_active_time":["2024-08-28 13:34:10"]},"test":"tropshmbiu-ac-il"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/377541","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\/377541\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=377541"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}