//# SelecteAverageSpwChan.h: //# Copyright (C) 2003 //# Associated Universities, Inc. Washington DC, USA. //# //# This library is free software; you can redistribute it and/or modify it //# under the terms of the GNU Library General Public License as published by //# the Free Software Foundation; either version 2 of the License, or (at your //# option) any later version. //# //# This library 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 Library General Public //# License for more details. //# //# You should have received a copy of the GNU Library General Public License //# along with this library; if not, write to the Free Software Foundation, //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# //# Correspondence concerning AIPS++ should be addressed as follows: //# Internet email: aips2-request@nrao.edu. //# Postal address: AIPS++ Project Office //# National Radio Astronomy Observatory //# 520 Edgemont Road //# Charlottesville, VA 22903-2475 USA //# //# //# //# ------------------------------------------------------------------------- #if !defined SAS_H #define SAS_H #include #include //#include #include #include #include #include #include #include #include #include #include /////////////////////////////////////////////////////////////////////////////// //# Start of documentation. // // // A class to select/average spectral windows and associated channels // // // // // // // //
  • MeasurementSet // // // // // // // // // // // // // // // //
  • //
  • // // // //
  • everything, and //
  • everything else // //# End of documentation. /////////////////////////////////////////////////////////////////////////////// namespace casa { class SelectAverageSpw; typedef SelectAverageSpw SAS; class SelectAverageSpw { public: casacore::Int spwid; casacore::Int desc; casacore::Double rFreq; casacore::Int measFreqRef; //selected channels casacore::Vector chans; //averaged channels casacore::Vector aveFreqs; casacore::Vector aveChans; casacore::Vector sxsChans; casacore::Vector aveChanNames; casacore::Matrix aveChanMaps; //velocity depends on both freq and field and //can not be a member of this static casacore::Int nextSelected(casacore::Int spw, casacore::Int currId, casacore::Matrix& cList); static casacore::Int selectAverageChan(casacore::MS*, const casacore::Matrix& chanList, casacore::Vector& sp, const casacore::Int& aveChan = 1); static void averageVelocity(casacore::Bool &sorry, casacore::MS*, casacore::Vector& sp, casacore::Vector& velo, const casacore::Int& spwidx, const casacore::Int& filed = 0, const casacore::String& restfreq = "", const casacore::String& frame = "", const casacore::String& doppler = ""); static void showSASC(const casacore::Vector& sp); static void chanMap(casacore::Matrix& cmap, const casacore::Vector& sp); static void showSASC(); static casacore::Int descBySpw(const casacore::Int& spid, const casacore::Vector& sp); static casacore::Int spwByDesc(const casacore::Int& desc, const casacore::Vector& sp); static casacore::Int spwIndexByDesc(const casacore::Int& desc, const casacore::Vector& sp); static casacore::Int spwIndexBySpw(const casacore::Int& spid, const casacore::Vector& sp); static const casacore::Int maxChan; }; } #endif