Canoe
Comprehensive Atmosphere N' Ocean Engine
spectral_grid.hpp
Go to the documentation of this file.
1 #ifndef SRC_HARP_SPECTRAL_GRID_HPP_
2 #define SRC_HARP_SPECTRAL_GRID_HPP_
3 
4 // C/C++
5 #include <memory>
6 #include <string>
7 #include <utility>
8 #include <vector>
9 
11 struct SpectralBin {
12  Real rad, wav1, wav2, wght;
13 };
14 
17  public:
19  std::vector<SpectralBin> spec;
20 
24  std::string unit_type;
25 
28  std::pair<Real, Real> ReadRangeFrom(YAML::Node const& my);
29 };
30 
33  public:
34  RegularSpacingSpectralGrid(YAML::Node const& my);
35 };
36 
39  public:
40  CustomSpacingSpectralGrid(YAML::Node const& my);
41 };
42 
45  public:
46  CorrelatedKTableSpectralGrid(YAML::Node const& my);
47 };
48 
49 using SpectralGridPtr = std::shared_ptr<SpectralGridBase>;
50 
52  public:
53  static SpectralGridPtr CreateFrom(YAML::Node const& my);
54 };
55 
56 #endif // SRC_HARP_SPECTRAL_GRID_HPP_
Policy class for creating a correlated k-table spectral grid.
CorrelatedKTableSpectralGrid(YAML::Node const &my)
Policy class for creating a custom spacing spectral grid.
CustomSpacingSpectralGrid(YAML::Node const &my)
Policy class for creating a regular spacing spectral grid.
RegularSpacingSpectralGrid(YAML::Node const &my)
Base class for a collection of spectral grids.
std::string unit_type
defines the unit of the spectral grid
std::pair< Real, Real > ReadRangeFrom(YAML::Node const &my)
Read the spectral range from a YAML node.
std::vector< SpectralBin > spec
spectral grids
static SpectralGridPtr CreateFrom(YAML::Node const &my)
std::shared_ptr< SpectralGridBase > SpectralGridPtr
Smallest unit of a spectral grid.