class dielectric_functionThis class handles the storage of the wavelength dependence of the optical constants of a material. The optical constants are internally stored as a lookup table of optical constants n and k, using two elements of the class Table. The optical constants can be assigned values with a single pair of constants (n and k) or from a text file. See Table for information about the format of the text file. The wavelengths are in column 1, the values of n are in column 2, and the values of k are in column 3. Include file:#include "dielfunc.h" Source code:dielfunc.cpp See also:SCATMECH Home, Conventions, dielectric_constant, optical_constant, Table Definition of public elements:class dielectric_function { dielectric_function(); dielectric_function(const string& filename); dielectric_function(const optical_constant& nn); dielectric_function& operator=(const dielectric_function& df); void read(const string& filename); dielectric_constant epsilon(double lambda) const; optical_constant index(double lambda) const; double e1(double lambda) const; double e2(double lambda) const; double n(double lambda) const; double k(double lambda) const; static dielectric_function AskUser(const string& query, const string& deflt); static dielectric_function AskUser(const string& query, const optical_constant& deflt); void force_nonabsorbing(); void set_interpolationx(Table::InterpolationMode m); Table::InterpolationMode get_interpolationx(); void set_interpolationy(Table::InterpolationMode m); Table::InterpolationMode get_interpolationy(); }; dielectric_function()
|
|
Function that returns the dielectric_constant of the material at wavelength lambda.
Function that returns the optical_constant of the material at wavelength lambda.
Functions that return either the real part (ε1) or the imaginary part (ε2) of the dielectric constant, evaluated at wavelength lambda.
Functions that return either the real part (n) or the imaginary part (k) of the complex index of refraction, evaluated at wavelength lambda.
Functions that query the user using the standard input stream (cin) and the standard unbuffered error stream (cerr). The first argument is the query, while the second is the default response. If the second argument is a reference to a string, the default is interpreted as a filename. If the second argument is an optical_constant, the default is a constant function with that value. The response by the user can be either a filename or a value. If the response is a single number, it will assumed to be the real part of the optical constant, and the user will be asked for a second value, which will be interpreted as the imaginary part of the optical constant. If the initial response cannot be interpreted as a number, then the function will assume the response is the name of a file.
Examples:
dielectric_function eps; eps = dielectric_function::AskUser("Enter the optical constants","silicon.dat"); eps = dielectric_function::AskUser("Enter the optical constants again",optical_constant(4.15,0.05));See Console Interface for more information.
This function forces the material to be non-absorbing by setting the imaginary part of the index of refraction to zero.
Functions to set and get the interpolation mode for each of the axes of the Table. By default, a Table is interpolated linearly. Other The independent variable (x) may be interpolated linearly (LIN) or logarithmically (LOG). The dependet variable (y) may be interpolated linearly (LIN), logarithmically (LOG), as a cubic spline (SPLINE), or as a cubic spline on a logarithmic scale (LOGSPLINE).
SCATMECH Technical Information and Questions
Sensor Science Division Home Page
Sensor Science Division Inquiries
Website Comments
Current SCATMECH version: 7.22 (April 2021)