//#--------------------------------------------------------------------------- //# SDContainer.h: A container class for single dish integrations //#--------------------------------------------------------------------------- //# Copyright (C) 2004 //# Malte Marquarding, ATNF //# //# This program is free software; you can redistribute it and/or modify it //# under the terms of the GNU General Public License as published by the Free //# Software Foundation; either version 2 of the License, or (at your option) //# any later version. //# //# This program is distributed in the hope that it will be useful, but //# WITHOUT ANY WARRANTY; without even the implied warranty of //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General //# Public License for more details. //# //# You should have received a copy of the GNU General Public License along //# with this program; if not, write to the Free Software Foundation, Inc., //# 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# //# Correspondence concerning this software should be addressed as follows: //# Internet email: Malte.Marquarding@csiro.au //# Postal address: Malte Marquarding, //# Australia Telescope National Facility, //# P.O. Box 76, //# Epping, NSW, 2121, //# AUSTRALIA //# //# $Id: //#--------------------------------------------------------------------------- #ifndef _SDCONTAINER_H_ #define _SDCONTAINER_H_ #include #include #include #include template class Matrix; namespace atnf_sd { class SDFrequencyTable { public: SDFrequencyTable(Double refPix, Double refVal, Double inc) {;} // returns the index into the table // this creates a new one or returns an existing one Int addFrequency(Double refPix, Double refVal, Double inc) {;} Int length() const { return nFreq_;};// # of stored Frequencies // returns a Table with nRows == nFreq, and three cols private: Int nFreq_; Vector refPix_; Vector revVal_; Vector increment_; }; class SDContainer { public: SDContainer(uInt nBeam, uInt nIF, uInt nChan, uInt nPol); virtual ~SDContainer(); Bool setSpectrum(const Matrix& spec, uInt whichBeam, uInt whichIF); Bool putSpectrum(const Array& spec); Bool setFlags(const Matrix& flgs, uInt whichBeam, uInt whichIF); Bool putFlags(const Array& spec); Bool setTsys(const Vector& ts, uInt whichBeam, uInt whichIF); Bool putTsys(const Array& spec); Bool setPointing(const Vector& point, uInt whichBeam) {;} Bool setFrequencyMap(uInt freqslot, uInt whichIF) {;} const Array& getSpectrum() const { return spectrum_; } const Array& getFlags() const { return flags_; } const Array& getTsys() const { return tsys_; } Double timestamp; String sourcename; Double interval; uInt scanid; private: uInt nBeam_,nIF_,nChan_,nPol_; // (nBeam,nIF,nChannel,nPol) Array spectrum_; Array flags_; // (nBeam,nIF,nPol) Array tsys_; Array tcal_; //(nBeam) maybe use Measures here... //*** Vector> pointing_; //(nIF) indx into "global" frequency table Vector freqidx_; }; } // namespace #endif