source: Sophya/trunk/ArchTOIPipe/ProcWSophya/toi2map.h@ 1792

Last change on this file since 1792 was 1792, checked in by aubourg, 24 years ago

gestion colatitude un peu nettoyee

File size: 2.7 KB
Line 
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.11 2001-11-27 12:12:12 aubourg 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
36class TOI2Map : public TOIProcessor {
37public:
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 void SetIsColat(bool b=true) {mIsColat=b;} // latitude is a colatitude, 0-Pi
66protected:
67 SphereHEALPix<r_8>* mSph;
68 SphereHEALPix<r_8>* mWSph;
69 bool mWSphInternal;
70
71 TypAstroCoord mTypCoorIn, mTypCoorOut;
72 double mActualYear;
73
74 bool mTFlag,mTMin,mTMax;
75 bool mIsColat; // temporary fix
76 uint_8 mBadFlag;
77 r_8 mValMin,mValMax;
78};
79
80#endif
Note: See TracBrowser for help on using the repository browser.