[1463] | 1 | // This may look like C code, but it is really -*- C++ -*-
|
---|
[1738] | 2 |
|
---|
| 3 | // ArchTOIPipe (C) CEA/DAPNIA/SPP IN2P3/LAL
|
---|
| 4 | // Eric Aubourg
|
---|
| 5 | // Christophe Magneville
|
---|
| 6 | // Reza Ansari
|
---|
[1807] | 7 | // $Id: toi2map.h,v 1.13 2001-12-01 13:34:09 aubourg Exp $
|
---|
[1738] | 8 |
|
---|
[1805] | 9 | #ifndef TOI2GMAP_H
|
---|
| 10 | #define TOI2GMAP_H
|
---|
[1463] | 11 |
|
---|
| 12 | #include "toiprocessor.h"
|
---|
[1530] | 13 | #include "toiprocessor.h"
|
---|
[1463] | 14 | #include "spherehealpix.h"
|
---|
[1805] | 15 | #include "localmap.h"
|
---|
[1516] | 16 | #include "flagtoidef.h"
|
---|
| 17 | #include "xastropack.h"
|
---|
[1463] | 18 |
|
---|
[1805] | 19 | //-- Un projecteur de TOI sur une carte quelconque
|
---|
[1516] | 20 | // Lecture de 3 TOI coord1,coord2,boloMuV
|
---|
[1805] | 21 | // Sortie pas de TOI, une (2) cartes
|
---|
[1463] | 22 | //
|
---|
| 23 | // Structure generale :
|
---|
[1805] | 24 | // |---->Carte
|
---|
[1516] | 25 | // |
|
---|
| 26 | // -----------
|
---|
[1498] | 27 | // toi Coord1In ---> | |
|
---|
| 28 | // toi Coord2In ---> | TOI2Map |
|
---|
[1516] | 29 | // toi BoloIn ---> | |
|
---|
| 30 | // -----------
|
---|
| 31 | // Gestion du type de coordonnees :
|
---|
| 32 | // Coord1In,Coord2In : soit Equatoriales (Alpha,Delta)
|
---|
| 33 | // soit Galactiques (GLong,GLat)
|
---|
| 34 | // Sortie sur une sphere en coordonnees Equatoriales ou Galactiques
|
---|
[1520] | 35 | // Si les CoordIn et les CoordOut sont equatoriales -> meme equinoxe!
|
---|
[1463] | 36 |
|
---|
[1807] | 37 | class TOI2Map : public TOIProcessor {
|
---|
[1463] | 38 | public:
|
---|
[1807] | 39 | TOI2Map(PixelMap<r_8>* map,PixelMap<r_8>* wmap=NULL);
|
---|
| 40 | virtual ~TOI2Map();
|
---|
[1463] | 41 |
|
---|
[1516] | 42 | virtual void init(void);
|
---|
[1463] | 43 | virtual void run(void);
|
---|
[1516] | 44 |
|
---|
| 45 | // Coordonnees donnees en entree et en sortie
|
---|
| 46 | inline void SetEquinox(double actualyear=2000.)
|
---|
| 47 | {mActualYear = actualyear;}
|
---|
| 48 | inline void SetCoorIn(TypAstroCoord mfg=TypCoordGalStd)
|
---|
| 49 | {mTypCoorIn = mfg;}
|
---|
| 50 | inline void SetCoorOut(TypAstroCoord mfg=TypCoordGalStd)
|
---|
| 51 | {mTypCoorOut = mfg;}
|
---|
[1530] | 52 | // Test on flag value ? if yes, BAD sample have flag matching mBadFlag
|
---|
[1739] | 53 | inline void SetTestFlag(bool tflg=false, uint_8 badflg=FlgToiAll)
|
---|
[1530] | 54 | {mTFlag = tflg; mBadFlag = badflg;}
|
---|
| 55 | // Test on min value ? if yes, GOOD sample have value >= mValMin
|
---|
| 56 | // Test on max value ? if yes, GOOD sample have value <= mValMax
|
---|
| 57 | // Good values are (mValMin <= sample value <= mValMax)
|
---|
| 58 | // bounds are included
|
---|
| 59 | inline void SetTestMin(bool tmin=false, r_8 vmin=-1.e30)
|
---|
| 60 | {mTMin = tmin; mValMin = vmin;}
|
---|
| 61 | inline void SetTestMax(bool tmax=false, r_8 vmax=+1.e30)
|
---|
| 62 | {mTMax = tmax; mValMax = vmax;}
|
---|
| 63 | // Print
|
---|
[1762] | 64 | void Print(::ostream & os);
|
---|
[1516] | 65 |
|
---|
[1792] | 66 | void SetIsColat(bool b=true) {mIsColat=b;} // latitude is a colatitude, 0-Pi
|
---|
[1463] | 67 | protected:
|
---|
[1805] | 68 | PixelMap<r_8>* mMap;
|
---|
| 69 | PixelMap<r_8>* mWMap;
|
---|
| 70 | bool mWMapInternal;
|
---|
[1530] | 71 |
|
---|
[1516] | 72 | TypAstroCoord mTypCoorIn, mTypCoorOut;
|
---|
[1463] | 73 | double mActualYear;
|
---|
[1530] | 74 |
|
---|
| 75 | bool mTFlag,mTMin,mTMax;
|
---|
[1792] | 76 | bool mIsColat; // temporary fix
|
---|
[1536] | 77 | uint_8 mBadFlag;
|
---|
[1530] | 78 | r_8 mValMin,mValMax;
|
---|
[1463] | 79 | };
|
---|
| 80 |
|
---|
| 81 | #endif
|
---|