source: trunk/src/STAttr.h @ 1346

Last change on this file since 1346 was 1346, checked in by mar637, 17 years ago

Enhancement ticket #105 - addded gain-el curves for Parkes K-band

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