source: Sophya/trunk/ArchTOIPipe/ProcWSophya/flag2map.h@ 2353

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

...

File size: 3.0 KB
RevLine 
[2015]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
[2038]7// $Id: flag2map.h,v 1.2 2002-05-31 09:55:42 cecile Exp $
[2015]8
9#ifndef FLAG2MAP_H
10#define FLAG2MAP_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
37class FLAG2Map : public TOIProcessor {
38public:
39 FLAG2Map(PixelMap<r_8>* map,PixelMap<r_8>* wmap=NULL);
40 //TOI2Map(SphereHEALPix<r_8>* map,SphereHEALPix<r_8>* wmap=NULL);
41 virtual ~FLAG2Map();
42
43 virtual void init(void);
44 virtual void run(void);
45
46 // Coordonnees donnees en entree et en sortie
47 inline void SetEquinox(double actualyear=2000.)
48 {mActualYear = actualyear;}
49
50 inline void SetCoorIn(unsigned long mfg=TypCoordGalStd)
51 {mTypCoorIn = mfg;}
52 inline void SetCoorIn(const char *ctype)
53 {mTypCoorIn = DecodeTypAstro(ctype);}
54
55 inline void SetCoorMap(unsigned long mfg=TypCoordGal)
56 {mTypCoorMap = mfg;}
57 inline void SetCoorMap(const char *ctype)
58 {mTypCoorMap = DecodeTypAstro(ctype);}
59
60 // Test on flag value ? if yes, BAD sample have flag matching mBadFlag
61 inline void SetTestFlag(bool tflg=false, uint_8 badflg=FlgToiAll)
62 {mTFlag = tflg; mBadFlag = badflg;}
63 // Test on min value ? if yes, GOOD sample have value >= mValMin
64 // Test on max value ? if yes, GOOD sample have value <= mValMax
65 // Good values are (mValMin <= sample value <= mValMax)
66 // bounds are included
67 inline void SetTestMin(bool tmin=false, r_8 vmin=-1.e30)
68 {mTMin = tmin; mValMin = vmin;}
69 inline void SetTestMax(bool tmax=false, r_8 vmax=+1.e30)
70 {mTMax = tmax; mValMax = vmax;}
71 // Print
72 void Print(::ostream & os);
73 inline int_8 ProcessedSampleCount() const { return totnscount; }
74
75protected:
76 PixelMap<r_8>* mMap;
77 PixelMap<r_8>* mWMap;
78 bool mWMapInternal;
79
80 unsigned long mTypCoorIn, mTypCoorMap;
81 double mActualYear;
82
83 bool mTFlag,mTMin,mTMax;
84 uint_8 mBadFlag;
85 r_8 mValMin,mValMax;
86 int_8 totnscount; // Nombre total d'echantillon processe
87
88};
89
90#endif
Note: See TracBrowser for help on using the repository browser.