[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 3106 2016-10-04 07:20:50Z TakeshiNakazato $
|
---|
[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 |
|
---|
[3106] | 42 | namespace casacore {
|
---|
[1030] | 43 | template<class T> class Vector;
|
---|
| 44 | }
|
---|
[353] | 45 |
|
---|
| 46 | namespace asap {
|
---|
| 47 |
|
---|
[2658] | 48 | class 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.
|
---|
[3106] | 65 | casacore::Float diameter(Instrument inst) const;
|
---|
[890] | 66 |
|
---|
[717] | 67 | // Beam efficiency. Frequency in Hz. Returns 1 if unknown.
|
---|
[3106] | 68 | casacore::Vector<casacore::Float>
|
---|
| 69 | beamEfficiency(Instrument instr, const casacore::MEpoch& dateObs,
|
---|
| 70 | const casacore::Vector<casacore::Float>& freqs) const;
|
---|
[890] | 71 |
|
---|
[717] | 72 | // Aperture efficiency. Frequency in Hz. Returns 1 if unknown.
|
---|
[3106] | 73 | casacore::Vector<casacore::Float>
|
---|
[890] | 74 | apertureEfficiency(Instrument instr,
|
---|
[3106] | 75 | const casacore::MEpoch& dateObs,
|
---|
| 76 | const casacore::Vector<casacore::Float>& freqs) const;
|
---|
[890] | 77 |
|
---|
[717] | 78 | // Find factor to convert Jy -> K for this telescope, date of
|
---|
| 79 | // observation and frequency (Hz)
|
---|
[3106] | 80 | casacore::Vector<casacore::Float> JyPerK(Instrument instr,
|
---|
| 81 | const casacore::MEpoch& dateObs,
|
---|
| 82 | const casacore::Vector<casacore::Float>& freqs)
|
---|
[717] | 83 | const;
|
---|
[353] | 84 |
|
---|
[717] | 85 | // Gain Elevation polynomial correction coefficients (elevation in
|
---|
| 86 | // degrees) Returns length 0 if not known.
|
---|
[3106] | 87 | casacore::Vector<casacore::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
|
---|
[3106] | 94 | static Instrument convertInstrument(const casacore::String& instrument,
|
---|
| 95 | casacore::Bool throwIt);
|
---|
[890] | 96 |
|
---|
[717] | 97 | // Helper function. Finds factor to convert K -> Jy. Provide
|
---|
| 98 | // aperture efficiency and dish geometric diameter (m)
|
---|
[3106] | 99 | static casacore::Float findJyPerK(casacore::Float etaAp, casacore::Float D);
|
---|
[890] | 100 |
|
---|
[717] | 101 | private:
|
---|
[890] | 102 |
|
---|
| 103 | // Static data
|
---|
[3106] | 104 | casacore::Vector<casacore::Float> MopEtaBeamX_; // Beam efficiency
|
---|
| 105 | casacore::Vector<casacore::Float> MopEtaBeam2003Y_;
|
---|
| 106 | casacore::Vector<casacore::Float> MopEtaBeam2004Y_;
|
---|
[475] | 107 |
|
---|
[3106] | 108 | casacore::Vector<casacore::Float> MopEtaApX_; // Aperture efficiency
|
---|
| 109 | casacore::Vector<casacore::Float> MopEtaAp2004Y_;
|
---|
[475] | 110 |
|
---|
[3106] | 111 | casacore::Vector<casacore::Float> TidEtaApX_; // Aperture efficiency
|
---|
| 112 | casacore::Vector<casacore::Float> TidEtaApY_;
|
---|
[507] | 113 |
|
---|
[3106] | 114 | casacore::Vector<casacore::Float> TidGainElPoly_; // Gain-el correction poly coeffs
|
---|
| 115 | casacore::Vector<casacore::Float> ParkesGainElPoly_;// K-band Gain-el correction
|
---|
[1346] | 116 | //poly coeffs
|
---|
[890] | 117 |
|
---|
[717] | 118 | // Init private data
|
---|
| 119 | void initData();
|
---|
[353] | 120 |
|
---|
[717] | 121 | // Linear interpolation
|
---|
[3106] | 122 | casacore::Vector<casacore::Float> interp(const casacore::Vector<casacore::Float>& xOut,
|
---|
| 123 | const casacore::Vector<casacore::Float>& xIn,
|
---|
| 124 | const casacore::Vector<casacore::Float>& yIn) const;
|
---|
[353] | 125 |
|
---|
| 126 |
|
---|
| 127 | };
|
---|
| 128 |
|
---|
| 129 | } // namespace
|
---|
| 130 |
|
---|
| 131 | #endif
|
---|