Gyoto
GyotoPowerLawSpectrum.h
Go to the documentation of this file.
1
8/*
9 Copyright 2011-2014, 2016, 2018 Thibaut Paumard & Frederic Vincent
10
11 This file is part of Gyoto.
12
13 Gyoto is free software: you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 Gyoto is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
25 */
26
27#ifndef __GyotoPowerLawSpectrum_H_
28#define __GyotoPowerLawSpectrum_H_
29#include <GyotoSpectrum.h>
30#include <string>
31
32namespace Gyoto {
33 namespace Spectrum {
34 class PowerLaw;
35 }
36}
37
38
55 protected:
56 double constant_;
57 double exponent_;
58 double minfreq_;
59 double maxfreq_;
60
61 public:
63
64 PowerLaw();
65
69 PowerLaw(double exponent, double constant=1.);
70 // PowerLaw(const Spectrum &);
71 virtual PowerLaw * clone() const;
72
73 double constant() const;
74 void constant(double);
75 double exponent() const;
76 void exponent(double);
77 std::vector<double> cutoff(std::string const &unit) const;
78 void cutoff(std::vector<double> const &v, std::string const &unit);
79 std::vector<double> cutoff() const;
80 void cutoff(std::vector<double> const &v);
81
82 using Gyoto::Spectrum::Generic::operator();
83 virtual double operator()(double nu) const;
84
85};
86
87#endif
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
Spectrum of a simple object (e.g. Star)
Pointers performing reference counting.
Definition: GyotoSmartPointer.h:135
Spectrum emitted by an Astrobj.
Definition: GyotoSpectrum.h:137
I_nu=constant_*nu^exponent_.
Definition: GyotoPowerLawSpectrum.h:53
double maxfreq_
Upper-frequency cutoff (emits at nu<=maxfreq_)
Definition: GyotoPowerLawSpectrum.h:59
double constant() const
Get constant_.
double exponent_
I_nu=constant_*nu^exponent_.
Definition: GyotoPowerLawSpectrum.h:57
double constant_
I_nu=constant_*nu^exponent_.
Definition: GyotoPowerLawSpectrum.h:56
double exponent() const
Get exponent_.
double minfreq_
Lower-frequency cutoff (emits at nu>=minfreq_)
Definition: GyotoPowerLawSpectrum.h:58
std::vector< double > cutoff() const
Get cutoffs, in Hz.
virtual PowerLaw * clone() const
Cloner.
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43