ReFRACtor
FullPhysics::IlsGaussian Class Reference

This is an ILS function that is a Gaussian. More...

#include <ils_gaussian.h>

+ Inheritance diagram for FullPhysics::IlsGaussian:
+ Collaboration diagram for FullPhysics::IlsGaussian:

Public Member Functions

 IlsGaussian (double a, const std::string &Band_name, const std::string &Hdf_band_name)
 Constructor. More...
 
virtual ~IlsGaussian ()
 
virtual std::string band_name () const
 Descriptive name of the band. More...
 
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 human readable band_name. More...
 
virtual void ils (const AutoDerivative< double > &wn_center, const blitz::Array< double, 1 > &wn, ArrayAd< double, 1 > &res) const
 Return response function. More...
 
virtual void print (std::ostream &os) const
 
std::string print_to_string () const
 Print to string. More...
 

Detailed Description

This is an ILS function that is a Gaussian.

Definition at line 9 of file ils_gaussian.h.

Constructor & Destructor Documentation

◆ IlsGaussian()

FullPhysics::IlsGaussian::IlsGaussian ( double  a,
const std::string &  Band_name,
const std::string &  Hdf_band_name 
)
inline

Constructor.

Definition at line 14 of file ils_gaussian.h.

◆ ~IlsGaussian()

virtual FullPhysics::IlsGaussian::~IlsGaussian ( )
inlinevirtual

Definition at line 18 of file ils_gaussian.h.

Member Function Documentation

◆ band_name()

virtual std::string FullPhysics::IlsGaussian::band_name ( ) const
inlinevirtual

Descriptive name of the band.

Implements FullPhysics::IlsFunction.

Definition at line 24 of file ils_gaussian.h.

◆ hdf_band_name()

virtual std::string FullPhysics::IlsGaussian::hdf_band_name ( ) const
inlinevirtual

In general, the name used in HDF files for a particular band is similar but not identical to the more human readable band_name.

For example, with GOSAT we use the HDF field name "weak_co2", but the band name is "WC-Band". This gives the HDF name to use.

The default implementation just returns the same string as the band name.

Reimplemented from FullPhysics::IlsFunction.

Definition at line 25 of file ils_gaussian.h.

◆ ils()

void IlsGaussian::ils ( const AutoDerivative< double > &  wn_center,
const blitz::Array< double, 1 > &  wn,
ArrayAd< double, 1 > &  res 
) const
virtual

Return response function.

Note that is function turns out to be a bit of a bottle neck because it is called so many times. Most of the time the results are the same size from one call to the next, so we pass in the results rather than having this be a return value like we normally do. This avoids recreating the array multiple times. We resize the output, so it is fine if it doesn't happen to be the final result size. But much of the time we avoid and extra allocation and destruction.

Parameters
wn_centerThe wave number of the center of the response function
wnThe wavenumbers to return response function for.
resReturn the response function for each of the wn value.

Implements FullPhysics::IlsFunction.

Definition at line 6 of file ils_gaussian.cc.

◆ print()

virtual void FullPhysics::IlsGaussian::print ( std::ostream &  os) const
inlinevirtual

Reimplemented from FullPhysics::IlsFunction.

Definition at line 23 of file ils_gaussian.h.

◆ print_to_string()

std::string FullPhysics::Printable< IlsFunction >::print_to_string ( ) const
inlineinherited

Print to string.

This is primarily useful for SWIG wrappers to this class, e.g. a to_s method in ruby.

Definition at line 31 of file printable.h.


The documentation for this class was generated from the following files:

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