MSMetaInfoForCal.h

Go to the documentation of this file.
00001 //# MSMetaInfoForCal.h: MS Meta info services in Calibraiton context
00002 //# Copyright (C) 2016
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be adressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //#
00027 
00028 #ifndef SYNTHESIS_MSMETAINFOFORCAL_H
00029 #define SYNTHESIS_MSMETAINFOFORCAL_H
00030 
00031 #include <casa/aips.h>
00032 #include <casa/iostream.h>
00033 #include <casa/BasicSL/String.h>
00034 #include <ms/MeasurementSets/MeasurementSet.h>
00035 #include <msvis/MSVis/SimpleSimVi2.h>
00036 
00037 class MSMetaData;
00038 
00039 namespace casa { //# NAMESPACE CASA - BEGIN
00040 
00041 class MSMetaInfoForCal {
00042   
00043 public:
00044 
00045   // Construct from the filename of an MS
00046   //  (If the MS doesn't exist, services will be trivialized)
00047   MSMetaInfoForCal(String msname);
00048 
00049   // Construct from a supplied MS object
00050   MSMetaInfoForCal(const MeasurementSet& ms);
00051 
00052   // Construct from nAnt,nSpw
00053   MSMetaInfoForCal(uInt nAnt,uInt nSpw,uInt nFld);
00054 
00055   // Construct from SimpleSimVi2Paremeters
00056   //   (useful for testing w/ actual (spoofed) data iteration
00057   MSMetaInfoForCal(const vi::SimpleSimVi2Parameters& sspar);
00058 
00059   // Dtor
00060   ~MSMetaInfoForCal();
00061 
00062   // The MS name
00063   String msname() const { return msname_; };
00064 
00065   // Signal if a real MS was specified in ctor
00066   Bool msOk() const { return msOk_; };
00067 
00068   // Return access to MSMetaData object (if avail)
00069   const MSMetaData& msmd() const;
00070 
00071   // The number of antennas
00072   uInt nAnt() const { return nAnt_;};
00073 
00074   // Antenna name, by index
00075   String antennaName(uInt iant) const;
00076 
00077   // All antenna names, as vector
00078   void antennaNames(Vector<String>& antnames) const;
00079 
00080   // The number of spws
00081   uInt nSpw() const { return nSpw_;};
00082 
00083   // Spw name, by index
00084   String spwName(uInt ispw) const;
00085 
00086   // The number of fields
00087   uInt nFld() const { return nFld_;};
00088 
00089   // Field name, by index
00090   String fieldName(uInt ifld) const;
00091 
00092   // All field names, as vector
00093   void fieldNames(Vector<String>& fldnames) const;
00094 
00095   // Field id at time
00096   Int fieldIdAtTime(Double time) const;
00097 
00098   // Scan number at time
00099   Int scanNumberAtTime(Double time) const;
00100 
00101 
00102 private:
00103 
00104   // The supplied MS name
00105   String msname_;
00106 
00107   // Is the MS available (else spoof)
00108   Bool msOk_;
00109 
00110   // Remember basic shapes
00111   uInt nAnt_, nSpw_, nFld_;
00112 
00113   // MS pointer
00114   MeasurementSet *ms_;
00115 
00116   // MSMetaData pointer
00117   MSMetaData *msmd_;
00118 
00119 
00120 };
00121 
00122 
00123 } //# NAMESPACE CASA - END
00124 
00125 #endif
00126 
00127 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1