ReFRACtor
|
This is an implementation of a SpectralWindow that covers a fixed window. More...
#include <spectral_window_range.h>
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... | |
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.
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
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.
FullPhysics::SpectralWindowRange::SpectralWindowRange | ( | const ArrayWithUnit< double, 3 > & | Microwindow_ranges, |
const blitz::Array< T, 2 > & | Bad_sample_mask | ||
) |
|
inlinevirtual |
Definition at line 27 of file spectral_window_range.h.
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.
|
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 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.
|
inline |
Definition at line 47 of file spectral_window_range.h.
|
inline |
Definition at line 49 of file spectral_window_range.h.
|
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.
|
inline |
Definition at line 36 of file spectral_window_range.h.
|
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.
|
inlinevirtual |
Number of spectrometers.
Implements FullPhysics::SpectralWindow.
Definition at line 39 of file spectral_window_range.h.
|
virtual |
Print to a stream.
Reimplemented from FullPhysics::SpectralWindow.
Definition at line 154 of file spectral_window_range.cc.
|
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.
|
inline |
Definition at line 44 of file spectral_window_range.h.
|
inline |
Definition at line 45 of file spectral_window_range.h.
|
virtual |
Bounds of spectral window.
Implements FullPhysics::SpectralWindow.
Definition at line 79 of file spectral_window_range.cc.