Photonics

Photonics

Topics related to Lumerical and more.

How to extract values from Mode List data in Eigensolver Analysis

    • mwhitby
      Subscriber

      I did FDE analysis for my simulation. Then I calculated the modes and got a data table inside the Eigensolver Analysis Tab called Mode List. From this data I would like to extract the loss and the TE polarization fraction. Ideally I would like to be able to extract these values and assign them to variable names, however it would also work if I can export the full data table to a .csv file. Is there any way to do this?

    • mwhitby
      Subscriber
      I need to do this in script.
    • mwhitby
      Subscriber
      I need to do this in script.
    • mwhitby
      Subscriber
      I need to do this in script.
    • mwhitby
      Subscriber
      I need to do this in script.
    • mwhitby
      Subscriber
      I need to do this in script.
    • Guilin Sun
      Ansys Employee
      May I know why did you write repeatedly ?
      you can first check what quantities can be output:
      ?getdata("mode1");
      ?getresult("mode1");
      then you can script to get them:
      eg
      E=getresult("mode1","E");
      loss=getresult("mode1","loss");
      please try.


    • mwhitby
      Subscriber
      My apologies for the repeated comments. I only meant to add it once but there must've been some sort of system error.
      Thank you for your help! I am having some slight issues while trying this.
      Firstly, the loss = getresult("mode1","loss); code outputs loss = 509627 whereas in the table for mode 1 loss is listed as 5096.3. Is this a scale problem? Is there a way to fix this?
      Secondly, the E = getresult("mode1","E"); code doesn't give me the TE polarization fraction. It says that E = E vs x, y ,z ,lambda/f. How can I get this to give the TE polarization fraction?

      Thank you for your help!

    • mwhitby
      Subscriber
      To try to fix the code for TE polarization fraction I used TE_polarization_fraction = getresult("mode1","TE polarization fraction"); . This gave me 0.10235 whereas in the table it was listed as 10. Again the scale seems to be off. Is there a way to fix this? Thank you!
    • Guilin Sun
      Ansys Employee
      They are the same Thing: On the list it is the percentage whereas in the script it is actual value: 0.10235 is 10 percent .
      For the loss, the list shows dB/cm, whereas in script it is dB/m.
      Please note that the script unit is mks system.
      https://en.wikipedia.org/wiki/MKS_system_of_units
    • mwhitby
      Subscriber
      Thank you very much for all of your help! I greatly appreciate it.
Viewing 10 reply threads
  • The topic ‘How to extract values from Mode List data in Eigensolver Analysis’ is closed to new replies.