//****************************************************************************** //** SCATMECH: Polarized Light Scattering C++ Class Library //** //** File: two_source.cpp //** //** Thomas A. Germer //** Optical Technology Division, National Institute of Standards and Technology //** 100 Bureau Dr. Stop 8443; Gaithersburg, MD 20899-8443 //** Phone: (301) 975-2876; FAX: (301) 975-6991 //** Email: thomas.germer@nist.gov //** //** Version: 6.00 (February 2008) //** //****************************************************************************** #include "two_source.h" using namespace std; namespace SCATMECH { MuellerMatrix Two_Source_BRDF_Model::mueller() { synchronize(source1); synchronize(source2); SETUP(); if (correlation==0) { return source1->Mueller(thetai,thetas,phis,rotation)+ source2->Mueller(thetai,thetas,phis,rotation); } JonesMatrix j1 = source1->Jones(thetai,thetas,phis,rotation); JonesMatrix j2 = source2->Jones(thetai,thetas,phis,rotation); return (1-correlation)*(MuellerMatrix(j1)+MuellerMatrix(j2)) +correlation*(MuellerMatrix(j1+j2)); } DEFINE_MODEL(Two_Source_BRDF_Model,BRDF_Model, "Two_Source_BRDF_Model","Sum of two BRDF models"); DEFINE_PTRPARAMETER(Two_Source_BRDF_Model,BRDF_Model_Ptr,source1,"First scattering source","Microroughness_BRDF_Model"); DEFINE_PTRPARAMETER(Two_Source_BRDF_Model,BRDF_Model_Ptr,source2,"Second scattering source","Microroughness_BRDF_Model"); DEFINE_PARAMETER(Two_Source_BRDF_Model,double,correlation,"Correlation coefficient","0"); }