ReFRACtor
radiance_scaling.h
Go to the documentation of this file.
1 #ifndef RADIANCE_SCALING_H
2 #define RADIANCE_SCALING_H
3 
5 #include "double_with_unit.h"
6 #include "spectral_domain.h"
7 #include "spectral_range.h"
8 #include "printable.h"
9 
10 namespace FullPhysics {
11 
12 /****************************************************************/
23 class RadianceScaling : virtual public InstrumentCorrection,
24  public Printable<RadianceScaling> {
25 
26 public:
27 
29  const std::string& Band_name)
30  : offset(0), band_ref(Band_ref), band_name(Band_name)
31  {
32  // Put in a sane default value
33  scaling_coeff.resize(2, 0);
34  scaling_coeff(0) = 1.0;
35  scaling_coeff(1) = 0.0;
36  }
37 
38  // Create a RadianceScaling
39  RadianceScaling(const ArrayAd<double, 1>& Scaling_coeff,
40  const DoubleWithUnit& Band_ref,
41  const std::string& Band_name)
42  : scaling_coeff(Scaling_coeff),
43  offset(0), band_ref(Band_ref), band_name(Band_name)
44  {
45  }
46 
47  RadianceScaling(const ArrayAd<double, 1>& Scaling_coeff,
48  const AutoDerivative<double> Offset,
49  const DoubleWithUnit& Band_ref,
50  const std::string& Band_name)
51  : scaling_coeff(Scaling_coeff),
52  offset(Offset), band_ref(Band_ref), band_name(Band_name)
53  {
54  }
55 
56  virtual ~RadianceScaling() {};
57 
58  virtual void print(std::ostream& Os) const;
59 
61  virtual void apply_scaling(const SpectralDomain& Grid, SpectralRange& Radiance) const;
62 
63  //-----------------------------------------------------------------------
65  //-----------------------------------------------------------------------
66 
67  virtual blitz::Array<double, 1> radiance_scaling_coeff() const { return scaling_coeff.value(); }
68 
69  //-----------------------------------------------------------------------
71  //-----------------------------------------------------------------------
72 
73  virtual blitz::Array<double, 1> radiance_scaling_coeff_uncertainty() const = 0;
74 
75  //-----------------------------------------------------------------------
77  //-----------------------------------------------------------------------
78 
79  virtual double radiance_offset() const { return offset.value(); }
80 
81 protected:
85  std::string band_name;
86 };
87 }
88 #endif
virtual void apply_scaling(const SpectralDomain &Grid, SpectralRange &Radiance) const
Apply scaling and offset coefficients to Radiance.
virtual blitz::Array< double, 1 > radiance_scaling_coeff_uncertainty() const =0
Return radiance scaling coefficients uncertainty for the output file.
virtual void print(std::ostream &Os) const
virtual double radiance_offset() const
Return radiance scaling offset for the output file.
This abstract class provides the generic capabilities for applying a radiance scaling to a Radiance...
AutoDerivative< double > offset
RadianceScaling(const DoubleWithUnit &Band_ref, const std::string &Band_name)
For different instruments, it is more natural to either work with wavenumbers (e.g., GOSAT) or wavelength (e.g., OCO).
RadianceScaling(const ArrayAd< double, 1 > &Scaling_coeff, const AutoDerivative< double > Offset, const DoubleWithUnit &Band_ref, const std::string &Band_name)
ArrayAd< double, 1 > scaling_coeff
This is a Mixin for classes that can be printed.
Definition: printable.h:24
const blitz::Array< T, D > & value() const
Definition: array_ad.h:306
void resize(const blitz::TinyVector< int, D > &Shape, int nvar)
Definition: array_ad.h:177
virtual blitz::Array< double, 1 > radiance_scaling_coeff() const
Return radiance scaling coefficients for the output file.
We frequently have a double with units associated with it.
We have a number of different spectrums that appear in different parts of the code.
RadianceScaling(const ArrayAd< double, 1 > &Scaling_coeff, const DoubleWithUnit &Band_ref, const std::string &Band_name)
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
const T & value() const
Convert to type T.
This class models an Instrument correction.

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