source: Sophya/trunk/Cosmo/SimLSS/planckspectra.h@ 3619

Last change on this file since 3619 was 3347, checked in by cmv, 18 years ago
  • changements des noms des methodes.
  • definition des options par enum. cmv 11/10/2007
File size: 1.5 KB
Line 
1#ifndef PLANCKSPECTRA_SEEN
2#define PLANCKSPECTRA_SEEN
3
4#include "machdefs.h"
5#include "genericfunc.h"
6
7namespace SOPHYA {
8
9//-----------------------------------------------------------------------------------
10class PlanckSpectra : public GenericFunc {
11public:
12
13 typedef enum {PLANCK=0, RAYLEIGH=1, WIEN=2} SpectraApprox;
14 typedef enum {POWER=0, PHOTON=1} SpectraPower;
15 typedef enum {VALUE=0, DERIV=1} SpectraFunc;
16 typedef enum {NU=0, LAMBDA=1} SpectraVar;
17 typedef enum {ANGSFLUX=0, SFLUX=1, DENSENERG=2, EXPON=3} SpectraUnit;
18
19 PlanckSpectra(double T);
20 PlanckSpectra(PlanckSpectra& s);
21 virtual ~PlanckSpectra(void);
22
23 inline void SetTemperature(double T) {T_ = T;}
24 inline double GetTemperature(void) {return T_;}
25
26 void SetSpectraApprox(SpectraApprox spectraapprox=PLANCK);
27 void SetSpectraFunc(SpectraFunc spectrafunc=VALUE);
28 void SetSpectraVar(SpectraVar spectravar=NU);
29 void SetSpectraUnit(SpectraUnit spectraunit=ANGSFLUX);
30 void SetSpectraPower(SpectraPower spectrapower=POWER);
31
32
33 virtual double operator() (double x);
34
35 double F2L(double nu_or_lambda);
36 double PlanckEnergie(void);
37 double PlanckPhoton(void);
38 double WienLaw(void);
39 double FindMaximum(double eps=0.001);
40
41protected:
42 double T_;
43 SpectraApprox spectraapprox_;
44 SpectraFunc spectrafunc_;
45 SpectraVar spectravar_;
46 SpectraUnit spectraunit_;
47 SpectraPower spectrapower_;
48
49 double PlanckExp(double fl);
50 double DPlanckExp_DT(double fl);
51
52};
53
54} // Fin du namespace SOPHYA
55
56#endif
Note: See TracBrowser for help on using the repository browser.