source: branches/Release2.0/src/STAttr.h@ 2720

Last change on this file since 2720 was 1030, checked in by mar637, 19 years ago

Various fixes to make >=gcc-3.4 compliant

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.3 KB
Line 
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 1030 2006-04-23 10:29:45Z mar637 $
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 "Logger.h"
39#include "STDefs.h"
40
41namespace casa {
42 template<class T> class Vector;
43}
44
45namespace asap {
46
47class STAttr : public Logger {
48
49 public:
50
51 // Constructor
52 STAttr();
53
54 // Destructor
55 virtual ~STAttr();
56
57 // Copy Constructor (copy semantics)
58 STAttr(const STAttr& other);
59
60 // Assignment (copy semantics)
61 STAttr &operator=(const STAttr& other);
62
63 // Telescope diameter(m). Throws exception if unknown.
64 casa::Float diameter(Instrument inst) const;
65
66 // Beam efficiency. Frequency in Hz. Returns 1 if unknown.
67 casa::Vector<casa::Float>
68 beamEfficiency(Instrument instr, const casa::MEpoch& dateObs,
69 const casa::Vector<casa::Float>& freqs) const;
70
71 // Aperture efficiency. Frequency in Hz. Returns 1 if unknown.
72 casa::Vector<casa::Float>
73 apertureEfficiency(Instrument instr,
74 const casa::MEpoch& dateObs,
75 const casa::Vector<casa::Float>& freqs) const;
76
77 // Find factor to convert Jy -> K for this telescope, date of
78 // observation and frequency (Hz)
79 casa::Vector<casa::Float> JyPerK(Instrument instr,
80 const casa::MEpoch& dateObs,
81 const casa::Vector<casa::Float>& freqs)
82 const;
83
84 // Gain Elevation polynomial correction coefficients (elevation in
85 // degrees) Returns length 0 if not known.
86 casa::Vector<casa::Float> gainElevationPoly(Instrument instr) const;
87
88 // Find feed polarization type of feeds. In future this needs to come
89 // from the data themselves
90 FeedPolType feedPolType(Instrument) const;
91
92 // Helper function to check instrument (antenna) name and give enum
93 static Instrument convertInstrument(const casa::String& instrument,
94 casa::Bool throwIt);
95
96 // Helper function. Finds factor to convert K -> Jy. Provide
97 // aperture efficiency and dish geometric diameter (m)
98 static casa::Float findJyPerK(casa::Float etaAp, casa::Float D);
99
100private:
101
102 // Static data
103 casa::Vector<casa::Float> MopEtaBeamX_; // Beam efficiency
104 casa::Vector<casa::Float> MopEtaBeam2003Y_;
105 casa::Vector<casa::Float> MopEtaBeam2004Y_;
106
107 casa::Vector<casa::Float> MopEtaApX_; // Aperture efficiency
108 casa::Vector<casa::Float> MopEtaAp2004Y_;
109
110 casa::Vector<casa::Float> TidEtaApX_; // Aperture efficiency
111 casa::Vector<casa::Float> TidEtaApY_;
112
113 casa::Vector<casa::Float> TidGainElPoly_; // Gain-el correction poly coeffs
114
115 // Init private data
116 void initData();
117
118 // Linear interpolation
119 casa::Vector<casa::Float> interp(const casa::Vector<casa::Float>& xOut,
120 const casa::Vector<casa::Float>& xIn,
121 const casa::Vector<casa::Float>& yIn) const;
122
123
124};
125
126} // namespace
127
128#endif
Note: See TracBrowser for help on using the repository browser.