Version History


Version 7.22 (April 2021)

Modified Bobbert_Vlieger_BRDF_Model, Subsurface_Bobbert_Vlieger_BRDF_Model, Axisymmetric_Particle_BRDF_Model, and Subsurface_Axisymmetric_Particle_BRDF_Model by removing the functions PartialExtinctionS(double theta) and PartialExtinctionP(double theta) (which provided a partial extinction coefficient) and replaced them with a single function Specular(double theta) that returns the Mueller matrix specular reflectance or regular transmittance, calculated using the optical theorem.

Repaired errors in MuellerMatrix::valid() and MuellerMatrix::physically_valid().

Version 7.21 (February 2019)

Modified Polydisperse_Sphere_BRDF_Model to add a parameter fractional_coverage that, if non-zero, renormalizes the distribution to a given fractional coverage of spheres on the surface.

Modified CC1246E_SurfaceParticleSizeDistribution so that, the distribution is renormalized to the same fractional coverage of spheres on the surface (with sizes from 1 µm to 1000 µm) as when slope = 0.926 with the given value of cleanliness.

Version 7.20 (May 2018)

Added the model Polydisperse_Sphere_BRDF_Model, which uses Double_Interaction_BRDF_Model with MieScatterer and with a diameter distribution given by SurfaceParticleSizeDistribution. This model is useful for estimating scatter from contaminated surfaces.

The code for CrossRCW_Model can now accept anisotropic and magnetic media.

Added Rectangular_CrossGrating to the list of classes inheriting CrossGrating.

Models for size distributions were added:

Models for polarized phase functions were added:

Updated First_Diffuse_BRDF_Model to use Polarized_Phase_Function. Before, it assumed a Rayleigh-Gans-like polarization dependence to the phase function.

Version 7.22 (April 2021)

The model ZernikeExpansion_BRDF_Model was added.

Version 7.01 (September 2017)

Abstract class StackModel was created to give dielectric_stack the properties of a Model. Specific classes No_StackModel, Stack_StackModel, SingleFilm_StackModel, DoubleFilm_StackModel, and GradedFilm_StackModel implement specific film stack models. These models inherit Model, so they make it easier to parametrically vary parameters associated with a film stack. All scattering models that allowed for a dielectric_stack have been upgraded to use StackModel instead.

Added Legendre_Phase_Function to the list of classes inheriting Phase_Function.

Corrected some errors in the thread safety using mutexes.

Corrected some errors in coordinate systems for polarization in BRDF_Model.

Version 7.00 (January 2015)

An inconsistent use of the polarization basis set was found for TMatrix_Axisymmetric_Scatterer. This causes a problem when using Double_Interaction_BRDF_Model with this class and when evaluating the scatter out of the plane of incidence. This issue has been corrected.

Added the class Optically_Active_Sphere_Scatterer, which implements the Mie scattering solution for homogeneous sphere consisting of an optically active material.

Modified the codes for spherical Bessel functions to use the continued fraction method found in W.L. Lentz, "Generating Bessel function in Mie scattering calculations using continued fractions," Appl. Opt. 15, 668 (1978). These values improved the stability of some of the Mie calculations.

Added type=2 and type=3 codes to Transmit_BRDF_Model.

Modified Kubelka_Munk_Reflectance by changing the data type for absorption and scattering coeffients to Table and renaming the absorption coefficient from absorbance to absorption.

Added functionality for two more modes in BRDF_Model, where the light is assumed to be incident upon the surface from the substrate, rather than from the air. When BRDF_Model::type==0, light is incident from the ambient (air or vacuum) and the scattering is evaluated in reflection. When BRDF_Model::type==1, light is incident from the ambient (air or vacuum) and the scattering is evaluated in transmission (into the substrate, which must be non-absorbing). When BRDF_Model::type==2, light is incident from the substrate (which must be non-absorbing), and scattering is evaluated in reflection. Finally, When BRDF_Model::type==3, light is incident from the substrate (which must be non-absorbing), and the scattering is evaluated in transmission (towards the ambient). Not all models support all the modes. The following models now have all four modes:

Added Subsurface_Bobbert_Vlieger_BRDF_Model and Subsurface_Axisymmetric_Particle_BRDF_Model, which implement Bobbert_Vlieger_BRDF_Model and Axisymmetric_Particle_BRDF_Model, respectively, as subsurface geometries.

Added models Three_Source_BRDF_Model and Four_Source_BRDF_Model, which allow one to easily evaluate the sum of the BRDF for three or four models, respectively. In the past, one could daisy chain Two_Source_BRDF_Model, but that was fairly clumsy.

A new model, Rayleigh_Stack_BRDF_Model was added that calculates the scattering of a small sphere anywhere in, above, or below a film stack.

A new model, Growth_Roughness_Stack_BRDF_Model was added that calculates the scattering from a stack of films, the roughnesses of which are determined by a linear growth model.

The code for RCW_Model was extended to allow for diagonally anisotropic and magnetic media in all cases (in-plane and conical geometries). Gratings are defined using the Grating class.

The parameter oldmethod was removed from RCW_BRDF_Model and RCW_Model. This parameter used to disable the proper Fourier factorization.

Added intensity scaling factors (factor1 and factor2) for the two different models in Two_Source_BRDF_Model.

A number of changes have been made to Bobbert_Vlieger_BRDF_Model:

  • Any number of coatings are allowed on the sphere (in addition to any number of coatings on the substrate). As a result of this change, the parameters n3 and d were removed and replaced with dielectric_stack spherecoat.
  • Code for transmission (from vacuum to substrate), back-transmission (from the substrate to the vacuum), and back-reflection (from the substrate reflected back to the substrate) has been added.

The new class MultilayerCoatedMieScatterer was added. This class provides a solution to the scattering by a sphere with an arbitrary number of coatings.

Extended Focussed_Beam_Instrument_BRDF_Model and Finite_Aperture_Instrument_BRDF_Model to allow different orders of integration, from 1 to 7.

Added CrossRCW_Model which implements rigorous coupled wave (RCW) theory to crossed gratings. The gratings are defined by a class CrossGrating, and the RCW results are accessible through a BRDF model using CrossRCW_BRDF_Model.

Added functions for performing complex fast Fourier transforms (FFT) with arbitrary number of points. These functions are documented in the source code (fft.h and fft.cpp).

Added functions and classes for creating random numbers with different distributions, multivariate random numbers, and self-affine random curves. These functions and classes are documented in the source code (random.h and random.cpp).

Restructured how Grating works. Formerly, each child class was required to define several virtual functions, providing the Fourier factorization of each layer in the grating. This mode of operation was fine for RCW, but was difficult to handle if a spatial representation of the dielectric function was needed. Therefore, the new mode of operation is that each child class should, in setup(), fill vectors containing the dielectric functions, the location of transitions, and the thicknesses of the layers. The old method can still be used by overridering fourierx(...). A new volume grating Sinusoidal_Volume_Grating, for example, uses the old method of directly providing the fourier expansions.

MuellerMatrix and StokesVector now have member functions valid() which return true if the matrix or vector is a mapping from a Stokes space to itself and false if it is not. MuellerMatrix also has a member function physically_valid, which is a more stringent test, in which a Mueller matrix must be a convex sum of Jones-Mueller matrices to be physically valid.

Table has been signficantly reworked to allow more general functional behavior. Documentation for Table describes the different formats allowed. Note that dielectric_function uses Table, so that these changes affect that class as well. The new features include:

  • Tabulated data interpolation was enhanced to allow for linear (as before) or logarithmic (new) interpolation on the x and/or y axes, as well as spline and log-spline on the y axis. There are two subparameters to a Table, interpolationx and interpolationy, which can each be either lin, log, spline, or logspline.
  • A new file format was added to allow for functional definitions.
  • An inline function format was added.

RCW_BRDF_Model did not work in transmission mode under many conditions. The error was fixed.

An error was found in focussedbeam.cpp that caused Focussed_Beam_Instrument_BRDF_Model to not work for non-zero sample rotation. The error was fixed.

The Frames Based User Interface is no longer supported.

Editorial Update (September 2012)

The functionality of Version 6.01 remains the same, however minor editorial updates have been made. As a result, a new downloadable ".zip" file is now available.

Version 6.01 (May 2008)

An error was found in grating.cpp for Generic_Grating which caused an exception to be thrown under rare conditions indicating the grating was invalid. The error was fixed.

An #include <vector> was added to matrixmath.h to allow some routines to compile properly.

Version 6.00 (February 2008)

An abstract class Reflectance was created to handle the wavelength dependence of a diffuse scatterer. Reflectance is used by Lambertian_BRDF_Model and Diffuse_Subsurface_BRDF_Model, where beforehand the reflectance was described by a Table. Three different instantiable classes inherit the properties of Reflectance:

Support for rigorous coupled-wave (RCW) calculations for diffraction from gratings was added to the library. The following classes were added:

File access was improved by introduction of classes streambuf_with_comments, ifstream_with_comments, and istream_with_comments so that input files can have comments and redirection. These classes are documented in the header file scatmech.h. These classes are used by the standard input functions, dielectric_stack, Generic_Grating, dielectric_function, and Table.

A class Evaluator was introduced for evaluating arithmetic expressions. It is documented in header file scateval.h and source file scateval.cpp.

Return to top

Version 5.03 (August 2006)

An error was found in MieScatterer that affected the results for the cross section and efficiency functions, under certain conditions.

Return to top

Version 5.02 (July 2006)

New functions (e.g., rxnni(...) and rnni(...)) were added to dielectric_stack which return reflection and transmission coefficients as functions of internal incident angle, as opposed to vacuum angles.

Fixed an error in Model::set_parameter(const std::string& parameter, const COMPLEX& value) .

Modified Bobbert_Vlieger_BRDF_Model so that it can accept any stack of films on the substrate. This required changing the names of some of the parameters, since n1 was the original film dielectric function. Also removed code and options for saving the A-matrix, since it was incompatible with the new film stack code.

An error was found and fixed in the reading of dielectric stacks by Model::AskUser().

Return to top

Version 5.01 (October 2005)

An error was found and fixed in the evaluation of Elliptical_Mesa_PSD_Function.

Return to top

Version 5.00 (July 2005)

The class BRDF_Model requires virtual member functions jones() or mueller(). In past versions, these were functions of the direction, defined by thetai, thetas, and phis. In Version 5.00, these function have no arguments, but the variables thetai, thetas, phis, and rotation are defined before these functions are called.

Enhanced the following models:

Added Free Space Scatterers:

Added new BRDF models:

Free_Space_Scatterer now has lambda as a true parameter.

BRDF_Model now has a parameter rotation, which serves to rotate the sample about the surface normal.

Upgraded the run-time mechanism for the library. The changes simplify the administration of most classes inheriting Model. All models now define parameters using the DECLARE_PARAMETER(type,name) macro in the class declaration, and use the DEFINE_PARAMETER(class,type,name,descritpion,default) to define the variable instance. A number of functions are provided (see inherit.h) that enable a program to obtain a list of model inheriting another model, a list of parameters for any model, and information about those parameters. Model initialization is now automated, circumventing the need for each model to define a constructor or destructor. Lastly, the set_parameter(name,value) function is automated, so that this function need not be defined for every model.

Fixed a problem with the polar function for Vector3D, found for the .net version of Visual C++.

Fixed an error in MuellerPartialLinearPolarizer, which caused it to yield incorrect results.

Top of Page

Version 4.01 (June 2004)

Fixed an error in Finite_Aperture_BRDF_Model, which caused it to yield incorrect results in out of plane geometries.

Fixed an error in Uncorrelated_Roughness_BRDF_Model, which caused it to yield incorrect results.

Fixed some errors in the set_parameter function for Subsurface_Facet_BRDF_Model, Lambertian_BRDF_Model, and Rayleigh_Defect_BRDF_Model

Fixed a problem that caused comments to not be accepted in all conditions for console input.

Fixed a problem with some constructors and destructors by creating a virtual destructor for the class Model and by initializing some values in the copy constructor for Bobbert_Vlieger_BRDF_Model.

Top of Page

Version 4.00 (July 2003)

Several new BRDF models were added:

Several models now implement scattering in transmission mode:

A new class, CoatedMieScatterer, was added. It implements the Mie scattering theory for a coated sphere.

A fourth example, Example4, has been added to the set of example programs. This program is a Mie scattering program.

Renamed the class Torrance_Sparrow_BRDF_Model to Shadowed_Facet_BRDF_Model since the new name describes the model much better than the old one. Torrance and Sparrow derived a specific shadow function, and yet the model actually implemented the theory for any shadow function.

Renamed the class Spherical_Particle_BRDF_Model to Double_Interaction_BRDF_Model, and removed the subclasses (previously Rayleigh_Particle_BRDF_Model, Rayleigh_Gans_Particle_BRDF_Model, and Mie_Particle_BRDF_Model). The new class, Double_Interaction_BRDF_Model, which requires a SphericalScatterer, has the same functionality as the previous suite of classes.

Renamed the classes Null_PSD_Function, Null_Slope_Distribution_Function, and Null_Shadow_Function to Unit_PSD_Function, Unit_Slope_Distribution_Function, and Unit_Shadow_Function, respectively. The new names are more appropriate for their function.

Improved the methods by which inheritance structures are maintained:

  • The class Inheritance was significantly simplified and is no longer a templated class.
  • All classes in inheritance structures now inherit a class Model, which improves the reliability of the codes across platforms, by avoiding the use of void* pointers. All classes inheriting Model have a virtual function clone() which returns a pointer to a new copied instance of the class (a virtual copy constructor).
  • All classes inheriting Model no longer have a constructor taking an integral argument ask. Now, to query the user for parameters, the programmer must call the virtual function AskUser(). This change increases the flexibility that programmers can have regarding when models are initialized with parameters. Also, changed the macro Get_Named_Model (and the associated functions it called) so that it does not ask the user for model parameters.
  • A new template class Model_Ptr<model> was created to facilitate copying and cloning of classes. It behaves like a pointer to a model, except that it frees any allocated memory when it is destructed. It differs from the Standard Library's auto_ptr<model> template class in that it copies by cloning, rather than keeping track of ownership. Model_Ptr<model> also has functions for instantiating specific models.
  • In the past, many of the SCATMECH classes did not have copy constructors or assignment operators defined, even though pointers were used by them. As a result, some memory could have been lost under some conditions. This has been fixed in all of the SCATMECH classes that required explicit copy constructors and assignment operators.
  • Changed the registration process which records the inheritance structure of the models in order to reduce the size of executables that only need a small subset of SCATMECH codes. As a result, several files were added to the library.

Errors in Rayleigh_Defect_BRDF_Model and One_Layer_BRDF_Model were found and corrected. The resulting differential cross sections and BRDFs were off by a factor of the index of the medium surrounding the defect.

The code for Diffuse_Subsurface_BRDF_Model was modified to properly account for light which is reflected back into the material by the surface.

A number of classes did not have their function get_parameter declared virtual. This has been corrected.

Modified the function dielectric_stack::AskUser() so that films can be specified without a film specification file. See class dielectric_stack .

Removed the function JonesVector::operator*(const JonesMatrix& m) . The interpretation of left multiplication of a Jones matrix by a Jones vector is poorly defined.

Changed the improper conversion constructors, JonesMatrix(const MuellerMatrix& m) and StokesVector(const StokesVector& s), so that they are explicit constructors. This change avoids the accidental use of the improper conversions. See class JonesMatrix and class JonesVector.

Removed the MuellerMatrix(double x) constructor, and replaced its function with a new function MuellerDepolarizer(double x). Added the functions MuellerZero(), MuellerUnit(double x), and MuellerPartialPolarizer(double tmax, double tmin, double angle) . Also added functions which return a variety of common polarization states. See Common Optical Elements.

Created a function SCATMECH_message to handle all terminal output, and functions SCATMECH_set_istream, SCATMECH_set_ostream, and SCATMECH_delim to set the input stream, the output stream, and the delimator used for the input stream. These changes allow more flexibility to change the input and output streams. See User Interface Functions.

Removed the function read_stack_file() from the class dielectric_stack and replaced it with an equivalent static member function dielectric_stack::AskUser(const string& prompt,const string& deflt) . This change was made because the old function did not give a descriptive prompt, which made some uses of the function confusing. It also makes the library conform to the AskUser function convention of SCATMECH. See class dielectric_stack .

Changed the class dielectric_stack so that complex angles of incidence can be handled. This change was made for a future use, where evanescent fields are incident upon the surface. See class dielectric_stack .

Top of Page

Version 3.01 (May 2002)

Added a feature in all AskUser routines: redirection of the input stream to a file can be achieved by starting a response with "<" followed by a filename. Redirection continues until a line beginning with ">".

Corrected code in bobbert1.cpp , which affected the solution only for particles separated from the surface.

Corrected code in askuser.cpp in routine SCATMECH_set_streams.

Top of Page

Version 3.00 (December 2001)

Support for non-ANSI/ISO-compatable C++ compilers was removed. The class for complex numbers is now complex<double> , and the library uses the std namespace. The entire SCATMECH library is contained in the namespace SCATMECH. The SCATMECH namespace can be removed by setting the preprocessor variable NO_SCATMECH_NAMESPACE.

Three new light scattering models were added:

A new virtual class, Local_BRDF_Model, was created for all models which are best defined in terms of differential scattering cross-sections (DSCs) rather than bidirectional reflectance distribution functions (BRDFs). This class enables access to the Jones and Mueller matrix DSCs and provides the conversion from DSC to BRDF.

Three new virtual classes, with a number of inherited classes, were created to enable plug-in of new functional forms for the slope distribution function, the power spectral denstiy (PSD) function, and the shadow and obscuration function:

The functions BRDF_Model::jones and BRDF_Model::mueller were changed from public access to protected access.

The virtual class BRDF_Model has been modified by adding functions, BRDF_Model:: Jones and BRDF_Model::Mueller, that enable scattering models to be evaluated in different polarization coordinates. The commonly used s-p basis for describing polarization can be replaced with an x-y basis or one defined with respect to the plane including the incident and scattering directions. See Coordinate_System for more details. The default coordinate system is the s-p basis for both the incident and scattered directions.

Vector-based versions of BRDF_Model::Jones and BRDF_Model::Mueller were added to enable these functions to be evaluated when the directions of the source, viewer, and surface normal are known. These functions should improve the functionality of the library in rendering applications.

The following classes are new and allow the library to more easily calculate the wavelength dependence of optical properties:

  • Table -- This class stores a table of data, allowing for linear interpolation between points.
  • dielectric_function -- This class uses Table to store the wavelength dependence of the optical constants of a material.

The class Lambertian_BRDF_Model now uses Table to store the reflectance as a function of wavelength.

The following classes associated with the optical properties of materials were substantially changed:

  • dielectric_stack -- This class has changed to remove the wavelength as a property of the class and to use the class dielectric_function for storage of the optical properties of the layers. These changes facilitate the use of the class to study the wavelength dependence of reflection, when the optical constants of the film materials are not constant.
  • Thin_Film_Transfer_Matrix is now documented only in the source code.

All classes that used either the classes dielectric_constant, optical_constant, or dielectric_stack were modified to enable use of the class dielectric_function and the new version of dielectric_stack.

A new class, Slope_Distribution_Function, was added to enable the class Facet_BRDF_Model to have an arbitrary slope distribution function.

The class Facet_BRDF_Model was changed to inherit the properties of dielectric_stack. This change allows the theory to model a very rough surface with a conformal stack of dielectric layers. Also, an intermediate singularity existed for scattering in the retroreflection direction; this singularity was removed by forcing a small change in the scattering angle for such conditions.

The data type for character strings was changed from char* to the class std::string.

The classes Vector, CVector, Matrix, and CMatrix have been replaced by the templated classes Vector3D<TYPE> and Matrix3D<TYPE>. The documentation for these classes have been moved to the respective include files vector3d.h and matrix3d.h. The old classes continue to exist as typedefs.

The class BRDF_Model now defaults to BRDF_Model::type=BRDF_Model::REFLECTION.

The class SCATMECH_exception, which inherits std::exception, was created to enable exception handling. All fatal errors in the SCATMECH library now throw SCATMECH_exception.

Additional code was added to all of the BRDF_Model classes in order to enable the dynamic creation of a database of classes. With the new code, new classes can be created by a user and registered with the database, thus allowing the new classes to be incorporated more seamlessly into the library. Two source files, User/user.h and User/user.cpp, and a manual page "Writing your own BRDF_Model class" have been created to facilitate the creation of user-defined scattering models. The header file inherit.h defines and documents the Inheritance<Model,Parent> class which is used to tabulate the class inheritance structure.

Many classes have a new function, set_parameter, added to them that allows setting parameters by name. These functions pass requests to members and children, when appropriate.

Top of Page

Version 2.00 (March 2001)

Four new models were added:

The classes Spherical_Particle_BRDF_Model and Rayleigh_Defect_BRDF_Model each had a dielectric_stack as a member function. The classes now inherit the properties of dielectric_stack, allowing them to access all of the member functions of dielectric_stack.

Top of Page

Version 1.01 (July 2000)

SPHDFCT.CPP: An error was discovered in Rayleigh_Defect_BRDF_Model that affected the absolute BRDF, but not the polarization. The error was fixed. (11 April 2000).

RAYGDFCT.CPP, POLS.CPP: These files should not have been included in the distribution. The files have been removed. (22 June 2000).

CROUGH.CPP: An error was found in Correlated_Roughness_BRDF_Model. If the substrate index was real, the results were erroneous. The problem was traced to the wrong sign of a square root being used. The error was fixed. (30 June 2000).

Numerous files: The C++ scoping rules for "for" loops changed so that the "i" in "for (int i=0;i<n;++i)" now belongs to the loop, rather than the code that contains the loop. To maintain compatability with older versions of C++, most of the declarations were moved outside of the loop.

Numerous files: Some compilers have displayed errors with "COMPLEX(x)", when "x" is a double. This problem was fixed by changing all "COMPLEX(x)" to "(COMPLEX)(x)".

Top of Page


For More Information

SCATMECH Technical Information and Questions
Sensor Science Division Home Page
Sensor Science Division Inquiries
Website Comments

Current SCATMECH version: 7.22 (April 2021)