source: Sophya/trunk/ArchTOIPipe/ProcWSophya/toi2toi_addsp.h@ 2099

Last change on this file since 2099 was 2099, checked in by cecile, 23 years ago

* empty log message *

File size: 2.8 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: toi2toi_addsp.h,v 1.2 2002-07-16 15:26:19 cecile 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 "localmap.h"
16#include "flagtoidef.h"
17#include "xastropack.h"
18
19//-- Un projecteur de TOI sur une carte quelconque
20// Lecture de 3 TOI coord1,coord2,boloMuV
21// Sortie pas de TOI, une (2) cartes
22//
23// Structure generale :
24// |---->Carte
25// |
26// -----------
27// toi Coord1In ---> | |
28// toi Coord2In ---> | TOI2Map |
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
35// Si les CoordIn et les CoordMap sont equatoriales -> meme equinoxe!
36
37struct Info_src
38{
39 double glon,glat;
40 double azi,elv;
41 double amp,tau1,tau2;
42};
43
44void Fill_Info_scr(Info_src* scr, int_4 ns);
45
46class Toi2toi_Addsp : public TOIProcessor {
47public:
48 Toi2toi_Addsp(Info_src* info, int_4 ns);
49 virtual ~Toi2toi_Addsp();
50
51 virtual void init(void);
52 virtual void run(void);
53
54 // Coordonnees donnees en entree et en sortie
55 inline void SetEquinox(double actualyear=2000.)
56 {mActualYear = actualyear;}
57
58 inline void SetCoorIn(unsigned long mfg=TypCoordGalStd)
59 {mTypCoorIn = mfg;}
60 inline void SetCoorIn(const char *ctype)
61 {mTypCoorIn = DecodeTypAstro(ctype);}
62
63 inline void SetCoorMap(unsigned long mfg=TypCoordGal)
64 {mTypCoorMap = mfg;}
65 inline void SetCoorMap(const char *ctype)
66 {mTypCoorMap = DecodeTypAstro(ctype);}
67
68 // Test on flag value ? if yes, BAD sample have flag matching mBadFlag
69 inline void SetTestFlag(bool tflg=false, uint_8 badflg=FlgToiAll)
70 {mTFlag = tflg; mBadFlag = badflg;}
71 // Test on min value ? if yes, GOOD sample have value >= mValMin
72 // Test on max value ? if yes, GOOD sample have value <= mValMax
73 // Good values are (mValMin <= sample value <= mValMax)
74 // bounds are included
75 inline void SetTestMin(bool tmin=false, r_8 vmin=-1.e30)
76 {mTMin = tmin; mValMin = vmin;}
77 inline void SetTestMax(bool tmax=false, r_8 vmax=+1.e30)
78 {mTMax = tmax; mValMax = vmax;}
79 // Print
80 void Print(::ostream & os);
81
82protected:
83
84 unsigned long mTypCoorIn, mTypCoorMap;
85 double mActualYear;
86 Info_src* src;
87 int_4 nb_src;
88
89 bool mTFlag,mTMin,mTMax;
90 uint_8 mBadFlag;
91 r_8 mValMin,mValMax;
92
93};
94
95#endif
Note: See TracBrowser for help on using the repository browser.