source: trunk/src/STAttr.h@ 1045

Last change on this file since 1045 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
RevLine 
[353]1//#---------------------------------------------------------------------------
[878]2//# STAttr.h: Return known attributes about telescopes
[353]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//#
[890]29//# $Id: STAttr.h 1030 2006-04-23 10:29:45Z mar637 $
[353]30//#---------------------------------------------------------------------------
[885]31#ifndef STATTR_H
32#define STATTR_H
[353]33
34#include <casa/aips.h>
35#include <measures/Measures/MEpoch.h>
[717]36#include <casa/Utilities/CountedPtr.h>
[353]37
[894]38#include "Logger.h"
[833]39#include "STDefs.h"
[717]40
[1030]41namespace casa {
42 template<class T> class Vector;
43}
[353]44
45namespace asap {
46
[890]47class STAttr : public Logger {
[353]48
49 public:
50
[717]51 // Constructor
[878]52 STAttr();
[890]53
[717]54 // Destructor
[996]55 virtual ~STAttr();
[890]56
[717]57 // Copy Constructor (copy semantics)
[878]58 STAttr(const STAttr& other);
[890]59
[717]60 // Assignment (copy semantics)
[878]61 STAttr &operator=(const STAttr& other);
[890]62
[717]63 // Telescope diameter(m). Throws exception if unknown.
64 casa::Float diameter(Instrument inst) const;
[890]65
[717]66 // Beam efficiency. Frequency in Hz. Returns 1 if unknown.
[890]67 casa::Vector<casa::Float>
68 beamEfficiency(Instrument instr, const casa::MEpoch& dateObs,
[996]69 const casa::Vector<casa::Float>& freqs) const;
[890]70
[717]71 // Aperture efficiency. Frequency in Hz. Returns 1 if unknown.
[890]72 casa::Vector<casa::Float>
73 apertureEfficiency(Instrument instr,
[996]74 const casa::MEpoch& dateObs,
75 const casa::Vector<casa::Float>& freqs) const;
[890]76
[717]77 // Find factor to convert Jy -> K for this telescope, date of
78 // observation and frequency (Hz)
[890]79 casa::Vector<casa::Float> JyPerK(Instrument instr,
[996]80 const casa::MEpoch& dateObs,
81 const casa::Vector<casa::Float>& freqs)
[717]82 const;
[353]83
[717]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;
[353]87
[717]88 // Find feed polarization type of feeds. In future this needs to come
89 // from the data themselves
90 FeedPolType feedPolType(Instrument) const;
[890]91
[717]92 // Helper function to check instrument (antenna) name and give enum
[890]93 static Instrument convertInstrument(const casa::String& instrument,
[475]94 casa::Bool throwIt);
[890]95
[717]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);
[890]99
[717]100private:
[890]101
102 // Static data
[717]103 casa::Vector<casa::Float> MopEtaBeamX_; // Beam efficiency
104 casa::Vector<casa::Float> MopEtaBeam2003Y_;
105 casa::Vector<casa::Float> MopEtaBeam2004Y_;
[475]106
[717]107 casa::Vector<casa::Float> MopEtaApX_; // Aperture efficiency
108 casa::Vector<casa::Float> MopEtaAp2004Y_;
[475]109
[717]110 casa::Vector<casa::Float> TidEtaApX_; // Aperture efficiency
111 casa::Vector<casa::Float> TidEtaApY_;
[507]112
[717]113 casa::Vector<casa::Float> TidGainElPoly_; // Gain-el correction poly coeffs
[890]114
[717]115 // Init private data
116 void initData();
[353]117
[717]118 // Linear interpolation
[890]119 casa::Vector<casa::Float> interp(const casa::Vector<casa::Float>& xOut,
[996]120 const casa::Vector<casa::Float>& xIn,
121 const casa::Vector<casa::Float>& yIn) const;
[353]122
123
124};
125
126} // namespace
127
128#endif
Note: See TracBrowser for help on using the repository browser.