Gyoto
GyotoUniformSpectrometer.h
Go to the documentation of this file.
1 
20 /*
21  Copyright 2011-2013 Thibaut Paumard
22 
23  This file is part of Gyoto.
24 
25  Gyoto is free software: you can redistribute it and/or modify
26  it under the terms of the GNU General Public License as published by
27  the Free Software Foundation, either version 3 of the License, or
28  (at your option) any later version.
29 
30  Gyoto is distributed in the hope that it will be useful,
31  but WITHOUT ANY WARRANTY; without even the implied warranty of
32  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33  GNU General Public License for more details.
34 
35  You should have received a copy of the GNU General Public License
36  along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
37  */
38 
39 #ifndef __GyotoUniformSpectrometer_H_
40 #define __GyotoUniformSpectrometer_H_
41 
42 #include <GyotoSpectrometer.h>
43 
44 namespace Gyoto{
45  namespace Spectrometer {
46  class Uniform;
47  }
48 }
49 
69  friend class Gyoto::SmartPointer<Gyoto::Spectrometer::Uniform>;
70  protected:
76  double band_[2];
77 
78  void reset_();
79 
80  public:
81  Uniform() ;
82  Uniform(size_t nsamples, double band_min, double band_max,
83  kind_t kind);
84  Uniform(const Uniform& ) ;
85  Generic * clone() const;
86  virtual ~Uniform() ;
87 
88  void setKind(kind_t);
89 
99  void setKind(std::string name);
100 
104  void setNSamples(size_t n);
105 
112  void setBand(double nu[2]);
113 
126  void setBand(double nu[2], std::string unit, std::string kind="");
127 
128  double const * getBand() const ;
129 
130 #ifdef GYOTO_USE_XERCES
131  public:
132  void fillElement(FactoryMessenger *fmp) const ;
133 
141  virtual void setParameters(FactoryMessenger *fmp);
142 #endif
143 
144  virtual int setParameter(std::string name,
145  std::string content,
146  std::string unit);
157  static kind_t const WaveKind;
158 
169  static kind_t const WaveLogKind;
170 
181  static kind_t const FreqKind;
182 
193  static kind_t const FreqLogKind;
194 
195 
196 };
197 
198 
199 #endif
void fillElement(FactoryMessenger *fmp) const
Write out parameters to XML entities.
void setNSamples(size_t n)
Set Generic::nsamples_.
static kind_t const WaveKind
&quot;wave&quot;
Definition: GyotoUniformSpectrometer.h:157
double const * getBand() const
Get Uniform::band_.
static kind_t const FreqLogKind
&quot;freqlog&quot;
Definition: GyotoUniformSpectrometer.h:193
virtual void setParameters(FactoryMessenger *fmp)
Main loop in the (templated) subcontractor.
Generic * clone() const
Cloner.
void setKind(kind_t)
Set Generic::kind_.
char const * kind_t
Type for Spectrometer kind.
Definition: GyotoSpectrometer.h:68
Uniformly spaced spectrometers.
Definition: GyotoUniformSpectrometer.h:68
void setBand(double nu[2])
Set Uniform::band_.
virtual int setParameter(std::string name, std::string content, std::string unit)
Set parameter by name.
Spectroscopic capabilities of a Screen.
static kind_t const WaveLogKind
&quot;wavelog&quot;
Definition: GyotoUniformSpectrometer.h:169
static kind_t const FreqKind
&quot;freq&quot;
Definition: GyotoUniformSpectrometer.h:181
double band_[2]
boundaries of the spectro.
Definition: GyotoUniformSpectrometer.h:76
Pointers performing reference counting.
Definition: GyotoSmartPointer.h:51
void reset_()
Computes boundaries_, midpoints_ and widths_.
Base class for spectrometers.
Definition: GyotoSpectrometer.h:169