WSF
SOSM_SpectralObject Class Reference

#include <SOSM_SpectralObject.hpp>

Inheritance diagram for SOSM_SpectralObject:

Public Types

enum  Status { cOK = 0 , cINCOMPATIBLE_INCREMENTS , cINCOMPATIBLE_ORIGINS }
 Return value from 'UnionOf'. More...

Public Member Functions

 SOSM_SpectralObject ()
 SOSM_SpectralObject (float aOrigin, float aIncrement, int aCount)
virtual ~SOSM_SpectralObject ()
float Origin () const
 Return the origin (wavenumber, cm-1) of the first sample point.
float Increment () const
int Count () const
void DefineSpectralLimits (float aOrigin, float aIncrement, int aCount)
void DefineSpectralLimits (const SOSM_SpectralObject &aSource)
bool Equals (const SOSM_SpectralObject &aRhs) const
 Do this object and another object have the same spectral limits?
Status Union (const SOSM_SpectralObject &aObject)
Status Union (const SOSM_SpectralObject &aObject1, const SOSM_SpectralObject &aObject2)

Static Public Member Functions

static std::string StatusString (Status aStatus)

The declared wavelength limits of a sensor object.

This is technically only for sensor objects and is used to record the user-defined wavelength limits to which the sensor is sensitive. These limits may be different that the wavelengths that correspond to the discrete limits defined by Origin(), Count() and Increment().

This is a bit of a hack and is really only used for sensor objects, and even then it is applied only when the 'constant intensity' simple target model is being used.

float LowerWavelength () const
float UpperWavelength () const
void SetWavelengthLimits (float aLowerWavelength, float aUpperWavelength)

Detailed Description

A class that represents 'spectral' object.

This class is the base class for a 'spectral object'. A 'spectral object' is a sensor, target or atmospheric model that whose spectral range is represented one of two ways:

  • A continuous spectrum model.
  • A discrete spectrum model.

In the case of the discrete spectrum model, the range is represented by a set of sample points where each sample is separated by a constant number of wavenumbers. The spectral extent is characterized by three values:

  • The 'origin', or the wavenumber of the first sample point.
  • The 'increment' between each sample point.
  • The 'count' or number of sample points.

Within SOSM, the sensor model in always discrete, but the target or atmospheric model may be either.

Member Enumeration Documentation

◆ Status

Return value from 'UnionOf'.

Enumerator
cOK 
cINCOMPATIBLE_INCREMENTS 
cINCOMPATIBLE_ORIGINS 

Constructor & Destructor Documentation

◆ SOSM_SpectralObject() [1/2]

◆ SOSM_SpectralObject() [2/2]

SOSM_SpectralObject::SOSM_SpectralObject ( float aOrigin,
float aIncrement,
int aCount )
inline

◆ ~SOSM_SpectralObject()

virtual SOSM_SpectralObject::~SOSM_SpectralObject ( )
inlinevirtual

Member Function Documentation

◆ Count()

◆ DefineSpectralLimits() [1/2]

void SOSM_SpectralObject::DefineSpectralLimits ( const SOSM_SpectralObject & aSource)
inline

Define the spectral limits of the object. This is just like an assignment operator, but it is more explicit when this or the source are derived classes (eliminates casting).

Parameters
aSourceThe spectral object whose definition is to be assigned to this object.

References SOSM_SpectralObject().

◆ DefineSpectralLimits() [2/2]

void SOSM_SpectralObject::DefineSpectralLimits ( float aOrigin,
float aIncrement,
int aCount )
inline

Define the spectral limits of the object.

Parameters
aOriginThe wavenumber (cm-1) of the first point in the spectrum.
aIncrementThe increment between each sample point in spectrum (wavenumbers, cm-1)
aCountThe number of sample points in the spectrum.

Referenced by SOSM_Sensor::InputComplete(), SOSM_TableAtmosphere::InputComplete(), SOSM_TableTarget::Band::InputComplete(), SOSM_TableTarget::InputComplete(), SOSM_TableTarget::TT_State::InputComplete(), SOSM_SpectralTable2D::LoadTextFile(), SOSM_SpectralTable3D::LoadTextFile(), SOSM_BinaryIO::ReadSpectralObject(), and Union().

◆ Equals()

bool SOSM_SpectralObject::Equals ( const SOSM_SpectralObject & aRhs) const
inline

Do this object and another object have the same spectral limits?

References SOSM_SpectralObject().

Referenced by SOSM_TableAtmosphere::InputComplete().

◆ Increment()

float SOSM_SpectralObject::Increment ( ) const
inline

Return the increment between each sample point (wavenumber, cm-1) The return value is zero if the object is not represented with a discrete spectrum.

Referenced by SOSM_BlackBody::ComputeRadiantExitance(), SOSM_Sensor::ComputeTargetIrradiance(), SOSM_Sensor::Initialize(), WsfSOSM_Sensor::SOSM_Mode::Initialize(), SOSM_Selector::Intersect(), Union(), and SOSM_BinaryIO::WriteSpectralObject().

◆ LowerWavelength()

float SOSM_SpectralObject::LowerWavelength ( ) const
inline

◆ Origin()

float SOSM_SpectralObject::Origin ( ) const
inline

◆ SetWavelengthLimits()

void SOSM_SpectralObject::SetWavelengthLimits ( float aLowerWavelength,
float aUpperWavelength )
inline

◆ StatusString()

std::string SOSM_SpectralObject::StatusString ( Status aStatus)
static

Return the string associated with the supplied status value.

Parameters
aStatusThe Status enumeration value whose string value is to be returned.
Returns
The string associated with the supplied Status value.

References cINCOMPATIBLE_INCREMENTS, cINCOMPATIBLE_ORIGINS, and cOK.

Referenced by SOSM_TableTarget::Band::InputComplete(), and SOSM_TableTarget::TT_State::InputComplete().

◆ Union() [1/2]

SOSM_SpectralObject::Status SOSM_SpectralObject::Union ( const SOSM_SpectralObject & aObject)

Compute the union of this and another spectral object.

This method assigns 'this' to be the maximum spectral extent (the union) of this and the supplied object.

Parameters
aObjectThe other spectral object.
Returns
a Status indicating the success or failure of the union.

References SOSM_SpectralObject(), and Union().

Referenced by SOSM_TableTarget::Band::InputComplete(), SOSM_TableTarget::TT_State::InputComplete(), and Union().

◆ Union() [2/2]

SOSM_SpectralObject::Status SOSM_SpectralObject::Union ( const SOSM_SpectralObject & aObject1,
const SOSM_SpectralObject & aObject2 )

Determine the union of two spectral objects.

This method updates 'this' to be the maximum spectral extent of two supplied objects. The two objects must have the same increment and must have compatible origins.

Parameters
aObject1The first spectral object.
aObject2The second spectral object.
Returns
a Status indicating the success or failure of the union.
Note
It is safe to pass the result object as either of the arguments.

References cINCOMPATIBLE_INCREMENTS, cINCOMPATIBLE_ORIGINS, cOK, Count(), DefineSpectralLimits(), Increment(), Origin(), and SOSM_SpectralObject().

◆ UpperWavelength()

float SOSM_SpectralObject::UpperWavelength ( ) const
inline

The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved