source: trunk/src/STAttr.h @ 890

Last change on this file since 890 was 890, checked in by mar637, 18 years ago

asap2 naming changes

  • 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//#
[890]29//# $Id: STAttr.h 890 2006-03-08 02:32:27Z mar637 $
[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
[890]46class STAttr : public Logger {
[353]47
48 public:
49
[717]50  // Constructor
[878]51  STAttr();
[890]52
[717]53  // Destructor
[878]54  ~STAttr();
[890]55
[717]56  // Copy Constructor (copy semantics)
[878]57  STAttr(const STAttr& other);
[890]58
[717]59  // Assignment  (copy semantics)
[878]60  STAttr &operator=(const STAttr& other);
[890]61
[717]62  // Telescope diameter(m). Throws exception if unknown.
63  casa::Float diameter(Instrument inst) const;
[890]64
[717]65  // Beam efficiency.  Frequency in Hz.  Returns 1 if unknown.
[890]66  casa::Vector<casa::Float>
67  beamEfficiency(Instrument instr, const casa::MEpoch& dateObs,
[717]68                 const casa::Vector<casa::Float>& freqs) const;
[890]69
[717]70  // Aperture efficiency. Frequency in Hz.  Returns 1 if unknown.
[890]71  casa::Vector<casa::Float>
72  apertureEfficiency(Instrument instr,
73                     const casa::MEpoch& dateObs,
[717]74                     const casa::Vector<casa::Float>& freqs) const;
[890]75
[717]76  // Find factor to convert Jy -> K for this telescope, date of
77  // observation and frequency (Hz)
[890]78  casa::Vector<casa::Float> JyPerK(Instrument instr,
79                                   const casa::MEpoch& dateObs,
80                                   const casa::Vector<casa::Float>& freqs)
[717]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;
[890]90
[717]91  // Helper function to check instrument (antenna) name and give enum
[890]92  static Instrument convertInstrument(const casa::String& instrument,
[475]93                                      casa::Bool throwIt);
[890]94
[717]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);
[890]98
[717]99private:
[890]100
101  // Static data
[717]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
[890]113
[717]114  // Init private data
115  void initData();
[353]116
[717]117  // Linear interpolation
[890]118  casa::Vector<casa::Float> interp(const casa::Vector<casa::Float>& xOut,
[717]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.