[2] | 1 | //#--------------------------------------------------------------------------- |
---|
[901] | 2 | //# STHeader.h: A container class for single dish integrations |
---|
[2] | 3 | //#--------------------------------------------------------------------------- |
---|
| 4 | //# Copyright (C) 2004 |
---|
[125] | 5 | //# ATNF |
---|
[2] | 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 | //# |
---|
[1439] | 29 | //# $Id: STHeader.h 3106 2016-10-04 07:20:50Z TakeshiNakazato $ |
---|
[2] | 30 | //#--------------------------------------------------------------------------- |
---|
[901] | 31 | #ifndef STHEADER_H |
---|
| 32 | #define STHEADER_H |
---|
[2] | 33 | |
---|
[18] | 34 | #include <vector> |
---|
| 35 | |
---|
[81] | 36 | #include <casa/aips.h> |
---|
| 37 | #include <casa/BasicSL/String.h> |
---|
| 38 | #include <casa/Arrays/Vector.h> |
---|
[326] | 39 | #include <casa/Containers/Block.h> |
---|
| 40 | #include <measures/Measures/MDirection.h> |
---|
[2] | 41 | |
---|
[3106] | 42 | namespace casacore { |
---|
[1030] | 43 | template<class T> class Matrix; |
---|
| 44 | } |
---|
[2] | 45 | |
---|
[83] | 46 | namespace asap { |
---|
[2] | 47 | |
---|
[18] | 48 | |
---|
[901] | 49 | struct STHeader { |
---|
[838] | 50 | |
---|
[901] | 51 | bool conformant(const STHeader& other); |
---|
[3106] | 52 | casacore::String diff( const STHeader& other ); |
---|
[838] | 53 | |
---|
[1439] | 54 | |
---|
[3106] | 55 | casacore::Int nchan; |
---|
| 56 | casacore::Int npol; |
---|
| 57 | casacore::Int nif; |
---|
| 58 | casacore::Int nbeam; |
---|
| 59 | casacore::String observer; |
---|
| 60 | casacore::String project; |
---|
| 61 | casacore::String obstype; |
---|
| 62 | casacore::String antennaname; |
---|
| 63 | casacore::Vector<casacore::Double> antennaposition; |
---|
| 64 | casacore::Float equinox; |
---|
| 65 | casacore::String freqref; |
---|
| 66 | casacore::Double reffreq; |
---|
| 67 | casacore::Double bandwidth; |
---|
| 68 | casacore::Double utc; |
---|
| 69 | casacore::String fluxunit; |
---|
| 70 | casacore::String epoch; |
---|
| 71 | casacore::String poltype; |
---|
[18] | 72 | void print() const ; |
---|
| 73 | }; |
---|
| 74 | |
---|
[326] | 75 | class SDDataDesc { |
---|
| 76 | |
---|
| 77 | public: |
---|
| 78 | |
---|
[453] | 79 | // Constructor |
---|
[326] | 80 | SDDataDesc() : n_(0) {;} |
---|
| 81 | ~SDDataDesc() {;} |
---|
| 82 | |
---|
[453] | 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 |
---|
[3106] | 87 | casacore::uInt addEntry(const casacore::String& source, casacore::uInt ID, |
---|
| 88 | const casacore::MDirection& secDir, casacore::uInt secID); |
---|
[326] | 89 | |
---|
[453] | 90 | // Number of entries |
---|
[3106] | 91 | casacore::Int length() const { return n_;} |
---|
[754] | 92 | |
---|
[453] | 93 | // Get attributes |
---|
[3106] | 94 | casacore::String source(casacore::uInt which) const {return source_[which];} |
---|
| 95 | casacore::uInt ID(casacore::uInt which) const {return ID_[which];} |
---|
| 96 | casacore::uInt secID(casacore::uInt which) const {return secID_[which];} |
---|
| 97 | casacore::MDirection secDir(casacore::uInt which) const {return secDir_[which];} |
---|
[754] | 98 | |
---|
[453] | 99 | // Summary |
---|
[326] | 100 | void summary() const; |
---|
| 101 | |
---|
| 102 | private: |
---|
[3106] | 103 | casacore::uInt n_; |
---|
| 104 | casacore::Vector<casacore::String> source_; |
---|
| 105 | casacore::Vector<casacore::uInt> ID_, secID_; |
---|
| 106 | casacore::Block<casacore::MDirection> secDir_; |
---|
[453] | 107 | |
---|
[326] | 108 | SDDataDesc(const SDDataDesc& other); |
---|
[349] | 109 | |
---|
[326] | 110 | }; |
---|
| 111 | |
---|
[453] | 112 | |
---|
[2] | 113 | } // namespace |
---|
| 114 | #endif |
---|