Topics related to Lumerical and more

Finding mean of reflectivity

    • Frederic Wu


      Is there a more efficient method for comparing the reflectivity measured by monitors after conducting a sweep? The sweep altered the thickness of the material layer and affected the reflectivity measurements. I'm seeking a way to calculate the mean of the reflectivity of each simulation so I can better compare the data.

      If not, I will need to download the text file and use excel to determine the means then compare. This will be very time consuming so I wonder if there is a better way for me to do this.

      Thanks for your time and assistance,

      Frederic Wu

    • Guilin Sun
      Ansys Employee

      In a sweep, you can get the mean value of the result:

      Actually you can use getsweepresult sctipt comman to extract the data:

      getsweepresult - Script command

      then you can do more operation, such as mean:

      mean - Script command

      or any other post processing. To use the software efficiently, I would strongly suggest to learn more about the scripting.

    • Frederic Wu

      I tried researching but since I do not actually understanding how to code in lumerical, could you provide me with some more guidance and maybe show me how my goal can be done?

      Task clarification: So basically, I created a sweep function that changes the thickness of a material between a given range 48 times. After running the sweep function, I hope I can obtain the mean of the reflectivity measured in of these 48 times of simulations so I can see how changing the thickness affected the mean reflectivity.

      Many thanks for your assistance, please provide me with some more guidance.

    • Guilin Sun
      Ansys Employee

      two methods have been suggested:

      1: as shown in the sweep object, you can always use mean operation for all the sweep.

      2: you can use getsweepresult.

      in the getsweepresult page, you can learn some exmaples. For more informaiton, please refer to

      you can watch vidoes, and learn each script command.

      Please try to write script. if there is an error and you cannot fix it, please write a separate post.


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