Luiza  v03-01
GloriaSkyCatalog.h
1 // -*- mode: c++; mode: auto-fill; mode: flyspell-prig; -*-
2 
3 
4 #ifndef GloriaSkyCatalog_h
5 #define GloriaSkyCatalog_h 1
6 
7 
8 /*
9  * This source code is part of the LUIZA software package for GLORIA.
10  * You are free to use this source files for your own development as
11  * long as it stays in a public research context. You are not
12  * allowed to use it for commercial purpose. You must put this
13  * header with author names in all development based on this file.
14  *
15  */
16 
17 
18 #include "GloriaFitsTable.h"
19 
20 using namespace std;
21 
22 namespace gloria{
23 
25 
37 
38 
39  public:
40 
42 
45 
46 
47  // Data access methods
48  // ===================
49 
51  inline void AddObject(double ra, double dec) { AddRow(ra,dec); };
52 
53 
55  inline void AddObject() { AddRow(); };
56 
57 
59  inline int GetObjectNumber() {return _nRow;};
60 
62  inline double GetObjectRA( int iObject)
63  { return ((GloriaTableColumnOf<double> *)_columns.at(0))->At(iObject); };
64 
66  inline double GetObjectDEC( int iObject)
67  { return ((GloriaTableColumnOf<double> *)_columns.at(1))->At(iObject); };
68 
70  inline vector<double>& GetRAVector()
71  { return ((GloriaTableColumnOf<double> *)_columns.at(0))->Data(); };
72 
74  inline vector<double>& GetDECVector()
75  { return ((GloriaTableColumnOf<double> *)_columns.at(1))->Data(); };
76 
77 
79  inline void SetObjectRA( int iObject, double ra)
80  { ((GloriaTableColumnOf<double> *)_columns.at(0))->At(iObject) = ra; };
81 
83  inline void SetObjectDEC( int iObject, double dec)
84  { ((GloriaTableColumnOf<double> *)_columns.at(1))->At(iObject) = dec; };
85 
87  bool CheckCatalog();
88 
89 
91  inline GloriaFitsTable& GetTable() { return *(( GloriaFitsTable *) this ); };
92 
94 
101  int MatchObject(double ra, double dec, double cut);
102 
103 
105 
116  vector<long> MatchAllObjects(double ra, double dec, double distMax, double distMin=0.);
117 
118 
120 
126  long* MatchObjectArray(int nObject, double* RaArr, double* DecArr, double cut);
127 
128 
130 
136  vector<long> MatchObjectVector(vector<double>* RaVec, vector<double>* DecVec, double cut);
137 
138 
140 
151  vector<long> MatchObjectTable(GloriaFitsTable *table, double cut,
152  vector<string> RaDecNames, vector<string> CopyNames, vector<string> NewNames );
153 
155  vector<long> MatchObjectTable(GloriaFitsTable *table, double cut);
156 
158  vector<long> MatchObjectTable(GloriaFitsTable *table, double cut, vector<string> RaDecNames);
159 
160  private:
161 
163  double SkyDistance(double ra1, double dec1, double ra2, double dec2);
164 
165  } ;
166 
167 
168 }
169 
170 #endif
double GetObjectRA(int iObject)
Get object RA position.
Definition: GloriaSkyCatalog.h:62
namespace for data storing and exchange formats
Definition: GloriaAstrometry.h:15
Table column class for different content types.
Definition: GloriaTableColumn.h:185
Class for storing catalogs of sky objects (eg. stars)
Definition: GloriaSkyCatalog.h:36
void SetObjectRA(int iObject, double ra)
Set object RA position.
Definition: GloriaSkyCatalog.h:79
GloriaFitsTable & GetTable()
Returns the table itself.
Definition: GloriaSkyCatalog.h:91
double GetObjectDEC(int iObject)
Get object DEC position.
Definition: GloriaSkyCatalog.h:66
void AddObject(double ra, double dec)
Add new object to the list.
Definition: GloriaSkyCatalog.h:51
Class for reading and processing fits tables in Luiza.
Definition: GloriaFitsTable.h:109
void SetObjectDEC(int iObject, double dec)
Set object DEC position.
Definition: GloriaSkyCatalog.h:83
vector< double > & GetDECVector()
Returns vector of object positions in DEC.
Definition: GloriaSkyCatalog.h:74
int GetObjectNumber()
Returns number of objects in the list.
Definition: GloriaSkyCatalog.h:59
vector< double > & GetRAVector()
Returns vector of object positions in RA.
Definition: GloriaSkyCatalog.h:70
void AddObject()
Add new object to the list.
Definition: GloriaSkyCatalog.h:55