Gyoto
GyotoPowerLawSynchrotronSpectrum.h
Go to the documentation of this file.
1 
7 /*
8  Copyright 2018 Frederic Vincent, Thibaut Paumard
9 
10  This file is part of Gyoto.
11 
12  Gyoto is free software: you can redistribute it and/or modify
13  it under the terms of the GNU General Public License as published by
14  the Free Software Foundation, either version 3 of the License, or
15  (at your option) any later version.
16 
17  Gyoto is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  GNU General Public License for more details.
21 
22  You should have received a copy of the GNU General Public License
23  along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
24  */
25 
26 #ifndef __GyotoPowerLawSynchrotronSpectrum_H_
27 #define __GyotoPowerLawSynchrotronSpectrum_H_
28 #include "GyotoSpectrum.h"
29 #include <GyotoBlackBodySpectrum.h>
30 
31 namespace Gyoto {
32  namespace Spectrum {
33  class PowerLawSynchrotron;
34  }
35 }
36 
51  protected:
52  SmartPointer<Spectrum::BlackBody> spectrumBB_;
54  double angle_B_pem_;
55  double cyclotron_freq_;
56  double PLindex_;
58  double gamma_min_;
59  double gamma_max_;
60 
61 
62 
63  public:
65 
67  PowerLawSynchrotron(const PowerLawSynchrotron &);
68  virtual PowerLawSynchrotron * clone() const;
69 
70  using Gyoto::Spectrum::Generic::operator();
77  virtual double operator()(double nu) const;
86 #ifndef GYOTO_SWIGIMPORTED
87  virtual double operator()(double nu,double ,double ds) const;
88 #endif
89  // NB: the second argument, opacity in the Spectrum API
90  // is useless here
91 
92  double numberdensityCGS() const;
93  void numberdensityCGS(double rho);
94  double angle_B_pem() const;
95  void angle_B_pem(double rho);
96  double cyclotron_freq() const;
97  void cyclotron_freq(double rho);
98  double PLindex() const;
99  void PLindex(double ind);
100  bool angle_averaged() const;
101  void angle_averaged(bool ang);
102  double gamma_min() const;
103  void gamma_min(double gmin);
104  double gamma_max() const;
105  void gamma_max(double gmax);
106 
113  double jnuCGS(double nu) const;
119  double alphanuCGS(double nu) const;
120 
125  void radiativeQ(double jnu[], // output
126  double anu[], // output
127  double const nu_ems[],
128  size_t nbnu
129  ) ;
130 
131 };
132 
133 #endif
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
double cyclotron_freq_
Cyclotron frequency (e*B / 2*pi*me*c)
Definition: GyotoPowerLawSynchrotronSpectrum.h:55
double numberdensityCGS_
Number density in CGS UNITS (careful)
Definition: GyotoPowerLawSynchrotronSpectrum.h:53
SmartPointer< Spectrum::BlackBody > spectrumBB_
blackbody emission
Definition: GyotoPowerLawSynchrotronSpectrum.h:52
double PLindex_
Power law index: electron spectrum gamma^-PLindex_.
Definition: GyotoPowerLawSynchrotronSpectrum.h:56
double alphanuCGS(double nu) const
void radiativeQ(double jnu[], double anu[], double const nu_ems[], size_t nbnu)
virtual PowerLawSynchrotron * clone() const
Cloner.
Spectrum of a simple object (e.g. Star)
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43
Powerlaw synchrotron spectrum.
Definition: GyotoPowerLawSynchrotronSpectrum.h:49
Pointers performing reference counting.
Definition: GyotoProperty.h:45
bool angle_averaged_
Boolean for angle averaging.
Definition: GyotoPowerLawSynchrotronSpectrum.h:57
double jnuCGS(double nu) const
Spectrum emitted by an Astrobj.
Definition: GyotoSpectrum.h:134
double angle_B_pem_
Angle between Bfield and emission direction (rad)
Definition: GyotoPowerLawSynchrotronSpectrum.h:54
I_nu(nu, T) = cst_*2*h*nu^3/c^2/(exp(h*nu/k*T)-1.);.