We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.

Ansys Learning Forum Forums Discuss Simulation Photonics Import material .txt file with script Reply To: Import material .txt file with script

tim.fuhrmann
Subscriber

Hello,
Thank you for your reply. 
I am using the complex data. However, I have the following problem, when using the setmaterial function:

  • My data has three columns: wavelength, real part of the index, and imaginary part of the index
  • setmaterial with the property name "sampled data" only takes 2 or 4 inputs.
  • If I use only two,I don't get the imaginary part, if I take 4, even though I have only 3 in my data set (I set the last column to zero), I get wrong material parameters

Thank you for your help and best regrds,
TimÂ