source: Sophya/trunk/SigPredictor/abslightsource.h@ 3752

Last change on this file since 3752 was 1191, checked in by ansari, 25 years ago

cleaned up for maching LevelS upgrade ongoing

D.Y.

File size: 2.9 KB
RevLine 
[801]1// Dominique YVON, CEA/DAPNIA/SPP 02/2000
[1148]2// Les coordonnees spheriques utilisees par defaut sont: coordonŽes galactiques J2000
[801]3
4#ifndef AbsLightSource_H
5#define AbsLightSource_H
6
7#include <iostream>
8#include "unitvector.h"
9#include "radspec.h"
10#include "lsrcradspec.h"
11#include "specresp.h"
12
13#define T_CMBR (2.726) // Kelvin
14
15class AbsLightSource {
16//friend class SigCalcTool;
17public:
[1191]18 AbsLightSource() : QPtSource(false), LScrFSep(false), IsLSrcMappedPower (false)
[801]19 { sprintf(Name, "");
20 }
21 ~AbsLightSource() { }
22
23 virtual double powSpecDens(double theta,double phi,double freq)=0;
24 // Return power density at coordinates
25 // (W/m2/Hz/St)
26 LSrcRadSpec getPowerSpec(double theta,double phi);
27 // return Object including power spectrum versus frequency in direction theta, phi
28 // (W/m2/Hz/St)
29 // Not recommended for intensive use. May Be inefficient or inaccurrate..
30
31 //virtual double powerDens(double theta,double phi)=0;
32 // Return power Dens at coordinates, integrated over frequency
33 // May Require initialisation
34 // (Watt/m2/St)
35 double LSrcResol() const {
36 return resolution; // constructeur have to initialise res
37 }
38 inline bool IsQPtSrc() { return QPtSource;}
39 inline bool IsFreqSep() { return LScrFSep;}
40 inline bool IsMappedPowerSrc() {return IsLSrcMappedPower;}
41 // Optimisation pour calculs avec Lobes separables facon R. Teyssier
42 virtual void print(ostream& OutStr) const;
43/*
44 virtual void Reset(const SpectralResponse& Filtre) {
45 cerr<<"you call reset function when not allowed: program exit"<<endl;
46 exit(-1);
47 return;
48 }
49*/
50// Make sense only for QuasiPointSource
51 virtual UnitVector GetVSrcCenter();
52 virtual double getAngSize() {
53 cerr<<"call for getAngSize in a non Quasipt light source"<<endl;
54 exit(-1);
55 return 0;
56 }
57
58// Optimisation for LightSource separable in frequency
59 virtual double spectre(double frequence) {
60 frequence=0;
61 // Return the frequency spectrum independent of coordinates
62 cerr<<"call for spectrum in an non separable light source"<<endl;
63 exit(-1);
64 return 0;
65 }
66
67 virtual double powerDensAmpli(double theta,double phi) {
68 theta=phi; //Pour eviter un warning
69 // Return power density Amplidude at coordinates (W/m2/GHz/St)
70 cerr<<"call for powerDensAmpli in an non separable LightSource"<<endl;
71 exit(-1);
72 return 0;
73 }
[1191]74 static double planckSpectrum(double freq, double Tempe=T_CMBR);
[801]75 // W/m2/st/Hz
[1191]76 static double planckSpecDiff(double DTempe, double freq, double Tempe=T_CMBR);
[801]77 // W/m2/St/Hz
78protected:
[1191]79// bool PtSourceS; // Is a set of PtSources (Galaxie IR ponctuelles?)
[801]80 bool QPtSource; // Is this a QuasiPointSource. (Sun, Jupiter, Mars et al.)
81 bool LScrFSep; // Are spatial coordinated and frequency separable variables?
82 bool IsLSrcMappedPower; // Is the LSrc a in band map power. Valid only for Lobes separabe in freq.
83 double resolution; // Map Pixellisation resolution.;
[1191]84 char Name[128];
[801]85};
86
[798]87#endif
Note: See TracBrowser for help on using the repository browser.