[353] | 1 | //#---------------------------------------------------------------------------
|
---|
| 2 | //# SDAttr.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:
|
---|
| 30 | //#---------------------------------------------------------------------------
|
---|
| 31 | #ifndef SDATTR_H
|
---|
| 32 | #define SDATTR_H
|
---|
| 33 |
|
---|
| 34 | #include "SDDefs.h"
|
---|
| 35 | #include <casa/aips.h>
|
---|
| 36 | #include <measures/Measures/MEpoch.h>
|
---|
| 37 |
|
---|
| 38 | template<class T> class casa::Vector;
|
---|
| 39 | //class casa::MEpoch;
|
---|
| 40 |
|
---|
| 41 |
|
---|
| 42 |
|
---|
| 43 | namespace asap {
|
---|
| 44 |
|
---|
| 45 | class SDAttr {
|
---|
| 46 |
|
---|
| 47 | public:
|
---|
| 48 |
|
---|
| 49 | // Constructor
|
---|
| 50 | SDAttr();
|
---|
| 51 |
|
---|
| 52 | // Destructor
|
---|
| 53 | ~SDAttr();
|
---|
| 54 |
|
---|
| 55 | // Copy Constructor (copy semantics)
|
---|
| 56 | SDAttr (const SDAttr& other);
|
---|
| 57 |
|
---|
| 58 | // Assignment (copy semantics)
|
---|
| 59 | SDAttr &operator=(const SDAttr& other);
|
---|
| 60 |
|
---|
| 61 | // Telescope diameter (m). Throws exception if unknown.
|
---|
| 62 | casa::Float diameter (Instrument inst) const;
|
---|
| 63 |
|
---|
| 64 | // Beam efficiency. Frequency in Hz. Returns 1 if unknown.
|
---|
[362] | 65 | casa::Vector<casa::Float> beamEfficiency (Instrument instr, const casa::MEpoch& dateObs,
|
---|
[353] | 66 | const casa::Vector<casa::Float>& freqs) const;
|
---|
| 67 |
|
---|
| 68 | // Aperture efficiency. Frequency in Hz. Returns 1 if unknown.
|
---|
[362] | 69 | casa::Vector<casa::Float> apertureEfficiency (Instrument instr, const casa::MEpoch& dateObs,
|
---|
[353] | 70 | const casa::Vector<casa::Float>& freqs) const;
|
---|
| 71 |
|
---|
| 72 | // Find factor to convert Jy -> K for this telescope, date of observation and frequency (Hz)
|
---|
[362] | 73 | casa::Vector<casa::Float> JyPerK (Instrument instr, const casa::MEpoch& dateObs,
|
---|
[353] | 74 | const casa::Vector<casa::Float>& freqs) const;
|
---|
| 75 |
|
---|
[362] | 76 | // Gain Elevation polynomial correction coefficients (elevation in degrees)
|
---|
| 77 | // Returns length 0 if not known.
|
---|
| 78 | casa::Vector<casa::Float> gainElevationPoly (Instrument instr) const;
|
---|
| 79 |
|
---|
[507] | 80 | // Find feed polarization type of feeds. In future this needs to come from the data themselves
|
---|
| 81 | FeedPolType feedPolType (Instrument) const;
|
---|
[475] | 82 |
|
---|
| 83 | // Helper function to check instrument (antenna) name and give enum
|
---|
| 84 | static Instrument convertInstrument(const casa::String& instrument,
|
---|
| 85 | casa::Bool throwIt);
|
---|
| 86 |
|
---|
| 87 | // Helper function. Finds factor to convert K -> Jy. Provide aperture efficiency and dish geometric diameter (m)
|
---|
| 88 | static casa::Float findJyPerK (casa::Float etaAp, casa::Float D);
|
---|
| 89 |
|
---|
[507] | 90 |
|
---|
[353] | 91 | private:
|
---|
| 92 |
|
---|
| 93 | // Static data
|
---|
| 94 |
|
---|
[362] | 95 | casa::Vector<casa::Float> MopEtaBeamX_; // Beam efficiency
|
---|
[353] | 96 | casa::Vector<casa::Float> MopEtaBeam2003Y_;
|
---|
| 97 | casa::Vector<casa::Float> MopEtaBeam2004Y_;
|
---|
[362] | 98 | //
|
---|
| 99 | casa::Vector<casa::Float> MopEtaApX_; // Aperture efficiency
|
---|
[353] | 100 | casa::Vector<casa::Float> MopEtaAp2004Y_;
|
---|
[362] | 101 | //
|
---|
[467] | 102 | casa::Vector<casa::Float> TidEtaApX_; // Aperture efficiency
|
---|
| 103 | casa::Vector<casa::Float> TidEtaApY_;
|
---|
| 104 | //
|
---|
[362] | 105 | casa::Vector<casa::Float> TidGainElPoly_; // Gain-el correction poly coeffs
|
---|
[353] | 106 |
|
---|
| 107 | // Init private data
|
---|
[361] | 108 | void initData();
|
---|
[353] | 109 |
|
---|
| 110 | // Linear interpolation
|
---|
| 111 | casa::Vector<casa::Float> interp (const casa::Vector<casa::Float>& xOut, const casa::Vector<casa::Float>& xIn,
|
---|
| 112 | const casa::Vector<casa::Float>& yIn) const;
|
---|
| 113 | };
|
---|
| 114 |
|
---|
| 115 | } // namespace
|
---|
| 116 |
|
---|
| 117 | #endif
|
---|