| 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"
|
|---|
| 6 | #include "toiprocessor.h"
|
|---|
| 7 | #include "spherehealpix.h"
|
|---|
| 8 | #include "flagtoidef.h"
|
|---|
| 9 | #include "xastropack.h"
|
|---|
| 10 |
|
|---|
| 11 | //-- Un projecteur de TOI sur une sphere Healpix
|
|---|
| 12 | // Lecture de 3 TOI coord1,coord2,boloMuV
|
|---|
| 13 | // Sortie pas de TOI, une (2) sphere(s) Healpix
|
|---|
| 14 | //
|
|---|
| 15 | // Structure generale :
|
|---|
| 16 | // |---->Sphere
|
|---|
| 17 | // |
|
|---|
| 18 | // -----------
|
|---|
| 19 | // toi Coord1In ---> | |
|
|---|
| 20 | // toi Coord2In ---> | TOI2Map |
|
|---|
| 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
|
|---|
| 27 | // Si les CoordIn et les CoordOut sont equatoriales -> meme equinoxe!
|
|---|
| 28 |
|
|---|
| 29 | class TOI2Map : public TOIProcessor {
|
|---|
| 30 | public:
|
|---|
| 31 | TOI2Map(SphereHEALPix<r_8>* sph,SphereHEALPix<r_8>* wsph=NULL);
|
|---|
| 32 | virtual ~TOI2Map();
|
|---|
| 33 |
|
|---|
| 34 | virtual void init(void);
|
|---|
| 35 | virtual void run(void);
|
|---|
| 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;}
|
|---|
| 44 | // Test on flag value ? if yes, BAD sample have flag matching mBadFlag
|
|---|
| 45 | inline void SetTestFlag(bool tflg=false, uint_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);
|
|---|
| 57 |
|
|---|
| 58 | protected:
|
|---|
| 59 | SphereHEALPix<r_8>* mSph;
|
|---|
| 60 | SphereHEALPix<r_8>* mWSph;
|
|---|
| 61 | bool mWSphInternal;
|
|---|
| 62 |
|
|---|
| 63 | TypAstroCoord mTypCoorIn, mTypCoorOut;
|
|---|
| 64 | double mActualYear;
|
|---|
| 65 |
|
|---|
| 66 | bool mTFlag,mTMin,mTMax;
|
|---|
| 67 | uint_8 mBadFlag;
|
|---|
| 68 | r_8 mValMin,mValMax;
|
|---|
| 69 | };
|
|---|
| 70 |
|
|---|
| 71 | #endif
|
|---|