Photonics

Photonics

Why the transmission shown using the code is different from what by “port2->visualize->S” in FDTD

    • zhenjiehan
      Subscriber

      Hi,

      I was confused by this by a long time.

      In siepic ebeam pdk, there is a code to plot transmission in dB.

      lumapi.evalScript(_globals.FDTD, " 
        plot (wavelengths, 10*log10(abs(Sparam(:,%s))^2),  'Wavelength (um)', 'Transmission (dB)', 'S_%s_%s, mode %s'); 
         " % (modes.index(m)+1, p.pin_name, in_pin.pin_name, modes.index(m)+1) )
      


      From this script, it seems that it plots transmission of S2 using  "10*log10(abs(Sparam(:,%s))^2".

      For a mmi design, the transmission auto generated is shown like this:

    • Guilin Sun
      Ansys Employee
      Hi, Have you extracted the result from simulation and plot it in dB scale? I just tested one value: the first point in the 2nd image, which is about 0.473. in dB, it is
      ?10*(log10(0.473));
      result:
      -3.25139
      very close to the 1st point in the first image.
      Whenever you have suspect on the data, please extract it and show it in the "prompt" and compare.

      In addition, "visualize->S/T", S is mode dependent, and T is the total transmission. So please make sure you are comparing the same result:


    • zhenjiehan
      Subscriber
      @gsun Thank you for your respond. I didn't plot 2th figure in dB scale.
      The transmission at first point is 1.26um, is about 3.25 dB, they are about the same.
      But for another point, for example,1.3um, the value in 2th figure is (10*(log10(0.486))) ,which gives me -3.13 dB
      While this value in 1th figure is about -3.25 dB.
      These are results of the same siulation file. What cause this?


    • zhenjiehan
      Subscriber

    • Guilin Sun
      Ansys Employee
      I would suggest that you get the data from the simulation result and check which one is correct, as long as you are talking the same quantity. Except that Python has passed the data wrong, I have not known any case that the plot is wrong for the same set of the data.
      If the plot is from Visualizer, you can click "view data" and compare the data.
    • zhenjiehan
      Subscriber
      @gsun Thank you for your respond.
      From your point of view, is the following sentence of ploting |abs(S)|2 correct?
      lumapi.evalScript(_globals.FDTD, " \
      plot (wavelengths, 10*log10(abs(Sparam(:,%s))^2), 'Wavelength (um)', 'Transmission (dB)', 'S_%s_%s, mode %s'); \
      " % (modes.index(m)+1, p.pin_name, in_pin.pin_name, modes.index(m)+1) )
      If it is correct, you mean, the underlying python is wrong?
      Generally speaking, how to fix the underlying python?
    • Guilin Sun
      Ansys Employee
      I believe that the above script is correct. Please output the data and plot using pure Lumerical script. I am not sure if Python script is correct or not, or it is the data it passes. As replied previously, please directly compare the raw data, instead of comparing the graphs.

      Please note that Python is a 3rd party tool and we only help for Lumerical products.
Viewing 6 reply threads
  • You must be logged in to reply to this topic.