casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AntennaRecord.h
Go to the documentation of this file.
1 /*
2  * AntennaRecord.h
3  *
4  * Created on: Jan 27, 2016
5  * Author: nakazato
6  */
7 
8 #ifndef SINGLEDISH_FILLER_ANTENNARECORD_H_
9 #define SINGLEDISH_FILLER_ANTENNARECORD_H_
10 
15 
16 namespace casa { //# NAMESPACE CASA - BEGIN
17 namespace sdfiller { //# NAMESPACE SDFILLER - BEGIN
18 
19 struct AntennaRecord {
22 
23  // mandatory
29 
30  // optional
33 
34  // method
35  void clear() {
36  name = "";
38  type = "";
39  mount = "";
40  dish_diameter = -1.0;
41  station = "";
43  }
44 
46  name = other.name;
47  position = other.position;
48  type = other.type;
49  mount = other.mount;
51  station = other.station;
52  offset = other.offset;
53  return *this;
54  }
55 
56  void add(AssociatingTable &table, AssociatingColumns &/*columns*/) {
57  table.addRow(1, true);
58  }
59 
61  if (columns.nrow() <= irow) {
62  return false;
63  }
64 
65  columns.name().put(irow, name);
66  columns.positionMeas().put(irow, position);
67  columns.type().put(irow, type);
68  columns.mount().put(irow, mount);
69  columns.dishDiameter().put(irow, dish_diameter);
70  if (station.size() > 0) {
71  columns.station().put(irow, station);
72  }
73  if (anyNE(offset.getAngle().getValue(), 0.0)) {
74  columns.offsetMeas().put(irow, offset);
75  }
76  return true;
77  }
78 };
79 
80 } //# NAMESPACE SDFILLER - END
81 } //# NAMESPACE CASA - END
82 
83 #endif /* SINGLEDISH_FILLER_ANTENNARECORD_H_ */
ScalarMeasColumn< MPosition > & positionMeas()
void addRow(uInt nrrow=1, Bool initialize=False)
Add one or more rows at the end of the table.
Definition: Table.h:1235
A Measure: position on Earth.
Definition: MPosition.h:79
ScalarColumn< String > & name()
casacore::MSAntennaColumns AssociatingColumns
Definition: AntennaRecord.h:21
Quantum< Vector< Double > > getAngle() const
AntennaRecord & operator=(AntennaRecord const &other)
Definition: AntennaRecord.h:45
uInt nrow() const
Convenience function that returns the number of rows in any of the columns.
size_type size() const
Capacity, size.
Definition: String.h:342
A Table intended to hold a MeasurementSet ANTENNA table.
Definition: MSAntenna.h:79
ScalarColumn< String > & mount()
Bool anyNE(const TableVector< T > &l, const TableVector< T > &r)
Definition: TabVecLogic.h:173
void add(AssociatingTable &table, AssociatingColumns &)
Definition: AntennaRecord.h:56
ScalarMeasColumn< MPosition > & offsetMeas()
casacore::String name
mandatory
Definition: AntennaRecord.h:24
casacore::Double dish_diameter
Definition: AntennaRecord.h:28
ScalarColumn< Double > & dishDiameter()
Read-write access to required columns.
double Double
Definition: aipstype.h:55
A class to provide easy read-write access to MSAntenna columns.
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::Bool fill(casacore::uInt irow, AssociatingColumns &columns)
Definition: AntennaRecord.h:60
casacore::MPosition offset
Definition: AntennaRecord.h:32
const Qtype & getValue() const
Get value of quantum in current units (i.e.
casacore::String station
optional
Definition: AntennaRecord.h:31
ScalarColumn< String > & station()
void put(uInt rownr, const T &value)
Put the value in a particular cell (i.e.
Definition: ScalarColumn.h:198
String: the storage and methods of handling collections of characters.
Definition: String.h:223
void put(uInt rownr, const M &meas)
Put a Measure into the given row.
ScalarColumn< String > & type()
casacore::MPosition position
Definition: AntennaRecord.h:25
casacore::MSAntenna AssociatingTable
Definition: AntennaRecord.h:20
unsigned int uInt
Definition: aipstype.h:51