|
Open PaperOpt
|
#include <HomogeneousLayer.h>


Public Member Functions | |
| TableLookUpLayer () | |
| ~TableLookUpLayer () | |
| TableLookUpLayer (Array2D< float > *transMat, StructureObject *prevStructureObject, std::vector< float > &rLambda) | |
| virtual int | Process (WavePacket &wp, int up_down, int internal) const |
Protected Member Functions | |
| double | Interp (double X1, double X2, double Y1, double Y2, double X) const |
Protected Attributes | |
| Array2D< float > * | mTransMatrix |
This class represents a layer that reflects and transmitt light according to predefined transmittance and/or transmittance values tabulated as function of incident angle onto the layer, and wavelength. No layer boundary scattering is performed, therefore the layer has no refractive index Upon reflectance or transmittance, the wave packet will jump over the next surface and go directly to the next layer. Reflection is specular, transmission does not change the direction of the wave packet. The layer has zero thickness and must be delimited by two surface of equal constant height map (flat topography and same z-offset) TODO: test with SurfaceTNSubflat
| TableLookUpLayer::TableLookUpLayer | ( | ) |
| TableLookUpLayer::~TableLookUpLayer | ( | ) |
| TableLookUpLayer::TableLookUpLayer | ( | Array2D< float > * | transMat, |
| StructureObject * | prevStructureObject, | ||
| std::vector< float > & | rLambda | ||
| ) |
Constructor. Takes the input transmittance matrix and interpolate it for the simulated wavelenghts
| transMat | pointer to the transmittance matrix. |
| prevStructureObject | pointer to the previous paper object. |
| rLambda | the simulated wavelengths. |
Set object type so that no surface scattering at layer boundary is performed
Interpolate the transmission matrix for the simulated incident wavelenghts

| double TableLookUpLayer::Interp | ( | double | X1, |
| double | X2, | ||
| double | Y1, | ||
| double | Y2, | ||
| double | X | ||
| ) | const [protected] |
Linear interpolation between two points If X<X1 returns Y1, if X>X2 returns Y2
NO extrapolation if outside, return extremes

| int TableLookUpLayer::Process | ( | WavePacket & | wp, |
| int | up_down, | ||
| int | internal | ||
| ) | const [virtual] |
Picks the wavelength of the wave packet and interpolate transmittance/reflectance for the incident angle onto the layer
| wp | the wave packet |
| up_down | 1 if wp going up, -1 if wp going down |
| internal | tells if the wave packet should start within layer or if layer boundary should be applied first. Always 1 for this layer |
Find the nearest incident cosine angle and interpolate for incident angle First row is wavelengths and first columns is incident angle in radians
Get the transmittance value
If reflected apply specular reflection return 1 ( going up), -1 (going down)
Implements StructureObject.

Array2D<float>* TableLookUpLayer::mTransMatrix [protected] |
The interpolated matrix of transmittance over incident angles and wavelengths