source: trunk/src/SDContainer.h @ 832

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

Removed actual SDContainer class

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1//#---------------------------------------------------------------------------
2//# SDContainer.h: A container class for single dish integrations
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 SDCONTAINER_H
32#define SDCONTAINER_H
33
34#include <vector>
35
36#include <casa/aips.h>
37#include <casa/BasicSL/String.h>
38#include <casa/Arrays/Vector.h>
39#include <casa/Containers/Block.h>
40#include <measures/Measures/MDirection.h>
41
42template<class T> class casa::Matrix;
43
44namespace asap {
45
46
47struct SDHeader {
48  casa::Int nchan;
49  casa::Int npol;
50  casa::Int nif;
51  casa::Int nbeam;
52  casa::String observer;
53  casa::String project;
54  casa::String obstype;
55  casa::String antennaname;
56  casa::Vector<casa::Double> antennaposition;
57  casa::Float equinox;
58  casa::String freqref;
59  casa::Double reffreq;
60  casa::Double bandwidth;
61  casa::Double utc;
62  casa::String fluxunit;
63  casa::String epoch;
64  void print() const ;
65};
66
67class SDDataDesc {
68
69public:
70
71  // Constructor
72  SDDataDesc() : n_(0) {;}
73  ~SDDataDesc() {;}
74
75  // Add an entry if source name and Integer ID (can be anything you
76  // like, such as FreqID) are unique.  You can add secondary entries
77  // direction and another integer index which are just stored along
78  // with the the primary entries
79  casa::uInt addEntry(const casa::String& source, casa::uInt ID,
80                      const casa::MDirection& secDir, casa::uInt secID);
81
82  // Number of entries
83  casa::Int length() const { return n_;}
84
85  // Get attributes
86  casa::String source(casa::uInt which) const {return source_[which];}
87  casa::uInt ID(casa::uInt which) const {return ID_[which];}
88  casa::uInt secID(casa::uInt which) const {return secID_[which];}
89  casa::MDirection secDir(casa::uInt which) const {return secDir_[which];}
90
91  // Summary
92  void summary() const;
93
94private:
95  casa::uInt n_;
96  casa::Vector<casa::String> source_;
97  casa::Vector<casa::uInt> ID_, secID_;
98  casa::Block<casa::MDirection> secDir_;
99
100  SDDataDesc(const SDDataDesc& other);
101
102};
103
104
105} // namespace
106#endif
Note: See TracBrowser for help on using the repository browser.