skOpticalProperties
2.1

#include <skphasematrix.h>
Public Member Functions  
skOpticalProperties ()  
bool  GetRotatedPhaseMatrix (double wavenum, double mu, double muprime, double dphi, skRTPhaseMatrix *rotatedmatrix, size_t threadindex) 
Returns the rotated phase matrix necessary for scattering. More...  
void  CheckCosineRange (double *mu) 
bool  IsDeltaFunctionForwardScatter () const 
Returns true if this crosssection has a delta function forward scatter element.  
virtual bool  SetAtmosphericState (skClimatology *neutralatmosphere, const GEODETIC_INSTANT &pt, bool *crosssectionschanged)=0 
Sets the atmospheric state and location for calculating crosssections, usually temperature, pressure and position. More...  
virtual bool  UpdateInternalClimatology (const GEODETIC_INSTANT &pt)=0 
virtual bool  CalculateCrossSections (double wavenumber, double *absxs, double *extxs, double *scattxs, size_t threadindex)=0 
Calculate crosssections at the specified wavenumber. More...  
virtual bool  CalculateCrossSectionsArray (const std::vector< double > &wavenumber, std::vector< double > *absxs, std::vector< double > *extxs, std::vector< double > *scattxs) 
Calculate crosssections at the specified array of wavenumbers. More...  
virtual bool  CalculatePhaseMatrix (double wavenumber, double cosscatterangle, skRTPhaseMatrix *phasematrix, size_t threadindex) 
Calculate the phase matrix at the specified wavenumber and scattering angle. More...  
virtual bool  IsScatterer () const =0 
Returns true if this particles scatters radiation.  
virtual bool  IsAbsorber () const =0 
Returns true if this particles absorbs radiation radiation.  
skOpticalProperties::skOpticalProperties  (  ) 
Initialize the base class. Initialize all numeric elements to zero and flag the class as dirty.
bool skOpticalProperties::GetRotatedPhaseMatrix  (  double  wavenum, 
double  mu,  
double  muprime,  
double  dphi,  
skRTPhaseMatrix *  rotatedmatrix,  
size_t  threadindex  
) 
Returns the rotated phase matrix necessary for scattering.
Get the phase matrix when the light is scattered from incoming zenith angle #muprime to outgoing zenith angle #mu and the change in azimuth is #dphi radians (outgoing azimuth  incoming azimuth). This applies all of the rotation matrices to ensure the Stokes vectors refer to the plane formed by the ray and the vertical. Dont ask about beams exactly in the vertical direction. I think the code fails. A description of what this code does can be found in Appendix A of reference 1.
mu  cosine of the outgoing zenith angle 
muprime  cosine of the incoming zenith angle 
dphi  The change in azimuth in radians: outgoing azimuth minus incoming azimuth in radians 
rotatedmatrix  Returns the phase matrix rproperly rotated so the reference polarization is in the zenith = 0 direction.t 
doi:10.1139/P01156
References skRTPhaseMatrix::ApplyStokesRotation(), CalculatePhaseMatrix(), CheckCosineRange(), and skRTPhaseMatrix::SetTo().
void skOpticalProperties::CheckCosineRange  (  double *  mu) 
Quick check to get rid of nasty round off issues in cos(zenith angle).
Referenced by GetRotatedPhaseMatrix().

pure virtual 
Sets the atmospheric state and location for calculating crosssections, usually temperature, pressure and position.
[NOT THREAD SAFE} Function that allows the optical properties class to update internal parameters in response to the caller changing geophysical location. This is provided so that radiative transfer models can manage crosssections that depend upon pressure and temperature. The user (eg the radiative transfer model) will usually call SetAtmosphericState before calling CalculateCrossSections.
neutralatmosphere  A climatology passed in by the user. The optical properties class can use this class if they wish to lookup parameters of interest. The climatology will usually support, pressure, temperature and density. 
pt  The time and location at which the next set of crosssections will be needed. Note that the height field in point will be valid (as this is often used to get the pressure and temperature). 
crosssectionschanged  returns true if the new geophysical location will cause a change in crosssection. Several species (eg Rayleigh scattering) are completely unaffected by changes in location. 
Implemented in skOpticalProperties_MultipleOverlappingSpectra, skOpticalProperties_Convolved, skOpticalProperties_O3_BassPaurQuadratic, skOpticalProperties_HenyeyGreenstein, skOpticalProperties_RayleighDryAir, skOpticalProperties_SimpleRayleigh, skOpticalProperties_TabulatedExtinction_HeightWavelength, skOpticalProperties_AerosolProfile, skOpticalProperties_UserDefinedAbsorption, skOpticalProperties_HitranChemical, skOpticalProperties_IceCrystal, skOpticalProperties_ConvolvedDiscreteWavelenCachedState, skOpticalProperties_TabulatedCrossSectionAndPhaseMatrix_BaumDB, skOpticalProperties_TabulatedPhaseMatrix_HeightWavelength, skOpticalProperties_MieAerosol, and skOpticalProperties_MartHybridProfile.
Referenced by skOpticalProperties_TabulatedPhaseMatrix_HeightWavelength::SetAtmosphericState(), skOpticalProperties_ConvolvedDiscreteWavelenCachedState::SetAtmosphericState(), skOpticalProperties_HenyeyGreenstein::SetAtmosphericState(), skOpticalProperties_Convolved::SetAtmosphericState(), and skOpticalProperties_MultipleOverlappingSpectra::SetAtmosphericState().

pure virtual 
Function that allows the optical properties class to update any internal climatologies it may be using. This is useful for optical properties that use internal climatologies to store various parameters (eg aerosols that store geographical distributions of mode radius and mode width). The call to UpdateInternalClimatology differs from SetAtmosphericState in its expected usage: a call to UpdateInternalClimatology configures internal climatologies so they can quickly service the many subsequent calls to SetAtmosphericState.
pt  The time and location at which the next set of crosssections will be needed. Note thatthe height field is usually ignored as all internal climatologies are expected to cache height profiles of their respective parameters. 
Implemented in skOpticalProperties_MultipleOverlappingSpectra, skOpticalProperties_Convolved, skOpticalProperties_O3_BassPaurQuadratic, skOpticalProperties_HenyeyGreenstein, skOpticalProperties_RayleighDryAir, skOpticalProperties_SimpleRayleigh, skOpticalProperties_TabulatedExtinction_HeightWavelength, skOpticalProperties_AerosolProfile, skOpticalProperties_UserDefinedAbsorption, skOpticalProperties_HitranChemical, skOpticalProperties_IceCrystal, skOpticalProperties_ConvolvedDiscreteWavelenCachedState, skOpticalProperties_TabulatedCrossSectionAndPhaseMatrix_BaumDB, skOpticalProperties_TabulatedPhaseMatrix_HeightWavelength, skOpticalProperties_MieAerosol, and skOpticalProperties_MartHybridProfile.
Referenced by skOpticalProperties_TabulatedPhaseMatrix_HeightWavelength::UpdateInternalClimatology(), skOpticalProperties_ConvolvedDiscreteWavelenCachedState::UpdateInternalClimatology(), skOpticalProperties_HenyeyGreenstein::UpdateInternalClimatology(), skOpticalProperties_Convolved::UpdateInternalClimatology(), and skOpticalProperties_MultipleOverlappingSpectra::UpdateInternalClimatology().

pure virtual 
Calculate crosssections at the specified wavenumber.
The main function of the class. The user calls this function so the optical properties object can calculate and update its three crosssections: absorption, scattering and extinction. The user may fetch the calculated crosssections by calling #AbsorptionCrossSection, #ScatteringCrossSection
and #ExtinctionCrossSection.
There is no requirement that the class generate physically meaningful crosssections where the sxtinction is the sum of the absorption and the scattering (although this will normally be the case)
Wellwritten classes will check that the user is not calling for a calculation under identical conditions.
wavenumber  The wavenumber (cm1) at which the calculations are required. 
absxs  Returns the absorption crosssection in cm2 
extxs  Returns the extinction crosssection in cm2 
scattxs  Returns the scattering crosssection in cm2 
threadid  Passes in the 0 based index of this thread. This is used by derived classes to store thread local storage. Default value is zero. 
Implemented in skOpticalProperties_MultipleOverlappingSpectra, skOpticalProperties_Convolved, skOpticalProperties_O3_BassPaurQuadratic, skOpticalProperties_HenyeyGreenstein, skOpticalProperties_RayleighDryAir, skOpticalProperties_SimpleRayleigh, skOpticalProperties_TabulatedExtinction_HeightWavelength, skOpticalProperties_AerosolProfile, skOpticalProperties_UserDefinedAbsorption, skOpticalProperties_HitranChemical, skOpticalProperties_IceCrystal, skOpticalProperties_ConvolvedDiscreteWavelenCachedState, skOpticalProperties_TabulatedCrossSectionAndPhaseMatrix_BaumDB, skOpticalProperties_MieAerosolCached, skOpticalProperties_TabulatedPhaseMatrix_HeightWavelength, skOpticalProperties_MieAerosol, and skOpticalProperties_MartHybridProfile.
Referenced by skOpticalProperties_TabulatedPhaseMatrix_HeightWavelength::CalculateCrossSections(), skOpticalProperties_AerosolProfile::CalculateCrossSections(), skOpticalProperties_HenyeyGreenstein::CalculateCrossSections(), and CalculateCrossSectionsArray().

virtual 
Calculate crosssections at the specified array of wavenumbers.
Calculate the crosssectios for an array of wavenumbers. The defualt implementation is a single threaded loop to calculate the crosssection for each wavenumber separately. Optimized versions, for Hitran and Voigt lineshapes for example, override this member and provide code optimized, multithreaded versions.
Reimplemented in skOpticalProperties_HitranChemical.
References CalculateCrossSections().

virtual 
Calculate the phase matrix at the specified wavenumber and scattering angle.
Set the extinction, ansorption and scattering crosssections.
Reimplemented in skOpticalProperties_MultipleOverlappingSpectra, skOpticalProperties_Convolved, skOpticalProperties_HenyeyGreenstein, skOpticalProperties_RayleighDryAir, skOpticalProperties_SimpleRayleigh, skOpticalProperties_AerosolProfile, skOpticalProperties_IceCrystal, skOpticalProperties_ConvolvedDiscreteWavelenCachedState, skOpticalProperties_TabulatedCrossSectionAndPhaseMatrix_BaumDB, skOpticalProperties_MieAerosolCached, skOpticalProperties_TabulatedPhaseMatrix_HeightWavelength, skOpticalProperties_MieAerosol, and skOpticalProperties_MartHybridProfile.
References skRTPhaseMatrix::At(), and skRTPhaseMatrix::SetTo().
Referenced by skOpticalProperties_ConvolvedDiscreteWavelenCachedState::CalculatePhaseMatrix(), skOpticalProperties_AerosolProfile::CalculatePhaseMatrix(), skOpticalProperties_Convolved::CalculatePhaseMatrix(), and GetRotatedPhaseMatrix().