Receiver.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2004 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/Base/Extensions/Pulsar/Receiver.h
10
11#ifndef __ReceiverExtension_h
12#define __ReceiverExtension_h
13
14#include "Pulsar/ArchiveExtension.h"
15#include "Jones.h"
16#include "Stokes.h"
17#include "Angle.h"
18
19namespace Pulsar {
20
22
24
25 public:
26
28 static Receiver* load (const std::string& filename);
29
31 static Receiver* new_Receiver (const std::string& text);
32
34 Receiver ();
35
37 Receiver (const Receiver& extension);
38
40 const Receiver& operator= (const Receiver& extension);
41
43 ~Receiver ();
44
46 Receiver* clone () const { return new Receiver(*this); }
47
49 std::string get_short_name () const { return "rcvr"; }
50
53
54 class Interface;
55
57 void parse (std::string text);
58
68
73
77 void set_tracking_angle (const Angle& angle) { tracking_angle = angle; }
78
80 std::string get_name () const { return name; }
82 void set_name (const std::string& _name) { name = _name; }
83
85 int get_nrcvr( void ) { return nrcvr; }
87 void set_nrcvr( const int s_nrcvr ) { nrcvr = s_nrcvr; }
88
90 Signal::Basis get_basis () const { return state->get_basis(); }
91
93 void set_basis (Signal::Basis basis);
94
100
102 Angle get_orientation () const { return state->get_orientation(); }
104 void set_orientation (const Angle& celestial_position_angle);
105
107 Signal::Hand get_hand () const { return state->get_hand(); }
109 void set_hand (Signal::Hand);
110
113 { return state->get_reference_source_phase(); }
114
116
118
123
125 Angle get_symmetry_angle () const;
127 void set_symmetry_angle (const Angle& celestial_position_angle);
128
130
136
138 Angle get_X_offset () const;
140 void set_X_offset (const Angle& offset);
141
143 Angle get_Y_offset () const;
145 void set_Y_offset (const Angle& offset);
146
150 void set_calibrator_offset (const Angle& offset);
151
153
155 bool get_basis_corrected () const { return basis_corrected; }
157 void set_basis_corrected (bool);
158
163
165 float get_atten_a () const { return atten_a; }
167 void set_atten_a (float atten) { atten_a = atten; }
168
170 float get_atten_b () const { return atten_b; }
172 void set_atten_b (float atten) { atten_b = atten; }
173
175 bool match (const Receiver* receiver, std::string& reason) const;
176
178 std::string get_tracking_mode_string() const;
179
181 Stokes<double> get_reference_source () const;
182
184 class State : public Reference::Able {
185 public:
186
188 virtual Signal::Basis get_basis () const = 0;
189
191 virtual Signal::Hand get_hand () const = 0;
192
194 virtual Angle get_orientation () const = 0;
195
197 virtual Angle get_reference_source_phase () const = 0;
198
200 virtual void copy (const State*) = 0;
201
202 };
203
204 class Native;
205 class Linear;
206 class Field;
207
208 protected:
209
210 template<class StateType> StateType* get() const;
211
213 std::string name;
214
216 int nrcvr;
217
220
223
225
227
229
233
235
239
241
242 float atten_a;
243
245
246 float atten_b;
247
248 };
249
250}
251
252#endif
Definition ArchiveExtension.h:24
Stores the field orientation.
Definition Receiver_Field.h:24
Stores the X and Y receptor and calibrator orientations.
Definition Receiver_Linear.h:19
Stores receptor basis, hand, and orientation, and calibrator phase.
Definition Receiver_Native.h:19
The internal state of the Receiver Extension class.
Definition Receiver.h:184
virtual Angle get_orientation() const =0
Get the orientation of the basis about the line of sight.
virtual void copy(const State *)=0
Copy from another State.
virtual Signal::Basis get_basis() const =0
Get the basis of the feed receptors.
virtual Signal::Hand get_hand() const =0
Get the hand of the basis.
virtual Angle get_reference_source_phase() const =0
Get the phase of the reference source.
Contains information about the receiver and receiver platform.
Definition Receiver.h:23
void set_basis_corrected(bool)
Set true when receptor basis has been corrected.
Definition Receiver.C:173
static Receiver * load(const std::string &filename)
Construct a new Receiver instance from a file.
Definition Receiver_load.C:15
std::string get_tracking_mode_string() const
Return a string that describes the tracking mode.
Definition Receiver.C:84
void set_basis(Signal::Basis basis)
Set the basis of the feed receptors.
Definition Receiver.C:97
int get_nrcvr(void)
Get the number of receptors.
Definition Receiver.h:85
float get_atten_a() const
Get the attenuator, Poln A.
Definition Receiver.h:165
StateType * get() const
Definition Receiver.C:22
Tracking tracking_mode
The tracking mode of the receiver platform.
Definition Receiver.h:222
bool get_projection_corrected() const
Return true when receptor projection onto sky has been corrected.
Definition Receiver.h:160
Reference::To< State > state
State of the receiver.
Definition Receiver.h:219
void set_tracking_angle(const Angle &angle)
Get the position angle tracked by the receiver.
Definition Receiver.h:77
void set_name(const std::string &_name)
Set the name of the receiver.
Definition Receiver.h:82
Angle get_calibrator_offset() const
Get the offset of the feed calibrator axis from its nominal value.
Definition Receiver.C:168
Angle get_X_offset() const
Get the offset of the feed X axis with respect to the platform zero.
Definition Receiver.C:140
void set_atten_a(float atten)
Set the attenuator, Poln A.
Definition Receiver.h:167
bool projection_corrected
Flag set when platform to sky transformation has been corrected.
Definition Receiver.h:238
float get_atten_b() const
Get the attenuator, Poln B.
Definition Receiver.h:170
std::string name
Name of the receiver.
Definition Receiver.h:213
Signal::Basis get_basis() const
Get the basis of the feed receptors.
Definition Receiver.h:90
void set_hand(Signal::Hand)
Set the hand of the basis.
Definition Receiver.C:112
Receiver * clone() const
Clone method.
Definition Receiver.h:46
void parse(std::string text)
Parses the value of a Receiver attribute from a string.
Definition Receiver_load.C:38
int nrcvr
Number of receptors.
Definition Receiver.h:216
Angle get_Y_offset() const
Get the offset of the feed Y axis from its nominal value.
Definition Receiver.C:153
float atten_b
Attenuator, Poln B.
Definition Receiver.h:246
Tracking get_tracking_mode() const
Get the tracking mode of the receiver platform.
Definition Receiver.h:70
bool match(const Receiver *receiver, std::string &reason) const
Return true if the receiver configurations match.
Definition Receiver.C:181
TextInterface::Parser * get_interface()
Return a text interfaces that can be used to access this instance.
Definition Receiver.C:282
void set_Y_offset(const Angle &offset)
Set the offset of the feed Y axis from its nominal value.
Definition Receiver.C:148
Angle get_reference_source_phase() const
Get the phase of the reference source.
Definition Receiver.h:112
void set_X_offset(const Angle &offset)
Set the offset of the feed X axis with respect to the platform zero.
Definition Receiver.C:135
void set_atten_b(float atten)
Set the attenuator, Poln B.
Definition Receiver.h:172
void set_projection_corrected(bool val)
Set true when receptor projection onto sky has been corrected.
Definition Receiver.h:162
bool basis_corrected
Flag set when the offset of the feed has been corrected.
Definition Receiver.h:232
void set_tracking_mode(Tracking mode)
Set the tracking mode of the receiver platform.
Definition Receiver.h:72
Stokes< double > get_reference_source() const
Return the Stokes parameters of the reference source.
Definition Receiver.C:217
Angle tracking_angle
The rotation angle tracked by the feed.
Definition Receiver.h:226
const Receiver & operator=(const Receiver &extension)
Operator =.
Definition Receiver.C:61
void set_symmetry_angle(const Angle &celestial_position_angle)
Set the orientation of the equal in-phase electric field vector.
Definition Receiver.C:123
Signal::Hand get_hand() const
Get the hand of the basis.
Definition Receiver.h:107
std::string get_short_name() const
Return an abbreviated name that can be typed relatively quickly.
Definition Receiver.h:49
~Receiver()
Destructor.
Definition Receiver.C:80
static Receiver * new_Receiver(const std::string &text)
Construct a new Receiver instance from a string.
Definition Receiver_load.C:30
std::string get_name() const
Get the name of the receiver.
Definition Receiver.h:80
Angle get_symmetry_angle() const
Get the orientation of the equal in-phase electric field vector.
Definition Receiver.C:128
Angle get_orientation() const
Get the orientation of the basis about the line of sight.
Definition Receiver.h:102
Receiver()
Default constructor.
Definition Receiver.C:37
Angle get_tracking_angle() const
Get the position angle tracked by the receiver.
Definition Receiver.h:75
bool get_basis_corrected() const
Return true when receptor basis has been corrected.
Definition Receiver.h:155
float atten_a
Attenuator, Poln A.
Definition Receiver.h:242
void set_calibrator_offset(const Angle &offset)
Set the offset of the feed calibrator axis from its nominal value.
Definition Receiver.C:163
void set_reference_source_phase(const Angle &phase)
Set the phase of the reference source.
Definition Receiver.C:118
Tracking
Different modes of feed rotational tracking.
Definition Receiver.h:60
@ Celestial
Constant Celestial position angle.
Definition Receiver.h:64
@ Feed
Constant feed angle.
Definition Receiver.h:62
@ Galactic
Constant Galactic position angle.
Definition Receiver.h:66
void set_nrcvr(const int s_nrcvr)
Set the number of receptors.
Definition Receiver.h:87
void set_orientation(const Angle &celestial_position_angle)
Set the orientation of the basis about the line of sight.
Definition Receiver.C:105
Defines the PSRCHIVE library.
Definition CalSource.h:17
void phase(Profile *input)
Compute the phase of the input complex-valued Profile.
Definition Fourier.C:135

Generated using doxygen 1.14.0