[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 1346 2007-04-26 03:24:41Z mar637 $ |
---|
[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 | |
---|
[894] | 40 | #include "Logger.h" |
---|
[833] | 41 | #include "STDefs.h" |
---|
[717] | 42 | |
---|
[1030] | 43 | namespace casa { |
---|
| 44 | template<class T> class Vector; |
---|
| 45 | } |
---|
[353] | 46 | |
---|
| 47 | namespace asap { |
---|
| 48 | |
---|
[890] | 49 | class STAttr : public Logger { |
---|
[353] | 50 | |
---|
| 51 | public: |
---|
| 52 | |
---|
[717] | 53 | // Constructor |
---|
[878] | 54 | STAttr(); |
---|
[890] | 55 | |
---|
[717] | 56 | // Destructor |
---|
[996] | 57 | virtual ~STAttr(); |
---|
[890] | 58 | |
---|
[717] | 59 | // Copy Constructor (copy semantics) |
---|
[878] | 60 | STAttr(const STAttr& other); |
---|
[890] | 61 | |
---|
[717] | 62 | // Assignment (copy semantics) |
---|
[878] | 63 | STAttr &operator=(const STAttr& other); |
---|
[890] | 64 | |
---|
[717] | 65 | // Telescope diameter(m). Throws exception if unknown. |
---|
| 66 | casa::Float diameter(Instrument inst) const; |
---|
[890] | 67 | |
---|
[717] | 68 | // Beam efficiency. Frequency in Hz. Returns 1 if unknown. |
---|
[890] | 69 | casa::Vector<casa::Float> |
---|
| 70 | beamEfficiency(Instrument instr, const casa::MEpoch& dateObs, |
---|
[996] | 71 | const casa::Vector<casa::Float>& freqs) const; |
---|
[890] | 72 | |
---|
[717] | 73 | // Aperture efficiency. Frequency in Hz. Returns 1 if unknown. |
---|
[890] | 74 | casa::Vector<casa::Float> |
---|
| 75 | apertureEfficiency(Instrument instr, |
---|
[996] | 76 | const casa::MEpoch& dateObs, |
---|
| 77 | const casa::Vector<casa::Float>& freqs) const; |
---|
[890] | 78 | |
---|
[717] | 79 | // Find factor to convert Jy -> K for this telescope, date of |
---|
| 80 | // observation and frequency (Hz) |
---|
[890] | 81 | casa::Vector<casa::Float> JyPerK(Instrument instr, |
---|
[996] | 82 | const casa::MEpoch& dateObs, |
---|
| 83 | const casa::Vector<casa::Float>& freqs) |
---|
[717] | 84 | const; |
---|
[353] | 85 | |
---|
[717] | 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; |
---|
[353] | 89 | |
---|
[717] | 90 | // Find feed polarization type of feeds. In future this needs to come |
---|
| 91 | // from the data themselves |
---|
[1188] | 92 | std::string feedPolType(Instrument) const; |
---|
[890] | 93 | |
---|
[717] | 94 | // Helper function to check instrument (antenna) name and give enum |
---|
[890] | 95 | static Instrument convertInstrument(const casa::String& instrument, |
---|
[475] | 96 | casa::Bool throwIt); |
---|
[890] | 97 | |
---|
[717] | 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); |
---|
[890] | 101 | |
---|
[717] | 102 | private: |
---|
[890] | 103 | |
---|
| 104 | // Static data |
---|
[717] | 105 | casa::Vector<casa::Float> MopEtaBeamX_; // Beam efficiency |
---|
| 106 | casa::Vector<casa::Float> MopEtaBeam2003Y_; |
---|
| 107 | casa::Vector<casa::Float> MopEtaBeam2004Y_; |
---|
[475] | 108 | |
---|
[717] | 109 | casa::Vector<casa::Float> MopEtaApX_; // Aperture efficiency |
---|
| 110 | casa::Vector<casa::Float> MopEtaAp2004Y_; |
---|
[475] | 111 | |
---|
[717] | 112 | casa::Vector<casa::Float> TidEtaApX_; // Aperture efficiency |
---|
| 113 | casa::Vector<casa::Float> TidEtaApY_; |
---|
[507] | 114 | |
---|
[717] | 115 | casa::Vector<casa::Float> TidGainElPoly_; // Gain-el correction poly coeffs |
---|
[1346] | 116 | casa::Vector<casa::Float> ParkesGainElPoly_;// K-band Gain-el correction |
---|
| 117 | //poly coeffs |
---|
[890] | 118 | |
---|
[717] | 119 | // Init private data |
---|
| 120 | void initData(); |
---|
[353] | 121 | |
---|
[717] | 122 | // Linear interpolation |
---|
[890] | 123 | casa::Vector<casa::Float> interp(const casa::Vector<casa::Float>& xOut, |
---|
[996] | 124 | const casa::Vector<casa::Float>& xIn, |
---|
| 125 | const casa::Vector<casa::Float>& yIn) const; |
---|
[353] | 126 | |
---|
| 127 | |
---|
| 128 | }; |
---|
| 129 | |
---|
| 130 | } // namespace |
---|
| 131 | |
---|
| 132 | #endif |
---|