Photonics

Photonics

Topics related to Lumerical and more.

Problem converting U,V coordinates to Theta and phi

    • tropshm
      Subscriber

      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

      when I try to convert it back to theta and phi its come out wrong as can seen in the pictures I will upload.

      the first is the output in sphere shape and then in the theta phi coordinates with the scripts code.

      "

      load("Name.fsp");
      E2 = farfield3d("T",1,2000,2000);
      ux = farfieldux("T",1,2000,2000);
      uy = farfielduy("T",1,2000,2000);

      theta = linspace(-90,90,2000);
      phi = linspace(0,90,500);
      Theta = meshgridx(theta,phi);
      Phi = meshgridy(theta,phi);
      E2_angle = farfieldspherical(E2,ux,uy,Theta,Phi);
      E2_angle = reshape(E2_angle, [length(theta), length(phi)]);
      image(theta, phi, E2_angle, "theta","phi","E2");

      "

    • Niki Papachristou
      Ansys Employee

      Hi David,

      Thank you for reaching out to us and posting your question here. To be honest I am a little bit confused on what you are trying to achieve here. The second image is from our vizualiser while the first is from your script? 
      I think that if you try to create a polar graph as it is on he second image you will get the same results.

      Kind Regards,

      Niki

      • tropshm
        Subscriber

        The images swichted off, the second one is indded from the visualizer and than I want to get the position and width of the beam in theta and phi and when I use the script given in the lumerical examples I am getting the first image and it contain wrong information in the phi axis deos it not?

         

        Tnx

Viewing 1 reply thread
  • You must be logged in to reply to this topic.