ReFRACtor
bad_sample_noise_model.h
Go to the documentation of this file.
1 #ifndef BAD_SAMPLE_NOISE_MODEL_H
2 #define BAD_SAMPLE_NOISE_MODEL_H
3 #include "noise_model.h"
4 #include <boost/shared_ptr.hpp>
5 
6 namespace FullPhysics {
7 /****************************************************************/
17 public:
18  template <class T>
20  Underlying_noise_model,
21  const blitz::Array<T, 2>& Bad_sample_mask,
22  double Bad_sample_uncer)
23  : underlying_noise_model_(Underlying_noise_model),
24  bad_sample_uncer_(Bad_sample_uncer)
25  {
26  using namespace blitz;
27  bad_sample_mask_.resize(Bad_sample_mask.shape());
28  for(int i = 0; i < bad_sample_mask_.rows(); ++i)
29  bad_sample_mask_(i, Range::all()) = where(Bad_sample_mask(i, Range::all()), true, false);
30  }
31  virtual blitz::Array<double, 1> uncertainty(int Spec_index, const blitz::Array<double, 1>& Radiance) const;
32 
33  virtual void print(std::ostream& Os) const;
34 
35  double bad_sample_uncertainty() const { return bad_sample_uncer_; }
37  { return underlying_noise_model_;}
38  const blitz::Array<bool, 2>& bad_sample_mask() const
39  {return bad_sample_mask_;}
40 private:
41  boost::shared_ptr<NoiseModel> underlying_noise_model_;
42  blitz::Array<bool, 2> bad_sample_mask_;
43  double bad_sample_uncer_;
44 };
45 }
46 #endif
47 
48 
const blitz::Array< bool, 2 > & bad_sample_mask() const
virtual blitz::Array< double, 1 > uncertainty(int Spec_index, const blitz::Array< double, 1 > &Radiance) const
Calculate uncertainty, using underlying model except where we have bad samples, where we set this to ...
Apply value function to a blitz array.
const boost::shared_ptr< NoiseModel > & underlying_noise_model() const
virtual void print(std::ostream &Os) const
Print description of object.
BadSampleNoiseModel(const boost::shared_ptr< NoiseModel > &Underlying_noise_model, const blitz::Array< T, 2 > &Bad_sample_mask, double Bad_sample_uncer)
Interface for calculating noise/uncertainty values from radiance data given some internal representat...
Definition: noise_model.h:13
When we have bad samples, we usually pass this to the spectral window to prevent the sample from even...
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1

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