| [1185] | 1 | #ifndef LightPtSrcLevSInBand_H
 | 
|---|
 | 2 | #define LightPtSrcLevSInBand_H
 | 
|---|
 | 3 | 
 | 
|---|
 | 4 | #include <iostream>
 | 
|---|
 | 5 | #include <map>
 | 
|---|
 | 6 | //#include "levsptsrc.h"
 | 
|---|
 | 7 | 
 | 
|---|
| [1190] | 8 | #include "levelsplanckband.h"
 | 
|---|
| [1185] | 9 | 
 | 
|---|
 | 10 | struct LevSPtSrcData 
 | 
|---|
 | 11 | {       float flux30G;
 | 
|---|
 | 12 |         float flux44G;
 | 
|---|
 | 13 |         float flux70G;
 | 
|---|
 | 14 |         float flux100G;
 | 
|---|
 | 15 |         float flux143G;
 | 
|---|
 | 16 |         float flux217G;
 | 
|---|
 | 17 |         float flux352G;
 | 
|---|
 | 18 |         float flux545G;
 | 
|---|
 | 19 |         float flux857G;
 | 
|---|
 | 20 |         
 | 
|---|
 | 21 |         float getPower(LevSPanckBand band) const
 | 
|---|
 | 22 |         {       // Unit depend of context be carefull!
 | 
|---|
 | 23 |                 switch (band)
 | 
|---|
 | 24 |                 {       case Giga30: return flux30G;
 | 
|---|
 | 25 |                         case Giga44: return flux44G;
 | 
|---|
 | 26 |                         case Giga70: return flux70G;
 | 
|---|
 | 27 |                         case Giga100: return flux100G;
 | 
|---|
 | 28 |                         case Giga143: return flux143G;
 | 
|---|
 | 29 |                         case Giga217: return flux217G;
 | 
|---|
 | 30 |                         case Giga352: return flux352G;
 | 
|---|
 | 31 |                         case Giga545: return flux545G;
 | 
|---|
 | 32 |                         case Giga857: return flux857G;
 | 
|---|
 | 33 |                         default:
 | 
|---|
 | 34 |                         {       cerr<<"Erreur lecture de puissance dans LevSPtSrc::getPower. Exit(-1)"<<endl;
 | 
|---|
 | 35 |                                 exit(-1);
 | 
|---|
 | 36 |                                 return 0;
 | 
|---|
 | 37 |                         }
 | 
|---|
 | 38 |                 }
 | 
|---|
| [1190] | 39 |          
 | 
|---|
| [1185] | 40 |         }
 | 
|---|
 | 41 |         
 | 
|---|
 | 42 | };
 | 
|---|
 | 43 | 
 | 
|---|
 | 44 | struct LevSPtSrcCmpUnitVec 
 | 
|---|
| [1190] | 45 | {       bool operator()(const UnitVector& coord1, const UnitVector& coord2) const
 | 
|---|
| [1185] | 46 |         {       if ( coord1.Theta() < coord2.Theta() )  return true;
 | 
|---|
 | 47 |                 if (  coord1.Theta() == coord2.Theta() ) 
 | 
|---|
| [1190] | 48 |                 {       if (  coord1.Phi() > coord2.Phi() ) return true;
 | 
|---|
| [1185] | 49 |                 }       
 | 
|---|
 | 50 |                 return false;
 | 
|---|
 | 51 |         }
 | 
|---|
 | 52 | };
 | 
|---|
 | 53 | 
 | 
|---|
 | 54 | class LightPtSrcLevSInBand
 | 
|---|
 | 55 | {
 | 
|---|
 | 56 |  public:
 | 
|---|
 | 57 |         LightPtSrcLevSInBand(char FileOfPtSrc[]);
 | 
|---|
 | 58 |         ~LightPtSrcLevSInBand() {}
 | 
|---|
 | 59 |         //      double powSpec(double theta,double phi,LevSPanckBand Band);
 | 
|---|
 | 60 |         // Return power in band in Watt/m2
 | 
|---|
 | 61 |         multimap <UnitVector,LevSPtSrcData,LevSPtSrcCmpUnitVec> MapOfPtSrc;
 | 
|---|
 | 62 |         void print(ostream& out)
 | 
|---|
 | 63 |         {       out<< Name<<endl; }
 | 
|---|
| [1190] | 64 |         void DumpMap(LevSPanckBand band);
 | 
|---|
 | 65 |                 // Write a Mollweide projection of the Point Sources Sky
 | 
|---|
 | 66 |                 // power in the LevSPanckBand band
 | 
|---|
 | 67 |         
 | 
|---|
| [1185] | 68 |  protected:
 | 
|---|
 | 69 |         void readLevSPtSrc(char HFIfile[]);
 | 
|---|
 | 70 |         char Name[128];
 | 
|---|
| [1190] | 71 | 
 | 
|---|
| [1185] | 72 | };
 | 
|---|
 | 73 | 
 | 
|---|
 | 74 | #endif
 | 
|---|
 | 75 | 
 | 
|---|