Rev | Line | |
---|
[801] | 1 | // Dominique YVON, CEA/DAPNIA/SPP 02/2000
|
---|
| 2 |
|
---|
| 3 | #include "lightsrcmappowerinband.h"
|
---|
[1148] | 4 | #include "fitsspherehealpix.h"
|
---|
[801] | 5 |
|
---|
| 6 | double LightSrcMapPowerInband::powerDensAmpli(double theta,double phi)
|
---|
| 7 | { return (*pMap)(theta,phi);
|
---|
| 8 | // Return power density Amplidude at coordinates
|
---|
| 9 | // (W/m2/Hz/st)
|
---|
| 10 | }
|
---|
| 11 |
|
---|
| 12 | double LightSrcMapPowerInband::spectre(double freq)
|
---|
| 13 | { if((freq>freqMax)||(freq<freqMin)) return 0.;
|
---|
| 14 | else return SpectreAmpli;
|
---|
| 15 | }
|
---|
| 16 |
|
---|
| 17 | LightSrcMapPowerInband::LightSrcMapPowerInband
|
---|
| 18 | (char filename[],long nside, double MinFreq, double MaxFreq)
|
---|
| 19 | :freqMax(MaxFreq), freqMin(MinFreq), nlat(nside)
|
---|
| 20 | {
|
---|
| 21 | resolution=2*3.14159/4./nlat; // Resolution angulaire de la carte lue pour ce fond.
|
---|
| 22 | // Radians
|
---|
| 23 | SpectreAmpli=1./(freqMax-freqMin);
|
---|
| 24 | if(MinFreq>MaxFreq) cerr<<"Erreur freq Min>freq Max in LightSrcMapPowerInband"<<endl;
|
---|
| 25 |
|
---|
[1148] | 26 | try { pMap=new SphereHEALPix<r_4> (nlat); }
|
---|
[801] | 27 | catch(bad_alloc) {
|
---|
| 28 | cerr<<"Memory booking error LightSrcMapPowerInband, nlat= "<<nlat<<endl;
|
---|
| 29 | exit(-1);
|
---|
| 30 | }
|
---|
| 31 | cout<<"On lit la carte "<<filename<<endl;
|
---|
[1148] | 32 |
|
---|
| 33 | FITS_SphereHEALPix<r_4> FSphere(*pMap);
|
---|
| 34 | FSphere.Read(filename);
|
---|
[801] | 35 | }
|
---|
| 36 |
|
---|
| 37 | LightSrcMapPowerInband::~LightSrcMapPowerInband()
|
---|
| 38 | { delete pMap;
|
---|
| 39 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.