ReFRACtor
FullPhysics::HighResSpectrumOutput Class Reference

This class will recieve observer notifications from any class that pushes out NamedSpectrum and write them to the output file in individual datasets for the spectral domain and spectral range parts. More...

#include <high_res_spectrum_output.h>

+ Inheritance diagram for FullPhysics::HighResSpectrumOutput:
+ Collaboration diagram for FullPhysics::HighResSpectrumOutput:

Public Member Functions

 HighResSpectrumOutput ()
 
virtual ~HighResSpectrumOutput ()
 
virtual std::string desc () const
 Description of object, to be printed to stream. More...
 
virtual void notify_add (std::vector< boost::shared_ptr< NamedSpectrum > > &Observed_object)
 Called when an object is added to an Observable. More...
 
virtual void notify_add (boost::shared_ptr< NamedSpectrum > &Observed_object)
 Called when an object is added to an Observable. More...
 
virtual void notify_add ()
 
virtual void notify_add ()
 
virtual void notify_remove (std::vector< boost::shared_ptr< NamedSpectrum > > &Observed_object)
 Called when an object is removed from an Observable. More...
 
virtual void notify_remove (boost::shared_ptr< NamedSpectrum > &Observed_object)
 Called when an object is removed from an Observable. More...
 
virtual void notify_remove ()
 
virtual void notify_remove ()
 
virtual void notify_update (const boost::shared_ptr< NamedSpectrum > &Obs)
 On notification this class registers a dataset based on the name in the NamedSpectrum. More...
 
virtual void notify_update (const std::vector< boost::shared_ptr< NamedSpectrum > > &Obs)
 Calls update for each NamedSpectum in a notification sending a vector of NamedSpectrum, such as for delivering stokes values. More...
 
virtual void print (std::ostream &Os) const
 Print to stream. More...
 
std::string print_to_string () const
 Print to string. More...
 
virtual void register_output (const boost::shared_ptr< Output > &out) const
 Saves a pointer to all interested output files The datasets will be actually registered as they are send via notifications. More...
 
virtual void register_output_apriori (const boost::shared_ptr< Output > &out) const
 Register apriori portions of class. More...
 
const blitz::Array< double, 1 > saved_spectral_domain (const std::string &spectra_name)
 
const blitz::Array< double, 1 > saved_spectral_range (const std::string &spectra_name)
 

Detailed Description

This class will recieve observer notifications from any class that pushes out NamedSpectrum and write them to the output file in individual datasets for the spectral domain and spectral range parts.

This is intended to be a way to write high resolution spectrum from the forward model without cluttering it with accessor functions and without knowing the exact steps that will be performed in it.

Definition at line 19 of file high_res_spectrum_output.h.

Constructor & Destructor Documentation

◆ HighResSpectrumOutput()

FullPhysics::HighResSpectrumOutput::HighResSpectrumOutput ( )
inline

Definition at line 23 of file high_res_spectrum_output.h.

◆ ~HighResSpectrumOutput()

virtual FullPhysics::HighResSpectrumOutput::~HighResSpectrumOutput ( )
inlinevirtual

Definition at line 24 of file high_res_spectrum_output.h.

Member Function Documentation

◆ desc()

virtual std::string FullPhysics::HighResSpectrumOutput::desc ( ) const
inlinevirtual

Description of object, to be printed to stream.

This gives a cleaner interface for deriving from python.

Reimplemented from FullPhysics::RegisterOutputBase.

Definition at line 40 of file high_res_spectrum_output.h.

◆ notify_add() [1/4]

virtual void FullPhysics::Observer< boost::shared_ptr< NamedSpectrum > >::notify_add ( boost::shared_ptr< NamedSpectrum > &  Observed_object)
inlinevirtualinherited

Called when an object is added to an Observable.

Default is to do nothing.

Definition at line 47 of file observer.h.

◆ notify_add() [2/4]

virtual void FullPhysics::Observer< std::vector< boost::shared_ptr< NamedSpectrum > > >::notify_add ( std::vector< boost::shared_ptr< NamedSpectrum > > &  Observed_object)
inlinevirtualinherited

Called when an object is added to an Observable.

Default is to do nothing.

Definition at line 47 of file observer.h.

◆ notify_add() [3/4]

virtual void FullPhysics::Observer< boost::shared_ptr< NamedSpectrum > >::notify_add ( )
inlinevirtualinherited

Definition at line 48 of file observer.h.

◆ notify_add() [4/4]

virtual void FullPhysics::Observer< std::vector< boost::shared_ptr< NamedSpectrum > > >::notify_add ( )
inlinevirtualinherited

Definition at line 48 of file observer.h.

◆ notify_remove() [1/4]

virtual void FullPhysics::Observer< std::vector< boost::shared_ptr< NamedSpectrum > > >::notify_remove ( std::vector< boost::shared_ptr< NamedSpectrum > > &  Observed_object)
inlinevirtualinherited

Called when an object is removed from an Observable.

Default is to do nothing.

Definition at line 55 of file observer.h.

◆ notify_remove() [2/4]

virtual void FullPhysics::Observer< boost::shared_ptr< NamedSpectrum > >::notify_remove ( boost::shared_ptr< NamedSpectrum > &  Observed_object)
inlinevirtualinherited

Called when an object is removed from an Observable.

Default is to do nothing.

Definition at line 55 of file observer.h.

◆ notify_remove() [3/4]

virtual void FullPhysics::Observer< std::vector< boost::shared_ptr< NamedSpectrum > > >::notify_remove ( )
inlinevirtualinherited

Definition at line 56 of file observer.h.

◆ notify_remove() [4/4]

virtual void FullPhysics::Observer< boost::shared_ptr< NamedSpectrum > >::notify_remove ( )
inlinevirtualinherited

Definition at line 56 of file observer.h.

◆ notify_update() [1/2]

void HighResSpectrumOutput::notify_update ( const boost::shared_ptr< NamedSpectrum > &  Obs)
virtual

On notification this class registers a dataset based on the name in the NamedSpectrum.

If the same name comes in again it would be re-registered. Multiple bands will be saved together an output as one array.

Reimplemented from FullPhysics::Observer< boost::shared_ptr< NamedSpectrum > >.

Definition at line 70 of file high_res_spectrum_output.cc.

◆ notify_update() [2/2]

void HighResSpectrumOutput::notify_update ( const std::vector< boost::shared_ptr< NamedSpectrum > > &  Obs)
virtual

Calls update for each NamedSpectum in a notification sending a vector of NamedSpectrum, such as for delivering stokes values.

Reimplemented from FullPhysics::Observer< std::vector< boost::shared_ptr< NamedSpectrum > > >.

Definition at line 80 of file high_res_spectrum_output.cc.

◆ print()

virtual void FullPhysics::RegisterOutputBase::print ( std::ostream &  Os) const
inlinevirtualinherited

Print to stream.

The default calls the function "desc" that returns a string. This gives cleaner interface for deriving from this class in python, but most C++ classes will want to override this function rather than using desc.

Definition at line 76 of file register_output_base.h.

◆ print_to_string()

std::string FullPhysics::Printable< RegisterOutputBase >::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.

◆ register_output()

virtual void FullPhysics::HighResSpectrumOutput::register_output ( const boost::shared_ptr< Output > &  out) const
inlinevirtual

Saves a pointer to all interested output files The datasets will be actually registered as they are send via notifications.

Implements FullPhysics::RegisterOutputBase.

Definition at line 29 of file high_res_spectrum_output.h.

◆ register_output_apriori()

virtual void FullPhysics::HighResSpectrumOutput::register_output_apriori ( const boost::shared_ptr< Output > &  out) const
inlinevirtual

Register apriori portions of class.

The default is not to have anything written out, but derived classes can override this.

Note that by convention that we "freeze" the state of the class when we register the apriori_output. This allows for things like the StateVector to be changed after wards without changing the apriori state.

Reimplemented from FullPhysics::RegisterOutputBase.

Definition at line 32 of file high_res_spectrum_output.h.

◆ saved_spectral_domain()

const Array< double, 1 > HighResSpectrumOutput::saved_spectral_domain ( const std::string &  spectra_name)

Definition at line 31 of file high_res_spectrum_output.cc.

◆ saved_spectral_range()

const Array< double, 1 > HighResSpectrumOutput::saved_spectral_range ( const std::string &  spectra_name)

Definition at line 47 of file high_res_spectrum_output.cc.


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