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: STAttr.h 3106 2016-10-04 07:20:50Z TakeshiNakazato $
|
---|
30 | //#---------------------------------------------------------------------------
|
---|
31 | #ifndef STATTR_H
|
---|
32 | #define STATTR_H
|
---|
33 |
|
---|
34 | #include <string>
|
---|
35 |
|
---|
36 | #include <casa/aips.h>
|
---|
37 | #include <measures/Measures/MEpoch.h>
|
---|
38 | #include <casa/Utilities/CountedPtr.h>
|
---|
39 |
|
---|
40 | #include "STDefs.h"
|
---|
41 |
|
---|
42 | namespace casacore {
|
---|
43 | template<class T> class Vector;
|
---|
44 | }
|
---|
45 |
|
---|
46 | namespace asap {
|
---|
47 |
|
---|
48 | class STAttr {
|
---|
49 |
|
---|
50 | public:
|
---|
51 |
|
---|
52 | // Constructor
|
---|
53 | STAttr();
|
---|
54 |
|
---|
55 | // Destructor
|
---|
56 | virtual ~STAttr();
|
---|
57 |
|
---|
58 | // Copy Constructor (copy semantics)
|
---|
59 | STAttr(const STAttr& other);
|
---|
60 |
|
---|
61 | // Assignment (copy semantics)
|
---|
62 | STAttr &operator=(const STAttr& other);
|
---|
63 |
|
---|
64 | // Telescope diameter(m). Throws exception if unknown.
|
---|
65 | casacore::Float diameter(Instrument inst) const;
|
---|
66 |
|
---|
67 | // Beam efficiency. Frequency in Hz. Returns 1 if unknown.
|
---|
68 | casacore::Vector<casacore::Float>
|
---|
69 | beamEfficiency(Instrument instr, const casacore::MEpoch& dateObs,
|
---|
70 | const casacore::Vector<casacore::Float>& freqs) const;
|
---|
71 |
|
---|
72 | // Aperture efficiency. Frequency in Hz. Returns 1 if unknown.
|
---|
73 | casacore::Vector<casacore::Float>
|
---|
74 | apertureEfficiency(Instrument instr,
|
---|
75 | const casacore::MEpoch& dateObs,
|
---|
76 | const casacore::Vector<casacore::Float>& freqs) const;
|
---|
77 |
|
---|
78 | // Find factor to convert Jy -> K for this telescope, date of
|
---|
79 | // observation and frequency (Hz)
|
---|
80 | casacore::Vector<casacore::Float> JyPerK(Instrument instr,
|
---|
81 | const casacore::MEpoch& dateObs,
|
---|
82 | const casacore::Vector<casacore::Float>& freqs)
|
---|
83 | const;
|
---|
84 |
|
---|
85 | // Gain Elevation polynomial correction coefficients (elevation in
|
---|
86 | // degrees) Returns length 0 if not known.
|
---|
87 | casacore::Vector<casacore::Float> gainElevationPoly(Instrument instr) const;
|
---|
88 |
|
---|
89 | // Find feed polarization type of feeds. In future this needs to come
|
---|
90 | // from the data themselves
|
---|
91 | std::string feedPolType(Instrument) const;
|
---|
92 |
|
---|
93 | // Helper function to check instrument (antenna) name and give enum
|
---|
94 | static Instrument convertInstrument(const casacore::String& instrument,
|
---|
95 | casacore::Bool throwIt);
|
---|
96 |
|
---|
97 | // Helper function. Finds factor to convert K -> Jy. Provide
|
---|
98 | // aperture efficiency and dish geometric diameter (m)
|
---|
99 | static casacore::Float findJyPerK(casacore::Float etaAp, casacore::Float D);
|
---|
100 |
|
---|
101 | private:
|
---|
102 |
|
---|
103 | // Static data
|
---|
104 | casacore::Vector<casacore::Float> MopEtaBeamX_; // Beam efficiency
|
---|
105 | casacore::Vector<casacore::Float> MopEtaBeam2003Y_;
|
---|
106 | casacore::Vector<casacore::Float> MopEtaBeam2004Y_;
|
---|
107 |
|
---|
108 | casacore::Vector<casacore::Float> MopEtaApX_; // Aperture efficiency
|
---|
109 | casacore::Vector<casacore::Float> MopEtaAp2004Y_;
|
---|
110 |
|
---|
111 | casacore::Vector<casacore::Float> TidEtaApX_; // Aperture efficiency
|
---|
112 | casacore::Vector<casacore::Float> TidEtaApY_;
|
---|
113 |
|
---|
114 | casacore::Vector<casacore::Float> TidGainElPoly_; // Gain-el correction poly coeffs
|
---|
115 | casacore::Vector<casacore::Float> ParkesGainElPoly_;// K-band Gain-el correction
|
---|
116 | //poly coeffs
|
---|
117 |
|
---|
118 | // Init private data
|
---|
119 | void initData();
|
---|
120 |
|
---|
121 | // Linear interpolation
|
---|
122 | casacore::Vector<casacore::Float> interp(const casacore::Vector<casacore::Float>& xOut,
|
---|
123 | const casacore::Vector<casacore::Float>& xIn,
|
---|
124 | const casacore::Vector<casacore::Float>& yIn) const;
|
---|
125 |
|
---|
126 |
|
---|
127 | };
|
---|
128 |
|
---|
129 | } // namespace
|
---|
130 |
|
---|
131 | #endif
|
---|