casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BaselineMetadata.h
Go to the documentation of this file.
1 #if !defined(_BASELINEMETADATA_H)
3 
4 namespace sdmbin {
5 
15  {
16  public:
17 
44  int numValue();
45 
49  virtual int numAnt()=0;
50 
54  virtual int actualNumAnt()=0;
55 
59  int numBaseline();
60 
64  int numBaseband();
65 
73  int numPolProduct(int basebandNum) throw (Error);
74 
82  std::vector<int> numPolProduct();
83 
89  int numBin(int basebandNum) throw (Error);
90 
94  std::vector<int> numBin();
95 
104  int correlationMode();
105 
111  int numAutoPolProduct(int basebandNum) throw (Error);
112 
116  std::vector<int> numAutoPolProduct();
117 
118 
124  virtual std::vector<int> antennaIndexUsed(unsigned long int valLimit)=0;
125 
132  int baselineNum(int anti, int antj) throw(Error);
133 
142  int at(int npp, int nbin, int nbb, int i, int j);
143 
153  std::vector<int> at( int npp, int nbb, int i, int j); // numPolProduct elements
154 
163  std::vector<int> at(int npp, int nbin, int nbb ); // numNonZeroBaseline elements
164 
171  std::vector<std::vector<int> > at( int nbin, int nbb ); // numNonZeroBaseline vectors of numPolProduct elem.
172 
179  std::vector<std::vector<std::vector<int> > > at(bool cross, int i ); // numBaseline vectors of numBasebands vectors of numPP elem.
180 
181  static int FLAGLIMIT;
182 
183  protected:
187  virtual ~BaselineMetadata();
188 
189 
197  void mkBaselineMetadata( std::vector<int> v_npp, std::vector<int> v_nbin, int nbb, int nant, int correlationMode);
198 
199 
200  std::vector<int> v_numPolProduct_;
201  std::vector<int> v_numBin_;
203  int numAnt_;
205 
206  int autoSize_;
209  std::vector<int> v_numAutoPolProduct_;
210 
215  bool wrongBasebandNum(int basebandNum);
216 
221  bool notFor(bool interfero);
222 
228  bool wrongAntennaIndex(int antIndex);
229 
236  bool wrongBasebandIndex(int bbIndex);
237 
247  bool wrongPolProductIndex(int ppIndex,int bbIndex,int antIndex_i,int antIndex_j);
248 
252  virtual void display()=0;
253 
254 
255  private:
258 
283  void sizes();
284  };
285 
296 }
297 #define _BASELINEMETADATA_H
298 #endif
int at(int npp, int nbin, int nbb, int i, int j)
Index in a container of baseline-based metadata given a node specified by a full set of indices of th...
std::vector< int > numAutoPolProduct()
Accessor to the (derived) number of polarization products for the zero baselines for all the baseband...
virtual int actualNumAnt()=0
Accessor to an actual number of antennas Specifities are defined in the derived classes.
The Error class represents a list of exceptions that may happen when errors occur.
Definition: ATMError.h:56
Class for baseline-based metadata objects, one type of component in SDM data objects.
virtual std::vector< int > antennaIndexUsed(unsigned long int valLimit)=0
Method to get the list of the antenna indices restricted to those which are not flagged above a certa...
virtual int numAnt()=0
Accessor to a generic number of antennas Specifities are defined in the derived classes.
int autoSize_
Number of metadata values for all the zero baselines (second part in size formula) ...
virtual ~BaselineMetadata()
Virtual destructor.
bool wrongBasebandIndex(int bbIndex)
Utility method to check that the input baseband index value in a query is valid or not...
int numAnt_
Number of antennas.
int numBaseline_
Number of baselines.
std::vector< int > v_numAutoPolProduct_
Number of auto polarization products for every baseband.
int numValPerBaseline_
Number of metadata values per non-zero baseline (first sum in size formula)
BaselineMetadata()
Default constructor.
std::vector< int > v_numBin_
Number of phases in SwitchCycles for every baseband.
int crossSize_
Number of metadata values for all the non-zero baselines (first part in size formula) ...
std::vector< int > numPolProduct()
Accessor to the number of polarization products.
bool notFor(bool interfero)
Utility method to check that a query is relevant or not for interferometric data. ...
int numBaseband_
Number of basebands.
std::vector< int > numBin()
Accessor to the number of bins (steps or phases in scwitching cycles) for each baseband.
bool wrongPolProductIndex(int ppIndex, int bbIndex, int antIndex_i, int antIndex_j)
Utility method to check that the input set of index values in a query is valid or not...
int correlationMode()
Accessor to the correlation mode.
bool wrongAntennaIndex(int antIndex)
Utility method to check that the input value of antenna index in a query is valid or not...
void mkBaselineMetadata(std::vector< int > v_npp, std::vector< int > v_nbin, int nbb, int nant, int correlationMode)
Method to instantiate the base of the hierarchy.
std::vector< int > v_numPolProduct_
Number of cross polarization products for every baseband.
int numValue()
Total (cross+auto) number of metadata values.
virtual void display()=0
Common part shared by the derived classes for summary information Display, for each baseband sizes (i...
int baselineNum(int anti, int antj)
Baseline number (one-based) given a pair of antenna indices.
int numValPerZeroBaseline_
Number of metadata values per zero baseline (second sum in size formula)
int numBaseband()
Accessor to the number of basebands.
int correlationMode_
Correlation mode.
void sizes()
Method to get the size (in number of typed values).
bool wrongBasebandNum(int basebandNum)
Utility to access the validity of an input basebandNum.
int numBaseline()
Accessor to the number of baselines.