source: Sophya/trunk/SigPredictor/lightsrcmappowerinband.cc@ 801

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

Fichiers au format unix

dominique

File size: 1.2 KB
Line 
1 // Dominique YVON, CEA/DAPNIA/SPP 02/2000
2
3#include "lightsrcmappowerinband.h"
4#include "fitsioserver.h"
5
6double 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
12double LightSrcMapPowerInband::spectre(double freq)
13{ if((freq>freqMax)||(freq<freqMin)) return 0.;
14 else return SpectreAmpli;
15}
16
17LightSrcMapPowerInband::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
26 try { pMap=new SphereGorski<float> (nlat); }
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;
32 FitsIoServer FitsServer;
33 FitsServer.load((*pMap),filename);
34}
35
36LightSrcMapPowerInband::~LightSrcMapPowerInband()
37{ delete pMap;
38}
Note: See TracBrowser for help on using the repository browser.