ReFRACtor
fluorescence_effect.h
Go to the documentation of this file.
1 #ifndef FLUOR_EFFECT_IMP_BASE_H
2 #define FLUOR_EFFECT_IMP_BASE_H
3 
4 #include <boost/lexical_cast.hpp>
5 #include <boost/shared_ptr.hpp>
6 
8 #include "atmosphere_oco.h"
9 #include "stokes_coefficient.h"
10 
11 namespace FullPhysics {
12 /****************************************************************/
18 public:
19  FluorescenceEffect(const blitz::Array<double, 1>& Coeff,
20  const blitz::Array<bool, 1>& Used_flag,
22  const boost::shared_ptr<StokesCoefficient>& Stokes_coef,
23  const DoubleWithUnit& Lza,
24  const int Spec_index,
25  const DoubleWithUnit& Reference,
26  const Unit& Retrieval_unit);
27 
28  virtual void apply_effect(Spectrum& Spec,
29  const ForwardModelSpectralGrid& Forward_model_grid) const;
30  virtual ArrayAd<double, 1> contribution() const { return f_contrib_ad; }
31 
33 
34  virtual std::string sub_state_identifier() const { return "fluorescence"; }
35 
36  virtual std::string state_vector_name_i(int i) const
37  { return "Fluorescence Surface Coefficient " + boost::lexical_cast<std::string>(i + 1); }
38  virtual void print(std::ostream& Os) const;
39 
40  virtual std::string name() const { return "fluorescence_effect"; }
41 
42  //-----------------------------------------------------------------------
44  //-----------------------------------------------------------------------
45 
46  double fluorescence_at_reference() const { return coeff.value()(0); }
47 
48  //-----------------------------------------------------------------------
50  //-----------------------------------------------------------------------
51 
53  {
54  if(sv_cov_sub.rows() < 1)
55  return 0;
56  double t = sv_cov_sub(0,0);
57  return (t < 0 ? 0 : sqrt(t));
58  }
59 
60  //-----------------------------------------------------------------------
62  //-----------------------------------------------------------------------
63 
64  double fluorescence_slope() const { return coeff.value()(1); }
65 
66  //-----------------------------------------------------------------------
68  //-----------------------------------------------------------------------
69 
71  {
72  if(sv_cov_sub.rows() < 2)
73  return 0;
74  double t = sv_cov_sub(1,1);
75  return (t < 0 ? 0 : sqrt(t));
76  }
77 
78 private:
79  DoubleWithUnit lza;
80  DoubleWithUnit reference;
81  Unit retrieval_unit;
82  int spec_index;
83 
84  // Fluorescence contribution
85  mutable ArrayAd<double, 1> f_contrib_ad;
86 
87  // We need to use AtmosphereOco specific methods
89 
90  // The fluorescence contribution needs to be
91  // scaled by the stokes value
93 };
94 }
95 #endif
virtual std::string name() const
Name of spectrum effect, for use when outputting effects of effect.
virtual std::string sub_state_identifier() const
Return a string to identify this part of the state, this name should be all lower case and seperate p...
double fluorescence_slope_uncertainty() const
Assumed uncertainty of fluorescence slope.
virtual void apply_effect(Spectrum &Spec, const ForwardModelSpectralGrid &Forward_model_grid) const
Apply correction to spectrum in place.
As a design principle, we have each base class with the absolutely minimum interface needed for use f...
double fluorescence_at_reference() const
Fluorescence value at reference point.
This is the Forward Model spectral grid.
blitz::Array< double, 2 > sv_cov_sub
The subset of cov_full that is "owned" by this class, what was passed through update_sub_state.
virtual ArrayAd< double, 1 > contribution() const
Implements adding the effect of fluorescence to A-Band spectrum by using a retrievable across the ban...
virtual void print(std::ostream &Os) const
const blitz::Array< T, D > & value() const
Definition: array_ad.h:306
FluorescenceEffect(const blitz::Array< double, 1 > &Coeff, const blitz::Array< bool, 1 > &Used_flag, const boost::shared_ptr< RtAtmosphere > &Atm, const boost::shared_ptr< StokesCoefficient > &Stokes_coef, const DoubleWithUnit &Lza, const int Spec_index, const DoubleWithUnit &Reference, const Unit &Retrieval_unit)
This is a full spectrum, which contains a SpectralRange and SpectralDomain.
Definition: spectrum.h:18
virtual boost::shared_ptr< SpectrumEffect > clone() const
Clone a SpectrumEffect object.
double fluorescence_slope() const
Fluorescence slope across band.
double fluorescence_at_reference_uncertainty() const
Assumed uncertainty of fluorescence at reference point.
We frequently have a double with units associated with it.
Libraries such as boost::units allow unit handling where we know the units at compile time...
Definition: unit.h:25
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
virtual std::string state_vector_name_i(int i) const
Return state vector name for ith entry in coeff.

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