ReFRACtor
solar_doppler_shift_l1b.cc
Go to the documentation of this file.
2 #include "old_constant.h"
3 using namespace FullPhysics;
4 using namespace blitz;
5 #ifdef HAVE_LUA
6 #include "register_lua.h"
8 .def(luabind::constructor<const DoubleWithUnit&, const DoubleWithUnit&,bool>())
10 #endif
11 
12 //-----------------------------------------------------------------------
23 //-----------------------------------------------------------------------
24 
26 const DoubleWithUnit& Solar_distance,
27 const DoubleWithUnit& Solar_relative_velocity,
28 bool Apply_doppler_shift
29 )
30 : solar_distance_(Solar_distance),
31  solar_relative_velocity_(Solar_relative_velocity),
32  apply_doppler_shift_(Apply_doppler_shift)
33 {
34  doppler_shift_ = (solar_relative_velocity_ /
36 }
37 
38 //-----------------------------------------------------------------------
40 //-----------------------------------------------------------------------
41 
42 void SolarDopplerShiftL1b::print(std::ostream& Os) const
43 {
44  Os << "SolarDopplerShiftL1b\n"
45  << " Solar distance: " << solar_distance_.convert(OldConstant::AU) << "\n"
46  << " Doppler shift: " << doppler_shift_ << "\n"
47  << " Apply Doppler: " << (apply_doppler_shift_ ? "true" : "false");
48 }
49 
50 // See base class for description
52 const SpectralDomain& Spec_domain) const
53 {
54  if(apply_doppler_shift_) {
55  // The correction is either a multiplication for wavenumbers,
56  // or a division for wavelength.
58  return SpectralDomain(Array<double, 1>(Spec_domain.data() *
59  (1 + doppler_shift_)),
60  Spec_domain.units());
61  else
62  return SpectralDomain(Array<double, 1>(Spec_domain.data() /
63  (1 + doppler_shift_)),
64  Spec_domain.units());
65  } else
66  return Spec_domain;
67 }
68 
69 
70 
For different instruments, it is more natural to either work with wavenumbers (e.g., GOSAT) or wavelength (e.g., OCO).
const Unit dimensionless("dimensionless", 1.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
#define REGISTER_LUA_DERIVED_CLASS(X, Y)
Definition: register_lua.h:136
SolarDopplerShiftL1b(const DoubleWithUnit &Solar_distance, const DoubleWithUnit &Solar_relative_velocity, bool Apply_doppler_shift=true)
Create a SolarDopplerShiftL1b.
virtual SpectralDomain doppler_stretch(const SpectralDomain &Spec_domain) const
Shift wavenumbers to account for doppler stretch.
Apply value function to a blitz array.
This class handles the solar Doppler stretch to calculate the shift of the solar lines with respect t...
virtual void print(std::ostream &Os) const
Print description of object.
We frequently have a double with units associated with it.
DoubleWithUnit convert(const Unit &R) const
Convert to the given units.
TypePreference type_preference() const
Indicate if this class prefers wavelength or wavenumber.
const Unit units() const
Units that go with data()
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
This class handles the solar Doppler stretch to calculate the shift of the solar lines with respect t...
const Unit AU("AU", 1.49597870691e11 *units::m)
1 AU in meters.
const blitz::Array< double, 1 > & data() const
Return data.
const DoubleWithUnit speed_of_light(299792458, units::m/units::s)
Speed of light, in m/s.

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