[1463] | 1 | // This may look like C code, but it is really -*- C++ -*-
|
---|
| 2 | #ifndef TOI2MAP_H
|
---|
| 3 | #define TOI2MAP_H
|
---|
| 4 |
|
---|
| 5 | #include "toiprocessor.h"
|
---|
[1530] | 6 | #include "toiprocessor.h"
|
---|
[1463] | 7 | #include "spherehealpix.h"
|
---|
[1516] | 8 | #include "flagtoidef.h"
|
---|
| 9 | #include "xastropack.h"
|
---|
[1463] | 10 |
|
---|
| 11 | //-- Un projecteur de TOI sur une sphere Healpix
|
---|
[1516] | 12 | // Lecture de 3 TOI coord1,coord2,boloMuV
|
---|
| 13 | // Sortie pas de TOI, une (2) sphere(s) Healpix
|
---|
[1463] | 14 | //
|
---|
| 15 | // Structure generale :
|
---|
[1516] | 16 | // |---->Sphere
|
---|
| 17 | // |
|
---|
| 18 | // -----------
|
---|
[1498] | 19 | // toi Coord1In ---> | |
|
---|
| 20 | // toi Coord2In ---> | TOI2Map |
|
---|
[1516] | 21 | // toi BoloIn ---> | |
|
---|
| 22 | // -----------
|
---|
| 23 | // Gestion du type de coordonnees :
|
---|
| 24 | // Coord1In,Coord2In : soit Equatoriales (Alpha,Delta)
|
---|
| 25 | // soit Galactiques (GLong,GLat)
|
---|
| 26 | // Sortie sur une sphere en coordonnees Equatoriales ou Galactiques
|
---|
[1520] | 27 | // Si les CoordIn et les CoordOut sont equatoriales -> meme equinoxe!
|
---|
[1463] | 28 |
|
---|
| 29 | class TOI2Map : public TOIProcessor {
|
---|
| 30 | public:
|
---|
| 31 | TOI2Map(SphereHEALPix<r_8>* sph,SphereHEALPix<r_8>* wsph=NULL);
|
---|
| 32 | virtual ~TOI2Map();
|
---|
| 33 |
|
---|
[1516] | 34 | virtual void init(void);
|
---|
[1463] | 35 | virtual void run(void);
|
---|
[1516] | 36 |
|
---|
| 37 | // Coordonnees donnees en entree et en sortie
|
---|
| 38 | inline void SetEquinox(double actualyear=2000.)
|
---|
| 39 | {mActualYear = actualyear;}
|
---|
| 40 | inline void SetCoorIn(TypAstroCoord mfg=TypCoordGalStd)
|
---|
| 41 | {mTypCoorIn = mfg;}
|
---|
| 42 | inline void SetCoorOut(TypAstroCoord mfg=TypCoordGalStd)
|
---|
| 43 | {mTypCoorOut = mfg;}
|
---|
[1530] | 44 | // Test on flag value ? if yes, BAD sample have flag matching mBadFlag
|
---|
| 45 | inline void SetTestFlag(bool tflg=false, int_8 badflg=0)
|
---|
| 46 | {mTFlag = tflg; mBadFlag = badflg;}
|
---|
| 47 | // Test on min value ? if yes, GOOD sample have value >= mValMin
|
---|
| 48 | // Test on max value ? if yes, GOOD sample have value <= mValMax
|
---|
| 49 | // Good values are (mValMin <= sample value <= mValMax)
|
---|
| 50 | // bounds are included
|
---|
| 51 | inline void SetTestMin(bool tmin=false, r_8 vmin=-1.e30)
|
---|
| 52 | {mTMin = tmin; mValMin = vmin;}
|
---|
| 53 | inline void SetTestMax(bool tmax=false, r_8 vmax=+1.e30)
|
---|
| 54 | {mTMax = tmax; mValMax = vmax;}
|
---|
| 55 | // Print
|
---|
| 56 | void Print(ostream & os);
|
---|
[1516] | 57 |
|
---|
[1463] | 58 | protected:
|
---|
| 59 | SphereHEALPix<r_8>* mSph;
|
---|
| 60 | SphereHEALPix<r_8>* mWSph;
|
---|
| 61 | bool mWSphInternal;
|
---|
[1530] | 62 |
|
---|
[1516] | 63 | TypAstroCoord mTypCoorIn, mTypCoorOut;
|
---|
[1463] | 64 | double mActualYear;
|
---|
[1530] | 65 |
|
---|
| 66 | bool mTFlag,mTMin,mTMax;
|
---|
| 67 | int_8 mBadFlag;
|
---|
| 68 | r_8 mValMin,mValMax;
|
---|
[1463] | 69 | };
|
---|
| 70 |
|
---|
| 71 | #endif
|
---|