Pointing.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2004 - 2023 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/Base/Extensions/Pulsar/Pointing.h
10 
11 #ifndef __Pulsar_Pointing_h
12 #define __Pulsar_Pointing_h
13 
14 #include "Pulsar/IntegrationExtension.h"
15 #include "Angle.h"
16 #include "Estimate.h"
17 #include "TextInterface.h"
18 
19 namespace Pulsar {
20 
22  class Pointing : public Pulsar::Integration::Extension {
23 
24  public:
25 
28 
30  Pointing (const Pointing& extension);
31 
33  const Pointing& operator= (const Pointing& extension);
34 
36  ~Pointing ();
37 
39  Pointing* clone () const { return new Pointing( *this ); }
40 
43 
44  // Text interface to a Pointing instance
45  class Interface : public TextInterface::To<Pointing>
46  {
47  public:
48  Interface( Pointing *s_instance = NULL );
49  };
50 
52  const Pointing& operator += (const Pointing& extension);
53 
55  void integrate (const Integration* subint);
56 
58  void update (const Integration* subint);
59 
61  void update (const Integration* subint, const Archive *archive);
62 
63 
65  void set_local_sidereal_time (double seconds);
67  double get_local_sidereal_time () const;
68 
70  void set_right_ascension (const Angle&);
72  Angle get_right_ascension () const;
73 
75  void set_declination (const Angle&);
77  Angle get_declination () const;
78 
80  void set_galactic_longitude (const Angle&);
83 
85  void set_galactic_latitude (const Angle&);
88 
90  void set_feed_angle (const Angle&);
92  Angle get_feed_angle () const;
93 
95  void set_position_angle (const Angle&);
97  Angle get_position_angle () const;
98 
100  void set_parallactic_angle (const Angle&);
102  Angle get_parallactic_angle () const;
103 
105  void set_telescope_azimuth (const Angle&);
107  Angle get_telescope_azimuth () const;
108 
110  void set_telescope_zenith (const Angle&);
112  Angle get_telescope_zenith () const;
113 
115  class Info: public Reference::Able
116  {
117  std::string name;
118  std::string unit;
119  std::string description;
120  double value;
121 
122  public:
123 
124  Info () { value = 0; }
125 
127  const std::string& get_name () const { return name; }
128  void set_name (const std::string& _name) { name = _name; }
129 
131  const std::string& get_unit () const { return unit; }
132  void set_unit (const std::string& _unit) { unit = _unit; }
133 
135  const std::string& get_description () const { return description; }
136  void set_description (const std::string& _desc) { description = _desc; }
137 
139  double get_value () const { return value; }
140  void set_value (double val) { value = val; }
141 
144 
145  // Text interface to a Pointing instance
146  class Interface : public TextInterface::To<Info>
147  {
148  public:
149  Interface( Info *s_instance = NULL );
150  };
151 
152  };
153 
154  unsigned get_ninfo () const;
155  void add_info (Info*);
156 
157  Info* get_info (unsigned index);
158  const Info* get_info (unsigned index) const;
159 
160  const Info* find_info (const std::string&) const;
161  Info* find_info (const std::string&);
162 
163  double get_value (const std::string&) const;
164  void set_value (const std::string&, double value);
165  TextInterface::Parser* get_value_interface (const std::string&);
166 
167  std::string list_info () const;
168  void edit_info (const std::string&);
169 
170 
171  std::string get_short_name () const { return "point"; }
172 
173  protected:
174 
177 
180 
183 
186 
189 
192 
195 
198 
201 
204 
205  std::vector< Reference::To<Info> > info;
206  };
207 
208 }
209 
210 #endif
211 
Definition: IntegrationExtension.h:29
Angle get_declination() const
Get the DEC (J2000) at subint centre.
Definition: Pointing.C:103
MeanRadian< double > declination
DEC (J2000, in turns) at subint centre.
Definition: Pointing.h:192
~Pointing()
Destructor.
Definition: Pointing.C:60
double get_parallactic_angle() const
Angle get_galactic_longitude() const
Get the Gal longitude at subint centre.
Definition: Pointing.C:114
void set_position_angle(const Angle &)
Set the Position angle of feed at subint centre.
Definition: Pointing.C:142
Pointing * clone() const
Clone method.
Definition: Pointing.h:49
Angle get_parallactic_angle() const
Get the Parallactic angle at subint centre.
Definition: Pointing.C:158
void set_observatory_latitude(double latitude)
void integrate(const Integration *subint)
Integrate information from another Integration.
Definition: Pointing.C:257
Angle get_galactic_latitude() const
Get the Gal latitude at subint centre.
Definition: Pointing.C:125
void set_right_ascension(const Angle &)
Set the RA (J2000) at subint centre.
Definition: Pointing.C:87
void set_source_coordinates(const sky_coord &coords)
static bool verbose
flag controls the amount output to stderr by Integration methods
Definition: Integration.h:42
void set_local_sidereal_time(double seconds)
Set the LST (in seconds) at subint centre.
Definition: Pointing.C:67
Angle get_longitude() const
Get the longitude of the antenna.
Definition: Telescope.h:106
void update(const Integration *subint)
Update information based on the provided Integration.
Definition: Pointing.C:186
void set_galactic_latitude(const Angle &)
Set the Gal latitude at subint centre.
Definition: Pointing.C:120
The primary interface to pulsar observational data.
Definition: Archive.h:45
void set_galactic_longitude(const Angle &)
Set the Gal longitude at subint centre.
Definition: Pointing.C:109
Angle get_right_ascension() const
Get the RA (J2000) at subint centre.
Definition: Pointing.C:92
MeanRadian< double > galactic_longitude
Gal longitude at subint centre.
Definition: Pointing.h:195
MeanRadian< double > parallactic_angle
Parallactic angle at subint centre.
Definition: Pointing.h:207
const Pointing & operator=(const Pointing &extension)
Assignment operator.
Definition: Pointing.C:27
Angle get_position_angle() const
Get the Position angle of feed at subint centre.
Definition: Pointing.C:147
const std::string & get_unit() const
physical unit of the information
Definition: Pointing.h:141
Type * get() const
void set_telescope_zenith(const Angle &)
Set the Telescope zenith angle at subint centre.
Definition: Pointing.C:175
double get_value() const
numerical value of the information
Definition: Pointing.h:149
Extra pointing information.
Definition: Pointing.h:125
Angle get_telescope_zenith() const
Get the Telescope zenith angle at subint centre.
Definition: Pointing.C:180
void set_observatory_longitude(double longitude)
Angle get_telescope_azimuth() const
Get the Telescope azimuth at subint centre.
Definition: Pointing.C:169
TextInterface::Parser * get_interface()
Return a text interfaces that can be used to access this instance.
Definition: Pointing.C:373
void set_telescope_azimuth(const Angle &)
Set the Telescope azimuth at subint centre.
Definition: Pointing.C:164
Array of Profiles integrated over the same time interval.
Definition: Integration.h:37
MeanRadian< double > feed_angle
Feed angle at subint centre.
Definition: Pointing.h:201
MeanRadian< double > position_angle
Position angle of feed at subint centre.
Definition: Pointing.h:204
double get_azimuth() const
void set_epoch(const MJD &epoch)
MeanRadian< double > telescope_zenith
Telescope zenith angle at subint centre.
Definition: Pointing.h:213
double get_local_sidereal_time() const
Get the LST (in seconds) at subint centre.
Definition: Pointing.C:72
Contains information about the telescope used for the observation.
Definition: Telescope.h:26
Angle get_feed_angle() const
Get the Feed angle at subint centre.
Definition: Pointing.C:136
MeanRadian< double > right_ascension
RA (J2000, in turns) at subint centre.
Definition: Pointing.h:189
TextInterface::Parser * get_interface()
Return a text interfaces that can be used to access this instance.
Definition: Pointing.C:275
Angle get_latitude() const
Get the latitude of the antenna.
Definition: Telescope.h:101
MeanRadian< double > local_sidereal_time
LST (in seconds) at subint centre.
Definition: Pointing.h:186
MeanRadian< double > telescope_azimuth
Telescope azimuth at subint centre.
Definition: Pointing.h:210
const std::string & get_description() const
description of the information
Definition: Pointing.h:145
const Pointing & operator+=(const Pointing &extension)
Addition operator.
Definition: Pointing.C:44
double get_local_sidereal_time() const
void set_parallactic_angle(const Angle &)
Set the Parallactic angle at subint centre.
Definition: Pointing.C:153
Defines the PSRCHIVE library.
Definition: CalSource.h:17
Pointing()
Default constructor.
Definition: Pointing.C:16
const std::string & get_name() const
name of the information
Definition: Pointing.h:137
void set_feed_angle(const Angle &)
Set the Feed angle at subint centre.
Definition: Pointing.C:131
std::string get_short_name() const
Return an abbreviated name that can be typed relatively quickly.
Definition: Pointing.h:181
double get_zenith() const
void set_declination(const Angle &)
Set the DEC (J2000) at subint centre.
Definition: Pointing.C:98
Telescope pointing parameters recorded during the observation.
Definition: Pointing.h:27
MeanRadian< double > galactic_latitude
Gal latitude at subint centre.
Definition: Pointing.h:198

Generated using doxygen 1.8.17