| Line |   | 
|---|
| 1 |                         // Dominique YVON, CEA/DAPNIA/SPP 02/2000
 | 
|---|
| 2 | 
 | 
|---|
| 3 | #include <stdio.h>
 | 
|---|
| 4 | #include <stdlib.h>
 | 
|---|
| 5 | #include <math.h>
 | 
|---|
| 6 | #include "spherehealpix.h"
 | 
|---|
| 7 | #include "fitsspherehealpix.h"
 | 
|---|
| 8 | #include "lightsynchro.h"
 | 
|---|
| 9 | 
 | 
|---|
| 10 | #ifdef __MWERKS__
 | 
|---|
| 11 |    #include "macenvvariables.h"
 | 
|---|
| 12 | #endif
 | 
|---|
| 13 | 
 | 
|---|
| 14 | LightSynchro::LightSynchro(int_4 nside) 
 | 
|---|
| 15 | { sprintf(Name, "Lumire Synchrotron");
 | 
|---|
| 16 |   freqRef=0.408e9;                              // frequence de la carte 0.408 GHz
 | 
|---|
| 17 |   index=-0.9;
 | 
|---|
| 18 |   nlat=nside;
 | 
|---|
| 19 |   if (!(nside==1024)) {
 | 
|---|
| 20 |     cerr<<" Fond LightSynchro calcul avec Nside= "<<nside<<endl;
 | 
|---|
| 21 |     cerr<<" carte de resolution nside= 1024 disponible"<<endl;
 | 
|---|
| 22 |   } 
 | 
|---|
| 23 |   
 | 
|---|
| 24 |   resolution=2*3.14159/4./nlat;         // Radians
 | 
|---|
| 25 |   
 | 
|---|
| 26 |   try { pMap=new SphereHEALPix<r_4>(nlat);  }   // MJy/m2/Hz/st cad 10-20 W/m2/Hz/st
 | 
|---|
| 27 |   catch(bad_alloc) {
 | 
|---|
| 28 |     cerr<<"memory booking error LightSynchro constructor nlat= "<<nlat<<endl;
 | 
|---|
| 29 |     exit(-1);
 | 
|---|
| 30 |   }
 | 
|---|
| 31 |   char filename[150];
 | 
|---|
| 32 | #ifndef __MWERKS__
 | 
|---|
| 33 |   char *PATHDataLScr=getenv("PATHDataLScr"); 
 | 
|---|
| 34 | #endif
 | 
|---|
| 35 |   sprintf(filename,"%ssync_res%04i.fits",PATHDataLScr,nside);
 | 
|---|
| 36 |   
 | 
|---|
| 37 |   FITS_SphereHEALPix<r_4> FSphere(*pMap);
 | 
|---|
| 38 |   FSphere.Read(filename);                               // unite: MJy/m2/Hz/st. 
 | 
|---|
| 39 | };
 | 
|---|
| 40 | 
 | 
|---|
| 41 | LightSynchro::~LightSynchro() {
 | 
|---|
| 42 |   delete pMap;  
 | 
|---|
| 43 | }
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.