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

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