source: trunk/src/STAttr.h@ 885

Last change on this file since 885 was 885, checked in by mar637, 19 years ago

rename SD -> ST

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