OpticalFunction class¶
- class pySCATMECH.fresnel.OpticalFunction(name, iter=None)¶
Bases:
object
Class for handling optical functions.
- Parameters:
name (string, complex, float, or function returning complex or float) – The complex index of refraction. If a string, it can be a “(n,k)” pair or the name of a file containing a table of wavelengths, n, and k.
- nkstr(wavelength=1)¶
Evaluate the optical constants n and k at wavelength and returns a string that can be used by SCATMECH::dielectric_function.
- Parameters:
wavelength (float) – The wavelength
- Returns:
str
The complex optical constant as a string “(n,k)” or the name of
a file.
- writeToFile(filename, wavelengths)¶
Write the optical function to a file that can be used by SCATMECH routines as a SCATMECH::dielectric_function.
- Parameters:
filename (str) – The name of the file
wavelengths (iterable of float) – The wavelengths that will be written.
- Returns:
str
The filename, if successful,
(n,k) at the first wavelength if not successful