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  using Generic::kind;
89  void kind(kind_t);
90 
100  void kind(std::string name);
101 
102  using Generic::nSamples;
106  void nSamples(size_t n);
107 
114  void setBand(double nu[2]);
115 
128  void setBand(double nu[2], std::string unit, std::string kind="");
129 
130  double const * getBand() const ;
131 
132 #ifdef GYOTO_USE_XERCES
133  public:
134  void fillElement(FactoryMessenger *fmp) const ;
135 
143  virtual void setParameters(FactoryMessenger *fmp);
144 #endif
145 
146  virtual int setParameter(std::string name,
147  std::string content,
148  std::string unit);
159  static kind_t const WaveKind;
160 
171  static kind_t const WaveLogKind;
172 
183  static kind_t const FreqKind;
184 
195  static kind_t const FreqLogKind;
196 
197 
198 };
199 
200 
201 #endif
void fillElement(FactoryMessenger *fmp) const
Write out parameters to XML entities.
Pointers performing reference counting.
Definition: GyotoSmartPointer.h:51
static kind_t const WaveKind
"wave"
Definition: GyotoUniformSpectrometer.h:159
double const * getBand() const
Get Uniform::band_.
static kind_t const FreqLogKind
"freqlog"
Definition: GyotoUniformSpectrometer.h:195
virtual void setParameters(FactoryMessenger *fmp)
Main loop in the (templated) subcontractor.
Generic * clone() const
Cloner.
char const * kind_t
Type for Spectrometer kind.
Definition: GyotoSpectrometer.h:70
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
"wavelog"
Definition: GyotoUniformSpectrometer.h:171
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:42
static kind_t const FreqKind
"freq"
Definition: GyotoUniformSpectrometer.h:183
double band_[2]
boundaries of the spectro.
Definition: GyotoUniformSpectrometer.h:76
void reset_()
Computes boundaries_, midpoints_ and widths_.
virtual size_t nSamples() const
Get Generic::nsamples_.
virtual kind_t kind() const
Get kind_.
Base class for spectrometers.
Definition: GyotoSpectrometer.h:171