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
44namespace Gyoto{
45 namespace Spectrometer {
46 class Uniform;
47 }
48}
49
70 protected:
76 double band_[2];
77
78 void reset_();
79
80 public:
83 Uniform(size_t nsamples, double band_min, double band_max,
84 kind_t kind);
85 Uniform(const Uniform& ) ;
86 Generic * clone() const;
87 virtual ~Uniform() ;
88
89 using Generic::kindid;
90 void kindid(kind_t);
91
101 void kind(std::string const &name);
102 std::string kind() const;
103
104 using Generic::nSamples;
108 void nSamples(size_t n);
109
110 void band(std::vector<double> const &nu);
111 void band(std::vector<double> const &nu, std::string const &unit);
112 std::vector<double>band() const;
113 std::vector<double>band(std::string const &unit) const;
114
121 void band(double nu[2]);
122
135 void band(double nu[2], std::string const &unit, std::string const &kind);
136 void band(double nu[], std::string const &unit);
137
138 double const * getBand() const ;
139
140 public:
141 void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const;
142#ifdef GYOTO_USE_XERCES
143 virtual void setParameters(FactoryMessenger *fmp);
144#endif
145
156 static kind_t const WaveKind;
157
168 static kind_t const WaveLogKind;
169
180 static kind_t const FreqKind;
181
192 static kind_t const FreqLogKind;
193
194
195};
196
197
198#endif
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
Spectroscopic capabilities of a Screen.
Pointers performing reference counting.
Definition: GyotoSmartPointer.h:135
Base class for spectrometers.
Definition: GyotoSpectrometer.h:186
virtual size_t nSamples() const
Get Generic::nsamples_.
virtual kind_t kindid() const
Get kindid_.
Uniformly spaced spectrometers.
Definition: GyotoUniformSpectrometer.h:68
static kind_t const FreqLogKind
"freqlog"
Definition: GyotoUniformSpectrometer.h:192
void kind(std::string const &name)
Set Generic::kind_ from a std::string.
virtual size_t nSamples() const
Get Generic::nsamples_.
Generic * clone() const
Cloner.
static kind_t const WaveLogKind
"wavelog"
Definition: GyotoUniformSpectrometer.h:168
void reset_()
Computes boundaries_, midpoints_ and widths_.
double band_[2]
boundaries of the spectro.
Definition: GyotoUniformSpectrometer.h:76
static kind_t const WaveKind
"wave"
Definition: GyotoUniformSpectrometer.h:156
double const * getBand() const
Get Uniform::band_.
virtual void setParameters(FactoryMessenger *fmp)
Main loop for parsing Properties from XML description.
virtual kind_t kindid() const
Get kindid_.
void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const
Output a single Property to XML.
static kind_t const FreqKind
"freq"
Definition: GyotoUniformSpectrometer.h:180
char const * kind_t
Type for Spectrometer kind.
Definition: GyotoSpectrometer.h:85
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43