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