1 | //#---------------------------------------------------------------------------
|
---|
2 | //# STAttr.h: Return known attributes about telescopes
|
---|
3 | //#---------------------------------------------------------------------------
|
---|
4 | //# Copyright (C) 2004
|
---|
5 | //# ATNF
|
---|
6 | //#
|
---|
7 | //# This program is free software; you can redistribute it and/or modify it
|
---|
8 | //# under the terms of the GNU General Public License as published by the Free
|
---|
9 | //# Software Foundation; either version 2 of the License, or (at your option)
|
---|
10 | //# any later version.
|
---|
11 | //#
|
---|
12 | //# This program is distributed in the hope that it will be useful, but
|
---|
13 | //# WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
14 | //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
---|
15 | //# Public License for more details.
|
---|
16 | //#
|
---|
17 | //# You should have received a copy of the GNU General Public License along
|
---|
18 | //# with this program; if not, write to the Free Software Foundation, Inc.,
|
---|
19 | //# 675 Massachusetts Ave, Cambridge, MA 02139, USA.
|
---|
20 | //#
|
---|
21 | //# Correspondence concerning this software should be addressed as follows:
|
---|
22 | //# Internet email: Malte.Marquarding@csiro.au
|
---|
23 | //# Postal address: Malte Marquarding,
|
---|
24 | //# Australia Telescope National Facility,
|
---|
25 | //# P.O. Box 76,
|
---|
26 | //# Epping, NSW, 2121,
|
---|
27 | //# AUSTRALIA
|
---|
28 | //#
|
---|
29 | //# $Id:$
|
---|
30 | //#---------------------------------------------------------------------------
|
---|
31 | #ifndef STATTR_H
|
---|
32 | #define STATTR_H
|
---|
33 |
|
---|
34 | #include <casa/aips.h>
|
---|
35 | #include <measures/Measures/MEpoch.h>
|
---|
36 | #include <casa/Utilities/CountedPtr.h>
|
---|
37 |
|
---|
38 | #include "SDLog.h"
|
---|
39 | #include "STDefs.h"
|
---|
40 |
|
---|
41 | template<class T> class casa::Vector;
|
---|
42 |
|
---|
43 |
|
---|
44 | namespace asap {
|
---|
45 |
|
---|
46 | class STAttr : public SDLog {
|
---|
47 |
|
---|
48 | public:
|
---|
49 |
|
---|
50 | // Constructor
|
---|
51 | STAttr();
|
---|
52 |
|
---|
53 | // Destructor
|
---|
54 | ~STAttr();
|
---|
55 |
|
---|
56 | // Copy Constructor (copy semantics)
|
---|
57 | STAttr(const STAttr& other);
|
---|
58 |
|
---|
59 | // Assignment (copy semantics)
|
---|
60 | STAttr &operator=(const STAttr& other);
|
---|
61 |
|
---|
62 | // Telescope diameter(m). Throws exception if unknown.
|
---|
63 | casa::Float diameter(Instrument inst) const;
|
---|
64 |
|
---|
65 | // Beam efficiency. Frequency in Hz. Returns 1 if unknown.
|
---|
66 | casa::Vector<casa::Float>
|
---|
67 | beamEfficiency(Instrument instr, const casa::MEpoch& dateObs,
|
---|
68 | const casa::Vector<casa::Float>& freqs) const;
|
---|
69 |
|
---|
70 | // Aperture efficiency. Frequency in Hz. Returns 1 if unknown.
|
---|
71 | casa::Vector<casa::Float>
|
---|
72 | apertureEfficiency(Instrument instr,
|
---|
73 | const casa::MEpoch& dateObs,
|
---|
74 | const casa::Vector<casa::Float>& freqs) const;
|
---|
75 |
|
---|
76 | // Find factor to convert Jy -> K for this telescope, date of
|
---|
77 | // observation and frequency (Hz)
|
---|
78 | casa::Vector<casa::Float> JyPerK(Instrument instr,
|
---|
79 | const casa::MEpoch& dateObs,
|
---|
80 | const casa::Vector<casa::Float>& freqs)
|
---|
81 | const;
|
---|
82 |
|
---|
83 | // Gain Elevation polynomial correction coefficients (elevation in
|
---|
84 | // degrees) Returns length 0 if not known.
|
---|
85 | casa::Vector<casa::Float> gainElevationPoly(Instrument instr) const;
|
---|
86 |
|
---|
87 | // Find feed polarization type of feeds. In future this needs to come
|
---|
88 | // from the data themselves
|
---|
89 | FeedPolType feedPolType(Instrument) const;
|
---|
90 |
|
---|
91 | // Helper function to check instrument (antenna) name and give enum
|
---|
92 | static Instrument convertInstrument(const casa::String& instrument,
|
---|
93 | casa::Bool throwIt);
|
---|
94 |
|
---|
95 | // Helper function. Finds factor to convert K -> Jy. Provide
|
---|
96 | // aperture efficiency and dish geometric diameter (m)
|
---|
97 | static casa::Float findJyPerK(casa::Float etaAp, casa::Float D);
|
---|
98 |
|
---|
99 | private:
|
---|
100 |
|
---|
101 | // Static data
|
---|
102 | casa::Vector<casa::Float> MopEtaBeamX_; // Beam efficiency
|
---|
103 | casa::Vector<casa::Float> MopEtaBeam2003Y_;
|
---|
104 | casa::Vector<casa::Float> MopEtaBeam2004Y_;
|
---|
105 |
|
---|
106 | casa::Vector<casa::Float> MopEtaApX_; // Aperture efficiency
|
---|
107 | casa::Vector<casa::Float> MopEtaAp2004Y_;
|
---|
108 |
|
---|
109 | casa::Vector<casa::Float> TidEtaApX_; // Aperture efficiency
|
---|
110 | casa::Vector<casa::Float> TidEtaApY_;
|
---|
111 |
|
---|
112 | casa::Vector<casa::Float> TidGainElPoly_; // Gain-el correction poly coeffs
|
---|
113 |
|
---|
114 | // Init private data
|
---|
115 | void initData();
|
---|
116 |
|
---|
117 | // Linear interpolation
|
---|
118 | casa::Vector<casa::Float> interp(const casa::Vector<casa::Float>& xOut,
|
---|
119 | const casa::Vector<casa::Float>& xIn,
|
---|
120 | const casa::Vector<casa::Float>& yIn) const;
|
---|
121 |
|
---|
122 |
|
---|
123 | };
|
---|
124 |
|
---|
125 | } // namespace
|
---|
126 |
|
---|
127 | #endif
|
---|