ReFRACtor
FullPhysics::NonuniformSpectrumSampling Class Reference

This is a simple SpectrumSampling that is just a nonuniform sampling. More...

#include <nonuniform_spectrum_sampling.h>

+ Inheritance diagram for FullPhysics::NonuniformSpectrumSampling:
+ Collaboration diagram for FullPhysics::NonuniformSpectrumSampling:

Public Member Functions

 NonuniformSpectrumSampling (const SpectralDomain &Grid, const boost::shared_ptr< SpectrumSampling > &Interpolated_sampling)
 Constructor. More...
 
 NonuniformSpectrumSampling (const SpectralDomain &Grid1, const SpectralDomain &Grid2, const SpectralDomain &Grid3, const boost::shared_ptr< SpectrumSampling > &Interpolated_sampling)
 Constructor for 3 spectrum (this is a useful case, because it matches GOSAT) More...
 
virtual ~NonuniformSpectrumSampling ()
 
virtual bool need_interpolation (int Spec_index) const
 Indicate if spectral_domain and spectral_domain_interpolated are different at all. More...
 
int number_spectrometer () const
 Number of spectrometers we have. More...
 
virtual void print (std::ostream &Os) const
 Print to stream. More...
 
std::string print_to_string () const
 Print to string. More...
 
virtual SpectralDomain spectral_domain (int spec_index, const SpectralDomain &Lowres_grid, const DoubleWithUnit &Ils_half_width) const
 Wavenumbers/Wavelengths to use for the given spectrometer. More...
 
virtual SpectralDomain spectral_domain_interpolated (int Spec_index, const SpectralDomain &Lowres_grid, const DoubleWithUnit &Ils_half_width) const
 The interpolated spectral domain. More...
 

Protected Attributes

int nspectrometer
 

Detailed Description

This is a simple SpectrumSampling that is just a nonuniform sampling.

We have an underlying Interpolated_sampling that we will interpolate (by interpolate_spectrum).

The input Grid might not overlap the Interpolated_sampling grid. It might cover a larger area, or it might not exactly line up with the Interpolated_sampling. To reduce interpolation errors and also to avoid doing unnecessary calculations (e.g., the Grid is larger than Interpolated_sampling), we have spectrum_domain return only a subset of the Interpolated_sampling. We take each Grid point and find the closest Interpolated_sampling and return that. Note that more than one Grid point might be closest to a single Interpolated_sampling, which means that we may return a spectral domain smaller than the Interpolated_sampling.

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 31 of file nonuniform_spectrum_sampling.h.

Constructor & Destructor Documentation

◆ NonuniformSpectrumSampling() [1/2]

NonuniformSpectrumSampling::NonuniformSpectrumSampling ( const SpectralDomain Grid,
const boost::shared_ptr< SpectrumSampling > &  Interpolated_sampling 
)

Constructor.

This creates a grid with no assumption made on the uniformity of the spacing.

Definition at line 26 of file nonuniform_spectrum_sampling.cc.

◆ NonuniformSpectrumSampling() [2/2]

NonuniformSpectrumSampling::NonuniformSpectrumSampling ( const SpectralDomain Grid1,
const SpectralDomain Grid2,
const SpectralDomain Grid3,
const boost::shared_ptr< SpectrumSampling > &  Interpolated_sampling 
)

Constructor for 3 spectrum (this is a useful case, because it matches GOSAT)

Definition at line 40 of file nonuniform_spectrum_sampling.cc.

◆ ~NonuniformSpectrumSampling()

virtual FullPhysics::NonuniformSpectrumSampling::~NonuniformSpectrumSampling ( )
inlinevirtual

Definition at line 40 of file nonuniform_spectrum_sampling.h.

Member Function Documentation

◆ need_interpolation()

virtual bool FullPhysics::NonuniformSpectrumSampling::need_interpolation ( int  Spec_index) const
inlinevirtual

Indicate if spectral_domain and spectral_domain_interpolated are different at all.

Reimplemented from FullPhysics::SpectrumSampling.

Definition at line 51 of file nonuniform_spectrum_sampling.h.

◆ number_spectrometer()

int FullPhysics::SpectrumSampling::number_spectrometer ( ) const
inlineinherited

Number of spectrometers we have.

Definition at line 26 of file spectrum_sampling.h.

◆ print()

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

Print to stream.

Reimplemented from FullPhysics::SpectrumSampling.

Definition at line 65 of file nonuniform_spectrum_sampling.cc.

◆ print_to_string()

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

◆ spectral_domain()

SpectralDomain NonuniformSpectrumSampling::spectral_domain ( int  spec_index,
const SpectralDomain Lowres_grid,
const DoubleWithUnit Ils_half_width 
) const
virtual

Wavenumbers/Wavelengths to use for the given spectrometer.

We pass in the low resolution grid that we are going to generate after the ILS convolution, along with the ILS half width so we can generate the high resolution points needed to supply the ILS.

Implements FullPhysics::SpectrumSampling.

Definition at line 85 of file nonuniform_spectrum_sampling.cc.

◆ spectral_domain_interpolated()

virtual SpectralDomain FullPhysics::NonuniformSpectrumSampling::spectral_domain_interpolated ( int  Spec_index,
const SpectralDomain Lowres_grid,
const DoubleWithUnit Ils_half_width 
) const
inlinevirtual

The interpolated spectral domain.

The default is that this is just the same as spectral_domain, but derived classes can supply a different implementation if it is doing nonuniform sampling.

Reimplemented from FullPhysics::SpectrumSampling.

Definition at line 42 of file nonuniform_spectrum_sampling.h.

Member Data Documentation

◆ nspectrometer

int FullPhysics::SpectrumSampling::nspectrometer
protectedinherited

Definition at line 74 of file spectrum_sampling.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