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

Last change on this file since 9435 was 9435, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 2.1 KB
Line 
1#ifndef STARCATALOG_H
2#define STARCATALOG_H
3
4#ifndef ROOT_TROOT
5#include <TROOT.h>
6#endif
7#ifndef ROOT_GuiTypes
8#include <GuiTypes.h>
9#endif
10#ifndef COSY_SlaStars
11#include "SlaStars.h"
12#endif
13
14typedef unsigned char byte;
15
16class MStarList;
17class MAstroCatalog;
18
19class StarCatalog : public SlaStars
20{
21private:
22
23 int fW;
24 int fH;
25
26
27 MAstroCatalog *fAstro;
28
29 double fPixSize; // [rad/pix] size of one pixel
30 double fSinAngle;
31 double fCosAngle;
32 double fAngle;
33
34 float fLimitMag; // [M] limiting magnitude for display
35
36 AltAz fAltAz; // [rad]
37 RaDec fRaDec; // [rad]
38
39 static void DrawCross(byte *img, const int x, const int y);
40 static void DrawCircle(int color, byte *img, int xx, int yy, int size);
41
42 void SetRaDec(const RaDec &radec);
43 void SetAltAz(const AltAz &altaz);
44
45 int fBox;
46
47public:
48 StarCatalog(MObservatory::LocationName_t key);
49 virtual ~StarCatalog();
50
51 void GetImg(byte *img, byte *cimg, MStarList &list) const;
52 void PaintImg(unsigned char *buf, int w, int h);
53
54 const AltAz GetAltAz() const /*[deg]*/ { return fAltAz*TMath::RadToDeg(); }
55 const ZdAz GetZdAz() const /*[deg]*/ { return ZdAz(TMath::Pi()/2-fAltAz.Alt(), fAltAz.Az())*kRad2Deg; }
56 const RaDec GetRaDec() const /*[deg]*/ { return fRaDec*kRad2Deg; }
57
58 void SetPixSize(const double pixsize);
59 void SetLimitMag(const float mag);
60 void SetRotationAngle(const double angle) { fSinAngle = sin(angle/kRad2Deg); fCosAngle = cos(angle/kRad2Deg); fAngle=angle; }
61 void Reload();
62
63 double GetRotationAngle() { return fAngle; }
64
65 double GetPixSize() const;
66
67 AltAz CalcAltAzFromPix(Double_t pixx, Double_t pixy) const;
68
69 virtual void SetMjd(double mjd);
70
71 void SetPointing(double mjd, const RaDec &radec)
72 {
73 SetMjd(mjd); SetRaDec(radec);
74 }
75
76 //void CalcStars(MStarList &list);
77 void CalcStars(MStarList &list, int xc, int yc, int xo, int yo) const;
78 static void DrawStars(MStarList &list, byte *img);
79
80 void SetBox(int box) { fBox = box; }
81
82 ClassDef(StarCatalog, 0)
83};
84
85#endif
Note: See TracBrowser for help on using the repository browser.