ReFRACtor
FullPhysics::SpectralRange Class Reference

We have a number of different spectrums that appear in different parts of the code. More...

#include <spectral_range.h>

+ Inheritance diagram for FullPhysics::SpectralRange:
+ Collaboration diagram for FullPhysics::SpectralRange:

Public Member Functions

 SpectralRange (const ArrayWithUnit< double, 1 > &Data)
 
 SpectralRange (const ArrayAd< double, 1 > &Data, const Unit &U)
 
 SpectralRange (const blitz::Array< double, 1 > &Data, const Unit &U)
 
 SpectralRange (const blitz::Array< double, 1 > &Data, const Unit &U, const blitz::Array< double, 1 > &Uncertainty)
 
 SpectralRange (const ArrayAd< double, 1 > &Data, const Unit &U, const blitz::Array< double, 1 > &Uncertainty)
 
 SpectralRange ()
 Default constructor needed for SWIG. More...
 
const SpectralRange clone () const
 Clones object into a new copy. More...
 
SpectralRange convert (const Unit &R) const
 Convert to given units. More...
 
const blitz::Array< double, 1 > & data () const
 Underlying data. More...
 
blitz::Array< double, 1 > & data ()
 Underlying data. More...
 
const ArrayAd< double, 1 > & data_ad () const
 Underlying data, possibly with a Jacobian. More...
 
ArrayAd< double, 1 > & data_ad ()
 Underlying data, possibly with a Jacobian. More...
 
SpectralRangeoperator= (const SpectralRange &V)
 Assignment operator so internals are correctly set. More...
 
void print (std::ostream &Os) const
 
std::string print_to_string () const
 Print to string. More...
 
const blitz::Array< double, 1 > & uncertainty () const
 Uncertainty. More...
 
const Unitunits () const
 Units of data. More...
 

Detailed Description

We have a number of different spectrums that appear in different parts of the code.

The spectrum may represent radiances, solar spectrum, solar absorption spectrum, etc. In addition to different units, the value may have a Jacobian associated with it (e.g., the results for RadiativeTransfer), or an uncertainty (e.g., the Level 1b data). For many purposes, it is convenient to treat these as essentially the same thing.

This class captures this behavior. The data can be accessed just as data, as data possibly with a Jacobian, and possibly with an associated uncertainty. The data will always be present, but depending on the type of Spectrum the uncertainty or jacobian may be zero size arrays, indicating they aren't present.

Similar to SpectralDomain, there doesn't seem to be a commonly used name for "stuff that is the Y-axis of a spectral plot". We use the name "SpectralRange" where "Range" is used like "Domain and Range" of a function. Perhaps a better name will arise and we can rename this class.

Note that there are a few closely related classes, with similar sounding names. See Spectrum related classes for a description of each of these.

Definition at line 34 of file spectral_range.h.

Constructor & Destructor Documentation

◆ SpectralRange() [1/6]

FullPhysics::SpectralRange::SpectralRange ( const ArrayWithUnit< double, 1 > &  Data)
inline

Definition at line 36 of file spectral_range.h.

◆ SpectralRange() [2/6]

FullPhysics::SpectralRange::SpectralRange ( const ArrayAd< double, 1 > &  Data,
const Unit U 
)
inline

Definition at line 38 of file spectral_range.h.

◆ SpectralRange() [3/6]

FullPhysics::SpectralRange::SpectralRange ( const blitz::Array< double, 1 > &  Data,
const Unit U 
)
inline

Definition at line 41 of file spectral_range.h.

◆ SpectralRange() [4/6]

FullPhysics::SpectralRange::SpectralRange ( const blitz::Array< double, 1 > &  Data,
const Unit U,
const blitz::Array< double, 1 > &  Uncertainty 
)
inline

Definition at line 44 of file spectral_range.h.

◆ SpectralRange() [5/6]

FullPhysics::SpectralRange::SpectralRange ( const ArrayAd< double, 1 > &  Data,
const Unit U,
const blitz::Array< double, 1 > &  Uncertainty 
)
inline

Definition at line 49 of file spectral_range.h.

◆ SpectralRange() [6/6]

FullPhysics::SpectralRange::SpectralRange ( )
inline

Default constructor needed for SWIG.

Definition at line 115 of file spectral_range.h.

Member Function Documentation

◆ clone()

const SpectralRange FullPhysics::SpectralRange::clone ( ) const
inline

Clones object into a new copy.

Definition at line 105 of file spectral_range.h.

◆ convert()

SpectralRange SpectralRange::convert ( const Unit R) const

Convert to given units.

Definition at line 19 of file spectral_range.cc.

◆ data() [1/2]

const blitz::Array<double, 1>& FullPhysics::SpectralRange::data ( ) const
inline

Underlying data.

Definition at line 71 of file spectral_range.h.

◆ data() [2/2]

blitz::Array<double, 1>& FullPhysics::SpectralRange::data ( )
inline

Underlying data.

Definition at line 77 of file spectral_range.h.

◆ data_ad() [1/2]

const ArrayAd<double, 1>& FullPhysics::SpectralRange::data_ad ( ) const
inline

Underlying data, possibly with a Jacobian.

The jacobian may have size 0.

Definition at line 84 of file spectral_range.h.

◆ data_ad() [2/2]

ArrayAd<double, 1>& FullPhysics::SpectralRange::data_ad ( )
inline

Underlying data, possibly with a Jacobian.

The jacobian may have size 0.

Definition at line 92 of file spectral_range.h.

◆ operator=()

SpectralRange& FullPhysics::SpectralRange::operator= ( const SpectralRange V)
inline

Assignment operator so internals are correctly set.

Definition at line 59 of file spectral_range.h.

◆ print()

void FullPhysics::SpectralRange::print ( std::ostream &  Os) const
inline

Definition at line 112 of file spectral_range.h.

◆ print_to_string()

std::string FullPhysics::Printable< SpectralRange >::print_to_string ( ) const
inlineinherited

Print to string.

This is primarily useful for SWIG wrappers to this class, e.g. a to_s method in ruby.

Definition at line 31 of file printable.h.

◆ uncertainty()

const blitz::Array<double, 1>& FullPhysics::SpectralRange::uncertainty ( ) const
inline

Uncertainty.

May be size 0 if we don't have an associated uncertainty.

Definition at line 99 of file spectral_range.h.

◆ units()

const Unit& FullPhysics::SpectralRange::units ( ) const
inline

Units of data.

Definition at line 110 of file spectral_range.h.


The documentation for this class was generated from the following files:

Copyright © 2017, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledged.
Generated Fri Aug 24 2018 15:44:13