CARMA C++
PtSrcTiler.h
Go to the documentation of this file.
1 // $Id: PtSrcTiler.h,v 1.1 2010/12/13 21:06:31 eml Exp $
2 
3 #ifndef SZA_UTIL_PTSRCTILER_H
4 #define SZA_UTIL_PTSRCTILER_H
5 
16 #include "carma/szautil/HourAngle.h"
17 #include "carma/szautil/Angle.h"
18 
19 #include <vector>
20 
21 namespace sza {
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 
55  Angle distance(HourAngle ra, Declination dec);
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 sza
83 
84 
85 
86 #endif // End #ifndef SZA_UTIL_PTSRCTILER_H
Tagged: Fri Jun 15 16:44:12 PDT 2007.