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.