GyotoPowerLawSpectrum.h
Go to the documentation of this file.
/*
Copyright 2011-2014, 2016, 2018 Thibaut Paumard & Frederic Vincent
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 __GyotoPowerLawSpectrum_H_
#define __GyotoPowerLawSpectrum_H_
#include <GyotoSpectrum.h>
#include <string>
namespace Gyoto {
namespace Spectrum {
class PowerLaw;
}
}
class Gyoto::Spectrum::PowerLaw : public Gyoto::Spectrum::Generic {
friend class Gyoto::SmartPointer<Gyoto::Spectrum::PowerLaw>;
protected:
double constant_;
double exponent_;
double minfreq_;
double maxfreq_;
public:
GYOTO_OBJECT;
PowerLaw();
PowerLaw(double exponent, double constant=1.);
// PowerLaw(const Spectrum &);
virtual PowerLaw * clone() const;
double constant() const;
void constant(double);
double exponent() const;
void exponent(double);
std::vector<double> cutoff(std::string const &unit) const;
void cutoff(std::vector<double> const &v, std::string const &unit);
std::vector<double> cutoff() const;
void cutoff(std::vector<double> const &v);
using Gyoto::Spectrum::Generic::operator();
virtual double operator()(double nu) const;
};
#endif
GYOTO_OBJECT
#define GYOTO_OBJECT
Declare class::properties and class::getProperties().
Definition GyotoObject.h:84
GyotoSpectrum.h
Spectrum of a simple object (e.g. Star).
Gyoto::SmartPointer
Pointers performing reference counting.
Definition GyotoSmartPointer.h:135
Gyoto::Spectrum::Generic
Spectrum emitted by an Astrobj.
Definition GyotoSpectrum.h:137
Gyoto::Spectrum::PowerLaw
I_nu=constant_*nu^exponent_.
Definition GyotoPowerLawSpectrum.h:53
Gyoto::Spectrum::PowerLaw::maxfreq_
double maxfreq_
Upper-frequency cutoff (emits at nu<=maxfreq_).
Definition GyotoPowerLawSpectrum.h:59
Gyoto::Spectrum::PowerLaw::constant
double constant() const
Get constant_.
Gyoto::Spectrum::PowerLaw::exponent_
double exponent_
Inu=constant*nu^exponent_.
Definition GyotoPowerLawSpectrum.h:57
Gyoto::Spectrum::PowerLaw::constant_
double constant_
Inu=constant*nu^exponent_.
Definition GyotoPowerLawSpectrum.h:56
Gyoto::Spectrum::PowerLaw::cutoff
std::vector< double > cutoff(std::string const &unit) const
Get cutoffs, specifying unit.
Gyoto::Spectrum::PowerLaw::exponent
double exponent() const
Get exponent_.
Gyoto::Spectrum::PowerLaw::minfreq_
double minfreq_
Lower-frequency cutoff (emits at nu>=minfreq_).
Definition GyotoPowerLawSpectrum.h:58
Gyoto::Spectrum::PowerLaw::clone
virtual PowerLaw * clone() const
Cloner.
Gyoto::Spectrum
Spectrum of a simple object (e.g. a Gyoto::Astrobj::Star).
Definition GyotoBlackBodySpectrum.h:35
Gyoto
Namespace for the Gyoto library.
Definition GyotoAstrobj.h:44