casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
BaselineMetadata.h
Go to the documentation of this file.
00001 #if     !defined(_BASELINEMETADATA_H)
00002 #include "Error.h"
00003 
00004 namespace sdmbin {
00005 
00014   class BaselineMetadata
00015   { 
00016   public:
00017    
00044     int                  numValue();
00045 
00049     virtual int          numAnt()=0;
00050 
00054     virtual int          actualNumAnt()=0;
00055 
00059     int                  numBaseline();
00060 
00064     int                  numBaseband();
00065 
00073     int                  numPolProduct(int basebandNum) throw (Error);
00074 
00082     vector<int>          numPolProduct();
00083 
00089     int                  numBin(int basebandNum) throw (Error);
00090 
00094     vector<int>          numBin();
00095 
00104     int                  correlationMode();
00105 
00111     int                  numAutoPolProduct(int basebandNum) throw (Error);
00112 
00116     vector<int>          numAutoPolProduct();
00117 
00118 
00124     virtual vector<int>  antennaIndexUsed(unsigned long int valLimit)=0;
00125 
00132     int                  baselineNum(int anti, int antj) throw(Error);
00133 
00142     int                           at(int npp, int nbin, int nbb, int i, int j);
00143 
00153     vector<int>                   at(         int npp, int nbb, int i, int j);  // numPolProduct elements
00154 
00163     vector<int>                   at(int npp, int nbin, int nbb              );  // numNonZeroBaseline elements         
00164 
00171     vector<vector<int> >          at(         int nbin, int nbb              );  // numNonZeroBaseline vectors of numPolProduct elem.
00172 
00179     vector<vector<vector<int> > > at(bool cross, int i                       );  // numBaseline vectors of numBasebands vectors of numPP elem. 
00180 
00181     static int           FLAGLIMIT;
00182 
00183   protected:
00185     BaselineMetadata();
00187     virtual ~BaselineMetadata();
00188 
00189 
00197     void mkBaselineMetadata( vector<int> v_npp, vector<int> v_nbin, int nbb, int nant, int correlationMode);
00198 
00199 
00200     vector<int> v_numPolProduct_;     
00201     vector<int> v_numBin_;            
00202     int         numBaseband_;         
00203     int         numAnt_;              
00204     int         numBaseline_;         
00205   
00206     int         autoSize_;            
00207     int         crossSize_;           
00208     int         correlationMode_;     
00209     vector<int> v_numAutoPolProduct_; 
00210 
00215     bool wrongBasebandNum(int basebandNum);
00216 
00221     bool        notFor(bool interfero);
00222 
00228     bool        wrongAntennaIndex(int antIndex);
00229 
00236     bool        wrongBasebandIndex(int bbIndex);
00237 
00247     bool        wrongPolProductIndex(int ppIndex,int bbIndex,int antIndex_i,int antIndex_j);
00248 
00252     virtual void display()=0;
00253 
00254 
00255   private:
00256     int         numValPerBaseline_;      
00257     int         numValPerZeroBaseline_;  
00258 
00283     void        sizes();                 
00284   };
00285 
00296 }
00297 #define _BASELINEMETADATA_H
00298 #endif