Last change
on this file since 798 was 798, checked in by ansari, 25 years ago |
Creation du module SigPredictor (Simulation de signal Archeops/Planck)
de Dominique Yvon - Reza 30/3/2000
|
File size:
1.1 KB
|
Line | |
---|
1 | // Dominique YVON, CEA/DAPNIA/SPP 02/2000
|
---|
2 |
|
---|
3 | #include <stdio.h>
|
---|
4 | #include <stdlib.h>
|
---|
5 | #include <math.h>
|
---|
6 | #include "spheregorski.h"
|
---|
7 | #include "fitsioserver.h"
|
---|
8 | #include "lightsynchro.h"
|
---|
9 |
|
---|
10 | #ifdef __MWERKS__
|
---|
11 | #include "mwerksmath.h"
|
---|
12 | #include "macenvvariables.h"
|
---|
13 | #endif
|
---|
14 |
|
---|
15 | LightSynchro::LightSynchro(int_4 nside)
|
---|
16 | { sprintf(Name, "Lumire Synchrotron");
|
---|
17 | freqRef=0.408e9; // frequence de la carte 0.408 GHz
|
---|
18 | index=-0.9;
|
---|
19 | nlat=nside;
|
---|
20 | if (!(nside==1024)) {
|
---|
21 | cerr<<" Fond LightSynchro calcul avec Nside= "<<nside<<endl;
|
---|
22 | cerr<<" carte de resolution nside= 1024 disponible"<<endl;
|
---|
23 | }
|
---|
24 |
|
---|
25 | resolution=2*3.14159/4./nlat; // Radians
|
---|
26 |
|
---|
27 | try { pMap=new SphereGorski<float>(nlat); } // MJy/m2/Hz/st cad 10-20 W/m2/Hz/st
|
---|
28 | catch(bad_alloc) {
|
---|
29 | cerr<<"memory booking error LightSynchro constructor nlat= "<<nlat<<endl;
|
---|
30 | exit(-1);
|
---|
31 | }
|
---|
32 | char filename[150];
|
---|
33 | #ifndef __MWERKS__
|
---|
34 | char *PATHDataLScr=getenv("PATHDataLScr");
|
---|
35 | #endif
|
---|
36 | sprintf(filename,"%ssync_res%04i.fits",PATHDataLScr,nside);
|
---|
37 | FitsIoServer FitsServer;
|
---|
38 | FitsServer.load((*pMap),filename);
|
---|
39 | // unite: MJy/m2/Hz/st.
|
---|
40 | };
|
---|
41 |
|
---|
42 | LightSynchro::~LightSynchro() {
|
---|
43 | delete pMap;
|
---|
44 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.