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
19namespace Pulsar {
20
23
24 public:
25
27 Pointing ();
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 Integration::Extension::Interface<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
64 void set_local_sidereal_time (double seconds);
66 double get_local_sidereal_time () const;
67
69 void set_right_ascension (const Angle&);
72
74 Angle get_hour_angle () const;
75
77 void set_declination (const Angle&);
79 Angle get_declination () const;
80
82 void set_galactic_longitude (const Angle&);
85
87 void set_galactic_latitude (const Angle&);
90
92 void set_feed_angle (const Angle&);
94 Angle get_feed_angle () const;
95
97 void set_position_angle (const Angle&);
100
102 void set_parallactic_angle (const Angle&);
105
107 void set_telescope_azimuth (const Angle&);
110
112 void set_telescope_zenith (const Angle&);
115
117 class Info: public Reference::Able
118 {
119 std::string name;
120 std::string unit;
121 std::string description;
122 double value;
123
124 public:
125
126 Info () { value = 0; }
127
129 const std::string& get_name () const { return name; }
130 void set_name (const std::string& _name) { name = _name; }
131
133 const std::string& get_unit () const { return unit; }
134 void set_unit (const std::string& _unit) { unit = _unit; }
135
137 const std::string& get_description () const { return description; }
138 void set_description (const std::string& _desc) { description = _desc; }
139
141 double get_value () const { return value; }
142 void set_value (double val) { value = val; }
143
146
147 // Text interface to a Pointing instance
148 class Interface : public TextInterface::To<Info>
149 {
150 public:
151 Interface( Info *s_instance = NULL );
152 };
153
154 };
155
156 unsigned get_ninfo () const;
157 void add_info (Info*);
158
159 Info* get_info (unsigned index);
160 const Info* get_info (unsigned index) const;
161
162 const Info* find_info (const std::string&) const;
163 Info* find_info (const std::string&);
164
165 double get_value (const std::string&) const;
166 void set_value (const std::string&, double value);
167 TextInterface::Parser* get_value_interface (const std::string&);
168
169 std::string list_info () const;
170 void edit_info (const std::string&);
171
172 std::string get_short_name () const { return "point"; }
173
174 protected:
175
178
181
184
187
190
193
196
199
202
205
206 std::vector< Reference::To<Info> > info;
207 };
208
209}
210
211#endif
212
The primary interface to pulsar observational data.
Definition Archive.h:46
Array of Profiles integrated over the same time interval.
Definition Integration.h:37
Telescope pointing parameters recorded during the observation.
Definition Pointing.h:22
Pointing()
Default constructor.
Definition Pointing.C:19
Convenience class implements TextInterface::To<T>::get_interface_name.
Definition IntegrationExtension.h:58
Definition IntegrationExtension.h:25
Extra pointing information.
Definition Pointing.h:118
TextInterface::Parser * get_interface()
Return a text interfaces that can be used to access this instance.
Definition Pointing.C:424
double get_value() const
numerical value of the information
Definition Pointing.h:141
const std::string & get_description() const
description of the information
Definition Pointing.h:137
const std::string & get_name() const
name of the information
Definition Pointing.h:129
const std::string & get_unit() const
physical unit of the information
Definition Pointing.h:133
Telescope pointing parameters recorded during the observation.
Definition Pointing.h:22
MeanRadian< double > telescope_azimuth
Telescope azimuth at subint centre.
Definition Pointing.h:201
Angle get_position_angle() const
Get the Position angle of feed at subint centre.
Definition Pointing.C:160
Angle get_telescope_zenith() const
Get the Telescope zenith angle at subint centre.
Definition Pointing.C:193
void update(const Integration *subint)
Update information based on the provided Integration.
Definition Pointing.C:199
void set_galactic_longitude(const Angle &)
Set the Gal longitude at subint centre.
Definition Pointing.C:122
Pointing()
Default constructor.
Definition Pointing.C:19
std::string get_short_name() const
Return an abbreviated name that can be typed relatively quickly.
Definition Pointing.h:172
MeanRadian< double > declination
DEC (J2000, in turns) at subint centre.
Definition Pointing.h:183
void set_parallactic_angle(const Angle &)
Set the Parallactic angle at subint centre.
Definition Pointing.C:166
const Pointing & operator+=(const Pointing &extension)
Addition operator.
Definition Pointing.C:49
MeanRadian< double > telescope_zenith
Telescope zenith angle at subint centre.
Definition Pointing.h:204
Pointing * clone() const
Clone method.
Definition Pointing.h:39
void set_right_ascension(const Angle &)
Set the RA (J2000) at subint centre.
Definition Pointing.C:92
Angle get_declination() const
Get the DEC (J2000) at subint centre.
Definition Pointing.C:107
void set_telescope_zenith(const Angle &)
Set the Telescope zenith angle at subint centre.
Definition Pointing.C:188
Angle get_galactic_longitude() const
Get the Gal longitude at subint centre.
Definition Pointing.C:127
Angle get_feed_angle() const
Get the Feed angle at subint centre.
Definition Pointing.C:149
TextInterface::Parser * get_interface()
Return a text interfaces that can be used to access this instance.
Definition Pointing.C:326
Angle get_right_ascension() const
Get the RA (J2000) at subint centre.
Definition Pointing.C:97
MeanRadian< double > right_ascension
RA (J2000, in turns) at subint centre.
Definition Pointing.h:180
const Pointing & operator=(const Pointing &extension)
Assignment operator.
Definition Pointing.C:30
MeanRadian< double > position_angle
Position angle of feed at subint centre.
Definition Pointing.h:195
MeanRadian< double > local_sidereal_time
LST (in seconds) at subint centre.
Definition Pointing.h:177
void integrate(const Integration *subint)
Integrate information from another Integration.
Definition Pointing.C:308
void set_telescope_azimuth(const Angle &)
Set the Telescope azimuth at subint centre.
Definition Pointing.C:177
~Pointing()
Destructor.
Definition Pointing.C:65
MeanRadian< double > parallactic_angle
Parallactic angle at subint centre.
Definition Pointing.h:198
void set_position_angle(const Angle &)
Set the Position angle of feed at subint centre.
Definition Pointing.C:155
MeanRadian< double > galactic_latitude
Gal latitude at subint centre.
Definition Pointing.h:189
void set_local_sidereal_time(double seconds)
Set the LST (in seconds) at subint centre.
Definition Pointing.C:72
Angle get_telescope_azimuth() const
Get the Telescope azimuth at subint centre.
Definition Pointing.C:182
double get_local_sidereal_time() const
Get the LST (in seconds) at subint centre.
Definition Pointing.C:77
void set_feed_angle(const Angle &)
Set the Feed angle at subint centre.
Definition Pointing.C:144
void set_galactic_latitude(const Angle &)
Set the Gal latitude at subint centre.
Definition Pointing.C:133
Angle get_galactic_latitude() const
Get the Gal latitude at subint centre.
Definition Pointing.C:138
MeanRadian< double > galactic_longitude
Gal longitude at subint centre.
Definition Pointing.h:186
Angle get_hour_angle() const
Get the hour angle.
Definition Pointing.C:112
void set_declination(const Angle &)
Set the DEC (J2000) at subint centre.
Definition Pointing.C:102
MeanRadian< double > feed_angle
Feed angle at subint centre.
Definition Pointing.h:192
Angle get_parallactic_angle() const
Get the Parallactic angle at subint centre.
Definition Pointing.C:171
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0