ReFRACtor
spectrum_sampling.h
Go to the documentation of this file.
1 #ifndef SPECTRUM_SAMPLING_H
2 #define SPECTRUM_SAMPLING_H
3 
4 #include "printable.h"
5 #include "spectral_domain.h"
6 #include "spectrum.h"
7 #include <blitz/array.h>
8 
9 namespace FullPhysics {
10 /****************************************************************/
18 class SpectrumSampling : public Printable<SpectrumSampling> {
19 public:
20  virtual ~SpectrumSampling() {}
21 
22 //-----------------------------------------------------------------------
24 //-----------------------------------------------------------------------
25 
26  int number_spectrometer() const { return nspectrometer; }
27 
28 //-----------------------------------------------------------------------
33 //-----------------------------------------------------------------------
34 
35  virtual SpectralDomain spectral_domain(int spec_index,
36  const SpectralDomain& Lowres_grid,
37  const DoubleWithUnit& Ils_half_width) const = 0;
38 
39 //-----------------------------------------------------------------------
43 //-----------------------------------------------------------------------
44 
46  const SpectralDomain& Lowres_grid,
47  const DoubleWithUnit& Ils_half_width) const
48  { return spectral_domain(Spec_index, Lowres_grid, Ils_half_width); }
49 
50 //-----------------------------------------------------------------------
53 //-----------------------------------------------------------------------
54 
55  virtual bool need_interpolation(int Spec_index) const { return false; }
56 
57 //-----------------------------------------------------------------------
59 //-----------------------------------------------------------------------
60 
61  virtual void print(std::ostream& Os) const {Os << "SpectrumSampling";}
62 
63 protected:
64 //-----------------------------------------------------------------------
66 //-----------------------------------------------------------------------
67  SpectrumSampling(int num_spectrometer) : nspectrometer(num_spectrometer) {}
68 
69 //-----------------------------------------------------------------------
71 //-----------------------------------------------------------------------
73 
74  int nspectrometer; //< Derived classes should set this.
75 };
76 }
77 #endif
virtual bool need_interpolation(int Spec_index) const
Indicate if spectral_domain and spectral_domain_interpolated are different at all.
For different instruments, it is more natural to either work with wavenumbers (e.g., GOSAT) or wavelength (e.g., OCO).
int number_spectrometer() const
Number of spectrometers we have.
This is a Mixin for classes that can be printed.
Definition: printable.h:24
virtual void print(std::ostream &Os) const
Print to stream.
This determines the sampling of the spectrum that should be used for each of the spectrum indexes...
SpectrumSampling()
Default constructor, derived classes should set nspectrometer.
We frequently have a double with units associated with it.
SpectrumSampling(int num_spectrometer)
Constructor.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
virtual SpectralDomain spectral_domain(int spec_index, const SpectralDomain &Lowres_grid, const DoubleWithUnit &Ils_half_width) const =0
Wavenumbers/Wavelengths to use for the given spectrometer.
virtual SpectralDomain spectral_domain_interpolated(int Spec_index, const SpectralDomain &Lowres_grid, const DoubleWithUnit &Ils_half_width) const
The interpolated spectral domain.

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