ReFRACtor
ils_convolution.h
Go to the documentation of this file.
1 #ifndef ILS_CONVOLUTION_H
2 #define ILS_CONVOLUTION_H
3 #include "ils.h"
4 #include "ils_function.h"
5 #include "dispersion.h"
6 
7 namespace FullPhysics {
8  class HdfFile;
9 /****************************************************************/
14 class IlsConvolution : public Ils, public Observer<Dispersion> {
15 public:
16 //-----------------------------------------------------------------------
18 //-----------------------------------------------------------------------
20  const boost::shared_ptr<IlsFunction>& Ils_func,
21  const DoubleWithUnit&
22  Ils_half_width = DoubleWithUnit(20, units::inv_cm))
23  : disp(Disp), ils_func(Ils_func), ils_half_width_(Ils_half_width)
24  { disp->add_observer(*this); }
25 
26 //-----------------------------------------------------------------------
28 //-----------------------------------------------------------------------
29 
31  const boost::shared_ptr<IlsFunction>& Ils_func,
32  double Ils_half_width)
33  : disp(Disp), ils_func(Ils_func),
34  ils_half_width_(Ils_half_width, units::inv_cm)
35  { disp->add_observer(*this); }
36  virtual ~IlsConvolution() {}
37  virtual void notify_update(const Dispersion& D)
38  {
39  notify_update_do(*this);
40  }
41  virtual blitz::Array<double, 1> apply_ils
42  (const blitz::Array<double, 1>& High_resolution_wave_number,
43  const blitz::Array<double, 1>& High_resolution_radiance,
44  const std::vector<int>& Pixel_list) const;
46  (const blitz::Array<double, 1>& High_resolution_wave_number,
47  const ArrayAd<double, 1>& High_resolution_radiance,
48  const std::vector<int>& Pixel_list) const;
49  virtual void print(std::ostream& Os) const;
50  virtual std::string band_name() const {return ils_func->band_name(); }
51  virtual std::string hdf_band_name() const
52  { return ils_func->hdf_band_name();}
53  virtual SpectralDomain pixel_grid() const
54  { return disp->pixel_grid(); }
56  {return ils_half_width_;}
57  virtual void ils_half_width(const DoubleWithUnit& half_width)
58  {ils_half_width_ = half_width;}
59  virtual boost::shared_ptr<Ils> clone() const;
60 
61 //-----------------------------------------------------------------------
63 //-----------------------------------------------------------------------
64  boost::shared_ptr<IlsFunction> ils_function() const {return ils_func; }
65 
66 //-----------------------------------------------------------------------
68 //-----------------------------------------------------------------------
69  boost::shared_ptr<Dispersion> dispersion() const {return disp; }
70 
71 private:
74  DoubleWithUnit ils_half_width_;
75  double integrate(const blitz::Array<double, 1>& x,
76  const blitz::Array<double, 1>& y) const;
77  AutoDerivative<double> integrate(const blitz::Array<double, 1>& x,
78  const ArrayAd<double, 1>& y) const;
79 };
80 }
81 #endif
virtual void ils_half_width(const DoubleWithUnit &half_width)
Set the half width of the ILS.
IlsConvolution(const boost::shared_ptr< Dispersion > &Disp, const boost::shared_ptr< IlsFunction > &Ils_func, double Ils_half_width)
Constructor.
virtual void print(std::ostream &Os) const
This is a ILS where we use a Dispersion object to determine the wavenumbers of each pixel...
For different instruments, it is more natural to either work with wavenumbers (e.g., GOSAT) or wavelength (e.g., OCO).
boost::shared_ptr< Dispersion > dispersion() const
Underlying dispersion.
void notify_update_do(const Ils &Self)
Function to call to notify Observers of a state change.
Definition: observer.h:121
const Unit inv_cm("cm^-1", pow(cm, -1))
IlsConvolution(const boost::shared_ptr< Dispersion > &Disp, const boost::shared_ptr< IlsFunction > &Ils_func, const DoubleWithUnit &Ils_half_width=DoubleWithUnit(20, units::inv_cm))
Constructor.
virtual DoubleWithUnit ils_half_width() const
This is the half width of the ILS.
We frequently have a double with units associated with it.
virtual std::string band_name() const
Descriptive name of the band.
virtual blitz::Array< double, 1 > apply_ils(const blitz::Array< double, 1 > &High_resolution_wave_number, const blitz::Array< double, 1 > &High_resolution_radiance, const std::vector< int > &Pixel_list) const
Apply the ILS.
This class models an Instrument Line Shape (ILS).
Definition: ils.h:13
This class calculates the wavenumber for each pixel in a single band of an Instrument.
Definition: dispersion.h:12
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
boost::shared_ptr< IlsFunction > ils_function() const
Underlying IlsFunction.
virtual std::string hdf_band_name() const
In general, the name used in HDF files for a particular band is similar but not identical to the more...
virtual void notify_update(const Dispersion &D)
Called when the Observed object is updated.
virtual boost::shared_ptr< Ils > clone() const
Clone an Ils object.
Simple Mixin to be and Observer of another object of class T.
Definition: observer.h:29
virtual SpectralDomain pixel_grid() const
This is the pixel grid for each pixel.

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