ReFRACtor
FullPhysics::SpectralWindowRange Class Reference

This is an implementation of a SpectralWindow that covers a fixed window. More...

#include <spectral_window_range.h>

+ Inheritance diagram for FullPhysics::SpectralWindowRange:
+ Collaboration diagram for FullPhysics::SpectralWindowRange:

Public Member Functions

 SpectralWindowRange (const ArrayWithUnit< double, 3 > &Microwindow_ranges)
 Construct a new window from the supplied information. More...
 
template<class T >
 SpectralWindowRange (const ArrayWithUnit< double, 3 > &Microwindow_ranges, const blitz::Array< T, 2 > &Bad_sample_mask)
 
template<class T >
 SpectralWindowRange (const ArrayWithUnit< double, 3 > &Microwindow_ranges, const Array< T, 2 > &Bad_sample_mask)
 In addition to constructing the object using the microwindow ranges, adds a bad sample mask argument. More...
 
virtual ~SpectralWindowRange ()
 
SpectralDomain apply (const SpectralDomain &Grid, int Spec_index) const
 Apply a spectral window to a SpectralDomain, returning the possibly empty part of the domain that passes through the window. More...
 
Spectrum apply (const Spectrum &Spec, int Spec_index) const
 Apply a spectral window to a Spectrum, returning the possibly empty part of the spectrum that passes through the window. More...
 
const blitz::Array< bool, 2 > & bad_sample_mask () const
 
void bad_sample_mask (const blitz::Array< bool, 2 > &M)
 
const std::vector< boost::shared_ptr< Dispersion > > & dispersion () const
 The Dispersion is optional. More...
 
void dispersion (const std::vector< boost::shared_ptr< Dispersion > > &D)
 
virtual std::vector< int > grid_indexes (const SpectralDomain &Grid, int Spec_index) const
 Given a list of wavenumbers, this returns the indices that fall within the window. More...
 
virtual int number_spectrometer () const
 Number of spectrometers. More...
 
void print (std::ostream &Os) const
 Print to a stream. More...
 
std::string print_to_string () const
 Print to string. More...
 
const ArrayWithUnit< double, 3 > & range_array () const
 
void range_array (const ArrayWithUnit< double, 3 > &Ran)
 
virtual SpectralBound spectral_bound () const
 Bounds of spectral window. More...
 

Detailed Description

This is an implementation of a SpectralWindow that covers a fixed window.

The window can be made up of multiple microwindow ranges if desired. It can also include a bad pixel mask.

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 20 of file spectral_window_range.h.

Constructor & Destructor Documentation

◆ SpectralWindowRange() [1/3]

SpectralWindowRange::SpectralWindowRange ( const ArrayWithUnit< double, 3 > &  Microwindow_ranges)

Construct a new window from the supplied information.

We take an array, which is number_spectrometer x number_microwindow x

  1. For a particular microwindow, we have 2 values, a lower and upper range.

Note that we require the number of microwindows to be same for all the spectrometers. This is just for convenience, it makes a simpler interface. It is perfectly ok to have microwindow with ranges of 0 to 0 - so you can simple set the number of microwindows to whatever the maximum number is and use null range microwindows for microwindows that aren't needed.

Definition at line 38 of file spectral_window_range.cc.

◆ SpectralWindowRange() [2/3]

template<class T >
FullPhysics::SpectralWindowRange::SpectralWindowRange ( const ArrayWithUnit< double, 3 > &  Microwindow_ranges,
const blitz::Array< T, 2 > &  Bad_sample_mask 
)

◆ ~SpectralWindowRange()

virtual FullPhysics::SpectralWindowRange::~SpectralWindowRange ( )
inlinevirtual

Definition at line 27 of file spectral_window_range.h.

◆ SpectralWindowRange() [3/3]

template<class T >
FullPhysics::SpectralWindowRange::SpectralWindowRange ( const ArrayWithUnit< double, 3 > &  Microwindow_ranges,
const Array< T, 2 > &  Bad_sample_mask 
)

In addition to constructing the object using the microwindow ranges, adds a bad sample mask argument.

The bad sample mask is sized num_bands x num_samples. A value of true in the array means the sample is marked as bad.

Definition at line 59 of file spectral_window_range.cc.

Member Function Documentation

◆ apply() [1/2]

SpectralDomain SpectralWindow::apply ( const SpectralDomain Grid,
int  Spec_index 
) const
inherited

Apply a spectral window to a SpectralDomain, returning the possibly empty part of the domain that passes through the window.

Definition at line 20 of file spectral_window.cc.

◆ apply() [2/2]

Spectrum SpectralWindow::apply ( const Spectrum Spec,
int  Spec_index 
) const
inherited

Apply a spectral window to a Spectrum, returning the possibly empty part of the spectrum that passes through the window.

Definition at line 41 of file spectral_window.cc.

◆ bad_sample_mask() [1/2]

const blitz::Array<bool, 2>& FullPhysics::SpectralWindowRange::bad_sample_mask ( ) const
inline

Definition at line 47 of file spectral_window_range.h.

◆ bad_sample_mask() [2/2]

void FullPhysics::SpectralWindowRange::bad_sample_mask ( const blitz::Array< bool, 2 > &  M)
inline

Definition at line 49 of file spectral_window_range.h.

◆ dispersion() [1/2]

const std::vector<boost::shared_ptr<Dispersion> >& FullPhysics::SpectralWindowRange::dispersion ( ) const
inline

The Dispersion is optional.

If supplied, we can convert from sample_index to wavelength/wavenumber.

Definition at line 34 of file spectral_window_range.h.

◆ dispersion() [2/2]

void FullPhysics::SpectralWindowRange::dispersion ( const std::vector< boost::shared_ptr< Dispersion > > &  D)
inline

Definition at line 36 of file spectral_window_range.h.

◆ grid_indexes()

std::vector< int > SpectralWindowRange::grid_indexes ( const SpectralDomain Grid,
int  Spec_index 
) const
virtual

Given a list of wavenumbers, this returns the indices that fall within the window.

Implements FullPhysics::SpectralWindow.

Definition at line 114 of file spectral_window_range.cc.

◆ number_spectrometer()

virtual int FullPhysics::SpectralWindowRange::number_spectrometer ( ) const
inlinevirtual

Number of spectrometers.

Implements FullPhysics::SpectralWindow.

Definition at line 39 of file spectral_window_range.h.

◆ print()

void SpectralWindowRange::print ( std::ostream &  Os) const
virtual

Print to a stream.

Reimplemented from FullPhysics::SpectralWindow.

Definition at line 154 of file spectral_window_range.cc.

◆ print_to_string()

std::string FullPhysics::Printable< SpectralWindow >::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.

◆ range_array() [1/2]

const ArrayWithUnit<double, 3>& FullPhysics::SpectralWindowRange::range_array ( ) const
inline

Definition at line 44 of file spectral_window_range.h.

◆ range_array() [2/2]

void FullPhysics::SpectralWindowRange::range_array ( const ArrayWithUnit< double, 3 > &  Ran)
inline

Definition at line 45 of file spectral_window_range.h.

◆ spectral_bound()

SpectralBound SpectralWindowRange::spectral_bound ( ) const
virtual

Bounds of spectral window.

Implements FullPhysics::SpectralWindow.

Definition at line 79 of file spectral_window_range.cc.


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