source: trunk/src/STAttr.h@ 2746

Last change on this file since 2746 was 2658, checked in by Malte Marquarding, 12 years ago

Ticket #199: Excised Logger::pushLog; now everything is using LogIO

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