source: Sophya/trunk/SophyaLib/Samba/spherethetaphi.h@ 413

Last change on this file since 413 was 228, checked in by ansari, 26 years ago

Creation du module DPC/Samba Reza 13/04/99

File size: 2.7 KB
RevLine 
[228]1#ifndef SPHERETHETAPHI_SEEN
2#define SPHERETHETAPHI_SEEN
3
4#include "sphericalmap.h"
5#include "pdataarray.h"
6#include "cvector.h"
7
8// ***************** CLASSE SphereThetaPhi *****************************
9
10
11class SphereThetaPhi : public SphericalMap {
12public :
13
14
15SphereThetaPhi(int_4 m, int_4 pet);
16SphereThetaPhi();
17SphereThetaPhi(char* flnm);
18virtual ~SphereThetaPhi();
19
20// ------------ Persistence handling
21
22 enum {classId = 0xF001 };
23int_4 ClassId() const { return classId; }
24
25virtual void WriteSelf(POutPersist&) const;
26virtual void ReadSelf(PInPersist&);
27
28// ------------------ Definition of PixelMap abstract methods
29
30// number of pixels
31virtual int_4 NbPixels() const;
32
33// Value of pixel number k
34virtual r_8& PixVal(int_4 k);
35virtual r_8 const& PixVal(int_4 k) const;
36
37// Index of pixel at (theta,phi)
38virtual int_4 PixIndexSph(float theta, float phi) const;
39
40// Spherical coordinates of center of pixel number k
41virtual void PixThetaPhi(int_4 k, float& theta, float& phi) const;
42
43// Pixel Solid angle (steradians)
44virtual r_8 PixSolAngle(int_4 dummy) const;
45// --------------- Specific methods
46
47
48/* Valeurs de theta des paralleles et phi des meridiens limitant */
49/* le pixel d'indice k */
50virtual void Limits(int_4 k, float& tet1, float& tet2,
51 float& phi1, float& phi2 );
52
53/* Nombre de tranches en theta */
54int_4 NbThetaSlices() const;
55
56/* Nombre de pixels en phi de la tranche d'indice kt */
57int_4 NPhi(int_4 kt) const;
58
59/* Renvoie dans t1,t2 les valeurs respectives de theta min et theta max */
60/* de la tranche d'indice kt */
61void Theta(int_4 kt, float& t1, float& t2);
62
63/* Renvoie dans p1,p2 les valeurs phimin et phimax du pixel d'indice jp */
64/* dans la tranche d'indice kt */
65void Phi(int_4 kt, int_4 jp, float& p1, float& p2);
66
67/* Renvoie l'indice k du pixel d'indice jp dans la tranche d'indice kt */
68int_4 Index(int_4 kt, int_4 jp) const;
69
70
71/* Indice kt de la tranche et indice jp du pixel d'indice k */
72void ThetaPhiIndex(int_4 k,int_4& kt,int_4& jp);
73
74void Pixelize(int_4,int_4);
75void GetThetaSlice(int_4 index, r_4& theta, Vector& phi, Vector& value) const;
76
77
78private :
79// ------------- méthodes internes ----------------------
80
81
82void InitNul();
83void Clear();
84
85// ------------- variables internes -----------------------
86int_4 mNTheta,mNPet;
87int_4 mNPix;
88r_4* mTheta;
89r_8 mOmeg;
90int_4* mNphi;
91int_4* mTNphi;
92//r_8* mPix;
93PDataArray<r_8>* _pixel;
94
95
96};
97
98
99
100#endif
Note: See TracBrowser for help on using the repository browser.