source: trunk/MagicSoft/Cosy/catalog/StarCatalog.h@ 851

Last change on this file since 851 was 808, checked in by tbretz, 23 years ago
*** empty log message ***
File size: 2.4 KB
Line 
1#ifndef STARCATALOG_H
2#define STARCATALOG_H
3
4#ifndef ROOT_TROOT
5#include <TROOT.h>
6#endif
7#ifndef SAOFILE_H
8#include "SaoFile.h"
9#endif
10#ifndef SLALIB_H
11#include "Slalib.h"
12#endif
13
14#include "coord.h"
15
16typedef unsigned char byte;
17
18class StarCatalog
19{
20private:
21 SaoFile *fSao;
22 sort_t *fSrt;
23 int fEntries;
24
25 Slalib sla;
26
27// double fPhi; // location of observatory
28// double fElong;
29
30 double fPixSize; // [rad/pix] size of one pixel
31 double fWidth; // size of display
32 double fHeight; //
33
34 float fLimitMag; // [M] limiting magnitude for display
35
36 AltAz fAltAz; // [rad]
37 byte fAz0[360];
38 int fAltMin;
39 int fAltMax;
40 int fAzCnt;
41
42 RaDec fRaDec; // [rad]
43 byte fRa0[360];
44 int fRaCnt;
45 int fDecMin;
46 int fDecMax;
47
48// double fAlpha;
49// double fMjd;
50// double fAmprms[21];
51// double fAoprms[14];
52
53 void DrawCross(byte *img, const int x, const int y);
54 void DrawCircle(int color, byte *img, int xx, int yy, int size);
55
56 Bool_t DrawAltAz(const int color, byte *img, double alt, double az, int size=0);
57 Bool_t DrawRaDec(const int color, byte *img, double ra, double dec, int size=0);
58
59 Bool_t Draw(const int color, byte *img, const AltAz &altaz);
60 Bool_t Draw(const int color, byte *img, const RaDec &radec);
61 Bool_t Draw(const int color, byte *img, const SaoFile *sao);
62
63 void CalcImg(byte *);
64
65 void SetRaDec(const RaDec &radec);
66 void SetAltAz(const AltAz &altaz);
67// void SetMjd(const double mjd);
68 void DrawSCAltAz(byte *img, const int color);
69 void DrawSCRaDec(byte *img, const int color);
70
71 void CalcRaDecRange();
72 void CalcAltAzRange();
73
74// RaDec AltAz2RaDec(const AltAz &altaz) const;
75// AltAz RaDec2AltAz(const RaDec &radec, const RaDec &rdpm) const;
76
77public:
78 StarCatalog();
79 virtual ~StarCatalog();
80
81 void GetImg(byte *img, byte *cimg, const double utc,
82 const RaDec &radec);
83 void GetImg(byte *img, byte *cimg, const double utc,
84 const AltAz &altaz);
85
86 const AltAz GetAltAz() const { return fAltAz*360/D2PI; }
87 const ZdAz GetZdAz() const { return ZdAz(DPI/2-fAltAz.Alt(), fAltAz.Az())*360/D2PI; }
88 const RaDec GetRaDec() const { return fRaDec*360/D2PI; }
89
90 void SetPixSize(const double pixsize);
91 void SetLimitMag(const float mag) { fLimitMag = mag; };
92};
93
94#endif
Note: See TracBrowser for help on using the repository browser.