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

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