Photonics

Photonics

name ‘tolerance’ is not defined

    • JuKa
      Subscriber

      Hello Everyone,

      so I want to add a new material to Lumerical FDE using python commands.

      For better material fit I want to change the fitting tolerance, as described her:

      https://optics.ansys.com/hc/en-us/articles/360034915053

      When I try 

      mode.setmaterial(name, "tolerance", 0.2) 

      I get 

      "name 'tolerance' is not defined"

      The same procedure works for "max coefficients" perfectly fine.

      Please help,

      JuKA

       

    • Guilin Sun
      Ansys Employee

      Currently not everything can work in Pyton and Lumapi. May be you can request a feature here:

      New Feature vote:   Vote new features, and file your feature request

      alternative solution: fit the material in GUI manually and save it with a new material name. Then you can use this new material. This is better for you since such material fitting should be viewed before use. Using script does not guarantee the fitting result, eg, you will not be able to see if there is an artificial spike, or negative imaginary part. In addition, you only need to do this ONCE and you can use it later. This can also avoid any possibility that you accidently modify some fitting parameters.

      To keep this material, you can make a template file containing it, and always load it instead of creating a new project.

       

       

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