source: branches/newfiller/src/STHeader.h@ 1897

Last change on this file since 1897 was 1603, checked in by TakTsutsumi, 15 years ago

New Development: No, merge with asap2.3.1

JIRA Issue: Yes CAS-1450

Ready to Release: Yes/No

Interface Changes: Yes/No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes

Module(s): single dish

Description: Upgrade of alma branch based on ASAP2.2.0

(rev.1562) to ASAP2.3.1 (rev.1561)


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