//****************************************************************************** //** SCATMECH: Polarized Light Scattering C++ Class Library //** //** File: finiteaperture.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 "scatmech.h" #include "finiteaperture.h" #include "focussedbeam.h" #include "askuser.h" namespace SCATMECH { // // Constructor... // Finite_Aperture_Instrument_BRDF_Model:: Finite_Aperture_Instrument_BRDF_Model() { model_cs = xyxy; // Added 15 June 2004 by TAG } MuellerMatrix Finite_Aperture_Instrument_BRDF_Model:: mueller() { synchronize(model); SETUP(); if (alpha==0.) return model->Mueller(thetai,thetas,phis,rotation,xyxy); // Modified 15 June 2004 by TAG MuellerMatrix m=MuellerZero(); for (int i=0;iMueller(thetai,thetas_,phis_,rotation,xyxy)*w*cos(thetas_); // Modified 15 June 2004 by TAG } return (m/cos(thetas)); } // // The following returns a unit vector, defined by the angles theta, phi, alpha, and beta: // Adds planar vector (alpha, beta) on unit sphere to vector (theta,phi). // Vector Finite_Aperture_Instrument_BRDF_Model:: four_angles(double theta,double phi,double alpha,double beta) { return Vector( cos(beta)*sin(alpha)*sin(phi) + cos(phi)*(cos(theta)*sin(alpha)*sin(beta) + cos(alpha)*sin(theta)), -(cos(beta)*cos(phi)*sin(alpha)) + sin(phi)*(cos(theta)*sin(alpha)*sin(beta) + cos(alpha)*sin(theta)), cos(alpha)*cos(theta) - sin(alpha)*sin(beta)*sin(theta)); } DEFINE_MODEL(Finite_Aperture_Instrument_BRDF_Model,Instrument_BRDF_Model, "Finite_Aperture_Instrument_BRDF_Model", "A BRDF model evaluated with a finite collection aperture."); DEFINE_PTRPARAMETER(Finite_Aperture_Instrument_BRDF_Model,BRDF_Model_Ptr,model,"BRDF Model to be integrated","Microroughness_BRDF_Model"); DEFINE_PARAMETER(Finite_Aperture_Instrument_BRDF_Model,double,alpha,"Opening half angle of detector [deg]","0"); }