source: branches/atnf/src/SDMemTable.h@ 2106

Last change on this file since 2106 was 2, checked in by mmarquar, 20 years ago

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 KB
Line 
1//#---------------------------------------------------------------------------
2//# SDMemTable.h: A MemoryTable container for single dish integrations
3//#---------------------------------------------------------------------------
4//# Copyright (C) 2004
5//# Malte Marquarding, 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 _SDMEMTABLE_H_
32#define _SDMEMTABLE_H_
33
34// STL
35#include <string>
36#include <vector>
37// AIPS++
38#include <aips/aips.h>
39#include <aips/Utilities/String.h>
40#include <aips/Tables/Table.h>
41#include <aips/Arrays/MaskedArray.h>
42
43namespace atnf_sd {
44
45class SDContainer;
46class SDHeader;
47class SDFrequencyTable;
48
49
50class SDMemTable {
51public:
52 SDMemTable(const std::string& name= "SDInputTable.tbl");
53 SDMemTable(const SDMemTable& other);
54
55 SDMemTable(const Table& tab, Int scanID);
56 virtual ~SDMemTable();
57 virtual bool putSDContainer(const SDContainer& sdc);
58 virtual bool putSDHeader(const SDHeader& sdh) {;}
59 virtual bool putSDFreqTable(const SDFrequencyTable& sdft) {;}
60
61 virtual std::vector<float> getSpectrum(Int whichRow) const;
62 virtual std::vector<bool> getMask() const;
63
64 MaskedArray<Float> rowAsMaskedArray(uInt whichRow);
65
66 virtual Float getTsys(Int whichRow) const;
67 virtual Double getTime(Int whichRow) const ;
68 virtual std::string getSourceName(Int whichRow) const ;
69
70 virtual bool setIF(Int whichIF=0);
71 virtual bool setBeam(Int whichBeam=0);
72 virtual bool setPol(Int whichPol=0);
73
74 virtual Int getIF() { return IFSel_; }
75 virtual Int getBeam() { return beamSel_; }
76 virtual Int getPol() { return polSel_; }
77
78 //sets the mask
79 virtual bool setChannels(const std::vector<int>& whichChans);
80
81 virtual void summary() const;
82
83 std::string name() const;
84 void makePersistent(const std::string& filename);
85 SDMemTable getScan(Int scanID);
86 const Table& table() { return table_; }
87
88private:
89 void setup();
90 //Int nBeam_,nIF_,nChan_,nPol_;
91 Int IFSel_,beamSel_,polSel_;
92 std::vector<bool> chanMask_;
93 String name_;
94 Table table_;
95};
96
97}// namespace
98#endif
Note: See TracBrowser for help on using the repository browser.