GyotoUniformSpectrometer.h
Go to the documentation of this file.
/*
Copyright 2011-2013 Thibaut Paumard
This file is part of Gyoto.
Gyoto is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gyoto is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GyotoUniformSpectrometer_H_
#define __GyotoUniformSpectrometer_H_
#include <GyotoSpectrometer.h>
namespace Gyoto{
namespace Spectrometer {
class Uniform;
}
}
class Gyoto::Spectrometer::Uniform : public Gyoto::Spectrometer::Generic {
friend class Gyoto::SmartPointer<Gyoto::Spectrometer::Uniform>;
protected:
double band_[2];
void reset_();
public:
GYOTO_OBJECT;
Uniform() ;
Uniform(size_t nsamples, double band_min, double band_max,
kind_t kind);
Uniform(const Uniform& ) ;
Generic * clone() const;
virtual ~Uniform() ;
using Generic::kindid;
void kindid(kind_t);
void kind(std::string const &name);
std::string kind() const;
using Generic::nSamples;
void nSamples(size_t n);
void band(std::vector<double> const &nu);
void band(std::vector<double> const &nu, std::string const &unit);
std::vector<double>band() const;
std::vector<double>band(std::string const &unit) const;
void band(double nu[2]);
void band(double nu[2], std::string const &unit, std::string const &kind);
void band(double nu[], std::string const &unit);
double const * getBand() const ;
public:
void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const;
#ifdef GYOTO_USE_XERCES
virtual void setParameters(FactoryMessenger *fmp);
#endif
static kind_t const WaveKind;
static kind_t const WaveLogKind;
static kind_t const FreqKind;
static kind_t const FreqLogKind;
};
#endif
GYOTO_OBJECT
#define GYOTO_OBJECT
Declare class::properties and class::getProperties().
Definition GyotoObject.h:84
GyotoSpectrometer.h
Spectroscopic capabilities of a Screen.
Gyoto::SmartPointer
Pointers performing reference counting.
Definition GyotoSmartPointer.h:135
Gyoto::Spectrometer::Generic
Base class for spectrometers.
Definition GyotoSpectrometer.h:186
Gyoto::Spectrometer::Generic::Generic
Generic()
Default constructor.
Gyoto::Spectrometer::Generic::nSamples
virtual size_t nSamples() const
Get Generic::nsamples_.
Gyoto::Spectrometer::Generic::kindid
virtual kind_t kindid() const
Get kindid_.
Gyoto::Spectrometer::Uniform
Uniformly spaced spectrometers.
Definition GyotoUniformSpectrometer.h:68
Gyoto::Spectrometer::Uniform::FreqLogKind
static kind_t const FreqLogKind
"freqlog"
Definition GyotoUniformSpectrometer.h:192
Gyoto::Spectrometer::Uniform::kind
void kind(std::string const &name)
Set Generic::kind_ from a std::string.
Gyoto::Spectrometer::Uniform::kindid
void kindid(kind_t)
Set Generic::kindid_.
Gyoto::Spectrometer::Uniform::clone
Generic * clone() const
Cloner.
Gyoto::Spectrometer::Uniform::WaveLogKind
static kind_t const WaveLogKind
"wavelog"
Definition GyotoUniformSpectrometer.h:168
Gyoto::Spectrometer::Uniform::reset_
void reset_()
Computes boundaries_, midpoints_ and widths_.
Gyoto::Spectrometer::Uniform::band_
double band_[2]
boundaries of the spectro.
Definition GyotoUniformSpectrometer.h:76
Gyoto::Spectrometer::Uniform::WaveKind
static kind_t const WaveKind
"wave"
Definition GyotoUniformSpectrometer.h:156
Gyoto::Spectrometer::Uniform::getBand
double const * getBand() const
Get Uniform::band_.
Gyoto::Spectrometer::Uniform::setParameters
virtual void setParameters(FactoryMessenger *fmp)
Main loop for parsing Properties from XML description.
Gyoto::Spectrometer::Uniform::Uniform
Uniform()
Default constructor.
Gyoto::Spectrometer::Uniform::nSamples
void nSamples(size_t n)
Set Generic::nsamples_.
Gyoto::Spectrometer::Uniform::fillProperty
void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const
Output a single Property to XML.
Gyoto::Spectrometer::Uniform::FreqKind
static kind_t const FreqKind
"freq"
Definition GyotoUniformSpectrometer.h:180
Gyoto::Spectrometer
Access to spectrometers.
Definition GyotoComplexSpectrometer.h:34
Gyoto::Spectrometer::kind_t
char const * kind_t
Type for Spectrometer kind.
Definition GyotoSpectrometer.h:85
Gyoto
Namespace for the Gyoto library.
Definition GyotoAstrobj.h:44