ReFRACtor
solar_model.cc
Go to the documentation of this file.
1 #include "solar_model.h"
2 using namespace FullPhysics;
3 
4 #ifdef HAVE_LUA
5 #include "register_lua.h"
6 
8 .def("solar_spectrum", &SolarModel::solar_spectrum)
10 
11 #endif
12 
13 //-----------------------------------------------------------------------
19 //-----------------------------------------------------------------------
20 
22 {
24  Exception e;
25  e << "SolarModel::apply_solar_model expects the input spectrum to be in units of\n"
26  << "inverse solid angle (e.g., sr^-1). Instead, it was passed a spectrum with\n"
27  << "units of:\n"
28  << Spec.spectral_range().units() << "\n";
29  throw e;
30  }
33  res.value() *= s.spectral_range().data();
34  for(int i = 0; i < res.number_variable(); ++i)
35  res.jacobian()(blitz::Range::all(), i) *= s.spectral_range().data();
36  return Spectrum(Spec.spectral_domain(), SpectralRange(res,
37  s.spectral_range().units() * Spec.spectral_range().units()));
38 }
39 
const Unit s("s", 1.0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0)
virtual Spectrum solar_spectrum(const SpectralDomain &Spec_domain) const =0
Calculate solar spectrum.
This applies a solar model to reflectance to model the incoming solar irradiance. ...
Definition: solar_model.h:15
This is the base of the exception hierarchy for Full Physics code.
Definition: fp_exception.h:16
const SpectralRange & spectral_range() const
Spectral range (e.g, radiance values)
Definition: spectrum.h:39
#define REGISTER_LUA_DERIVED_CLASS(X, Y)
Definition: register_lua.h:136
const blitz::Array< T, D+1 > jacobian() const
Definition: array_ad.h:307
This class models models any effects that need to be applied to high resolution spectra after the rad...
const Unit & units() const
Units of data.
This is a full spectrum, which contains a SpectralRange and SpectralDomain.
Definition: spectrum.h:18
ArrayAd< T, D > copy() const
Definition: array_ad.h:374
const Unit inv_sr("sr^-1", pow(sr, -1))
We have a number of different spectrums that appear in different parts of the code.
const ArrayAd< double, 1 > & data_ad() const
Underlying data, possibly with a Jacobian.
bool is_commensurate(const Unit &Units) const
Test if this set of units is commensurate with another set.
Definition: unit.h:68
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
#define REGISTER_LUA_END()
Definition: register_lua.h:134
const SpectralDomain & spectral_domain() const
Spectral domain (i.e., wavenumber or wavelength).
Definition: spectrum.h:32
virtual Spectrum apply_solar_model(const Spectrum &Spec) const
Apply the solar model.
Definition: solar_model.cc:21

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