My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
PtSrcTiler.h
Go to the documentation of this file.
1 // $Id: PtSrcTiler.h,v 1.1.1.1 2009/07/06 23:57:26 eml Exp $
2 
3 #ifndef GCP_UTIL_PTSRCTILER_H
4 #define GCP_UTIL_PTSRCTILER_H
5 
15 #include "gcp/util/common/Declination.h"
16 #include "gcp/util/common/HourAngle.h"
17 #include "gcp/util/common/Angle.h"
18 
19 #include <vector>
20 
21 namespace gcp {
22  namespace util {
23 
24  class PtSrcTiler {
25  public:
26 
27  // Object to encapsulate a single field to search for point
28  // sources
29 
30  struct Field {
31  HourAngle ra_; // The center RA of this field
32  Declination dec_; // The center DEC of this field
33  std::vector<Field*> neighbors_; // The 6 fields that
34  // surround this one, order
35  // in order if increasing clockwise angle
36  Angle radius_; // The radius of this field
37 
38  // Constructors
39 
40  Field(HourAngle ra, Declination dec, Angle radius);
41  Field(const Field& field);
42  Field();
43 
44  // For the current field, add all nearest neighbors in a hex
45  // pattern
46 
47  std::vector<Field> addNeighbors(std::vector<Field>& fields,
48  HourAngle& ra0, Declination& dec0,
49  Angle& min);
50 
51  void addNeighbor(unsigned index, Field* field);
52 
53  // Return the distance of this field from the given ra/dec
54 
56 
57  };
58 
62  PtSrcTiler();
63 
67  virtual ~PtSrcTiler();
68 
69  // Construct the list of fields to search
70 
71  static std::vector<Field> constructFields(HourAngle ra, Declination dec,
72  Angle fieldRadius, Angle totalRadius);
73 
74 
75  static void addLayer(unsigned iLayer, Angle& fieldRad, HourAngle& ra0, Declination& dec0,
76  std::vector<Field>& fields);
77 
78  private:
79  }; // End class PtSrcTiler
80 
81  } // End namespace util
82 } // End namespace gcp
83 
84 
85 
86 #endif // End #ifndef GCP_UTIL_PTSRCTILER_H
Definition: PtSrcTiler.h:30
Definition: PtSrcTiler.h:24
void addNeighbor(unsigned index, Field *field)
Definition: PtSrcTiler.cc:208
std::vector< Field > addNeighbors(std::vector< Field > &fields, HourAngle &ra0, Declination &dec0, Angle &min)
Definition: PtSrcTiler.cc:123
virtual ~PtSrcTiler()
Definition: PtSrcTiler.cc:15
Angle distance(HourAngle ra, Declination dec)
Definition: PtSrcTiler.cc:217
Definition: HourAngle.h:17
Definition: Angle.h:20
Definition: Declination.h:20
static std::vector< Field > constructFields(HourAngle ra, Declination dec, Angle fieldRadius, Angle totalRadius)
Definition: PtSrcTiler.cc:20
PtSrcTiler()
Definition: PtSrcTiler.cc:10