Photonics

Photonics

Phase Graph Lumerical MODE

    • Catherine.antipuesto
      Subscriber

      Hello! I tried plotting the wavelength vs phase graph with the script:

      E=getresult("through","E");
      Ex=pinch(E.Ex);
      Ey=pinch(E.Ey);
      Ez=pinch(E.Ez);
      xphase=angle(Ex);
      f = getdata("through","f");
      plot(c/f,xphase);

      However, it says:
      Error: line 7: y matrix must be same length as x matrix

      How do I fix this?

      Why is my E-field matrix [69, 500] while my wavelength is ? What does this mean?

      Thank you so much!

    • Guilin Sun
      Ansys Employee

      Line 7 is this:

      plot(c/f,xphase);

      It will only work if the monitor is a point!

      To know the frequency points, you can use
      nf=length(f);

      Since usually the frequency point is in the last dimension, in your case, it is 500.

      The other number 69 is the space point.

      Since now it is 2D matrix, you will need to image it.

      If you only want to plot phase vs f at given space point, you have to specify the space point, eg
      mm=30; $the 30th space point
      plot(c/f,pinch(xphase(mm,:)) )

      please try.

      In addition, since now you know more about the phase extraction, please review the previous posts you got replied.

    • Catherine.antipuesto
      Subscriber

      Thank you so much for this! Why is the graph different at different space points? What is the implications of space points? Thank you again! :)

Viewing 2 reply threads
  • You must be logged in to reply to this topic.