1 #ifndef _ASDMTABLEBASE_H_
2 #define _ASDMTABLEBASE_H_
53 const std::string&
name()
const;
56 virtual void fill(
const ASDM& asdm) = 0;
64 for (
unsigned int i = 0; i < v.size(); i++)
71 if (v.size() == 0 || v.at(0).size() == 0)
74 result.
resize(v.size(), v.at(0).size());
75 for (
unsigned int i = 0; i < v.size(); i++)
76 for (
unsigned int j = 0; j < v.at(0).size(); j++)
77 result(i,j) = v.at(i).at(j);
83 if (v.size() == 0 || v.at(0).size() == 0 || v.at(0).at(0).size() == 0)
86 result.
resize(v.size(), v.at(0).size(), v.at(0).at(0).size());
87 for (
unsigned int i = 0; i < v.size(); i++)
88 for (
unsigned int j = 0; j < v.at(0).size(); j++)
89 for (
unsigned int k = 0; k < v.at(0).at(0).size(); k++)
90 result(i,j,k) = v.
at(i).at(j).at(k);
100 for (
unsigned int i = 0; i < v.size(); i++)
101 result(i) = v.at(i).get();
107 if (v.size() == 0 || v.at(0).size() == 0)
110 result.
resize(v.size(), v.at(0).size());
111 for (
unsigned int i = 0; i < v.size(); i++)
112 for (
unsigned int j = 0; j < v.at(0).size(); j++)
113 result(i,j) = v.at(i).at(j).get();
119 if (v.size() == 0 || v.at(0).size() == 0 || v.at(0).at(0).size() == 0)
122 result.
resize(v.size(), v.at(0).size(), v.at(0).at(0).size());
123 for (
unsigned int i = 0; i < v.size(); i++)
124 for (
unsigned int j = 0; j < v.at(0).size(); j++)
125 for (
unsigned int k = 0; k < v.at(0).at(0).size(); k++)
126 result(i,j,k) = v.
at(i).at(j).at(k).get();
136 for (
unsigned int i = 0; i < v.size(); i++)
137 result(i) = v.at(i).toString();
143 if (v.size() == 0 || v.at(0).size() == 0)
146 result.
resize(v.size(), v.at(0).size());
147 for (
unsigned int i = 0; i < v.size(); i++)
148 for (
unsigned int j = 0; j < v.at(0).size(); j++)
149 result(i,j) = v.at(i).at(j).toString();
155 if (v.size() == 0 || v.at(0).size() == 0 || v.at(0).at(0).size() == 0)
158 result.
resize(v.size(), v.at(0).size(), v.at(0).at(0).size());
159 for (
unsigned int i = 0; i < v.size(); i++)
160 for (
unsigned int j = 0; j < v.at(0).size(); j++)
161 for (
unsigned int k = 0; k < v.at(0).at(0).size(); k++)
162 result(i,j,k) = v.
at(i).at(j).at(k).toString();
168 if (v.size() == 0)
return result;
171 for (
unsigned int i = 0; i < v.size(); i++)
178 if (v.size() == 0 || v.at(0).size() == 0)
return result;
180 result.
resize(v.size(), v.at(0).size());
181 for (
unsigned int i = 0; i < v.size(); i++)
182 for (
unsigned int j = 0 ; j < v.at(0).size(); j++)
189 if (v.size() == 0 || v.at(0).size() == 0 || v.at(0).at(0) == 0)
return result;
191 result.
resize(v.size(), v.at(0).size(), v.at(0).at(0).size());
192 for (
unsigned int i = 0; i < v.size(); i++)
193 for (
unsigned int j = 0 ; j < v.at(0).size(); j++)
194 for (
unsigned int k = 0 ; k < v.at(0).at(0).size(); k++)
201 if (v.size()==0)
return result;
204 for (
unsigned int i = 0; i < v.size(); i++)
205 result(i) = v.at(i).get()/1e09;
211 if (v.size()==0 || v.at(0).size())
return result;
213 result.
resize(v.size(), v.at(0).size());
214 for (
unsigned int i = 0; i < v.size(); i++)
215 for (
unsigned int j = 0; j < v.at(0).size(); j++)
216 result(i,j) = v.at(i).at(j).get()/1.e09;
222 if (v.size() == 0 || v.at(0).size() == 0 || v.at(0).at(0).size() == 0)
return result;
224 result.
resize(v.size(), v.at(0).size(), v.at(0).at(0).size());
225 for (
unsigned int i = 0; i < v.size(); i++)
226 for (
unsigned int j = 0; j < v.at(0).size(); j++)
227 for (
unsigned int k = 0; k < v.at(0).at(0).size(); k++)
228 result(i,j,k) = v.
at(i).at(j).at(k).get()/1.e09;
234 if (v.size()==0)
return result;
237 for (
unsigned int i = 0; i < v.size(); i++)
238 result(i) = v.at(i).get()/1e09;
244 if (v.size()==0 || v.at(0).size())
return result;
246 result.
resize(v.size(), v.at(0).size());
247 for (
unsigned int i = 0; i < v.size(); i++)
248 for (
unsigned int j = 0; j < v.at(0).size(); j++)
249 result(i,j) = v.at(i).at(j).get()/1.e09;
255 if (v.size() == 0 || v.at(0).size() == 0 || v.at(0).at(0).size() == 0)
return result;
257 result.
resize(v.size(), v.at(0).size(), v.at(0).at(0).size());
258 for (
unsigned int i = 0; i < v.size(); i++)
259 for (
unsigned int j = 0; j < v.at(0).size(); j++)
260 for (
unsigned int k = 0; k < v.at(0).at(0).size(); k++)
261 result(i,j,k) = v.
at(i).at(j).at(k).get()/1.e09;
274 if (v.size() == 0)
return result;
276 result.
resize(v.size(), 2);
277 for (std::vector<ArrayTimeInterval>::size_type i = 0; i < v.size(); i++) {
286 if (v.size() == 0 || v.at(0).size() == 0)
return result;
288 result.
resize(v.size(), v.at(0).size(), 2);
289 for (std::vector<std::vector<ArrayTimeInterval> >::size_type i = 0; i < v.size(); i++) {
290 for (std::vector<ArrayTimeInterval>::size_type j = 0; j < v.at(0).size(); j++) {
303 #endif // _ASDMTABLEBASE_H_
casacore::Cube< U > at2CASA3D(const std::vector< std::vector< std::vector< ArrayTime > > > &v)
casacore::Cube< U > basic2CASA3D(const std::vector< std::vector< std::vector< T > > > &v)
A 1-D Specialization of the Array class.
casacore::Cube< U > ext2CASA3D(const std::vector< std::vector< std::vector< T > > > &v)
casacore::Cube< casacore::String > enum2CASA3D(const std::vector< std::vector< std::vector< enumT > > > &v)
Main interface class to a read/write table.
void buildAndAttachTable(casacore::MS *attachMS)
casacore::Matrix< U > at2CASA2D(const std::vector< std::vector< ArrayTime > > &v)
The ArrayTimeInterval class aggregates an instance of ArrayTime and an instance of Interval...
A 3-D Specialization of the Array class.
The ASDM class is the container for all tables.
virtual void fill(const ASDM &asdm)=0
A 2-D Specialization of the Array class.
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
casacore::Cube< U > _2CASAString3D(const std::vector< std::vector< std::vector< T > > > &v)
ArrayTime getStart() const
Getters.
casacore::Cube< U > ati2CASA3D(const std::vector< std::vector< ArrayTimeInterval > > &v)
T & at(size_t i1, size_t i2, size_t i3)
casacore::Matrix< U > basic2CASA2D(const std::vector< std::vector< T > > &v)
casacore::Matrix< U > ati2CASA2D(const std::vector< ArrayTimeInterval > &v)
casacore::Matrix< U > ext2CASA2D(const std::vector< std::vector< T > > &v)
casacore::Matrix< U > _2CASAString2D(const std::vector< std::vector< T > > &v)
virtual const casacore::TableDesc & tableDesc() const =0
void resize(size_t nx, size_t ny, size_t nz, Bool copyValues=False)
virtual ~ASDM_TABLE_BASE()
casacore::Vector< U > ati2CASA1D(const ArrayTimeInterval &ati)
casacore::Table * table_p_
casacore::Cube< U > interval2CASA3D(const std::vector< std::vector< std::vector< T > > > &v)
casacore::Vector< U > ext2CASA1D(const std::vector< T > &v)
A Table intended to hold astronomical data (a set of Measurements).
casacore::Matrix< casacore::String > enum2CASA2D(const std::vector< std::vector< enumT > > &v)
casacore::Vector< U > at2CASA1D(const std::vector< ArrayTime > &v)
const std::string & name() const
static const int64_t unitsInASecond
Interval getDuration() const
casacore::Vector< U > basic2CASA1D(const std::vector< T > &v)
casacore::Vector< casacore::String > enum2CASA1D(const std::vector< enumT > &v)
void resize(size_t nx, size_t ny, Bool copyValues=False)
casacore::Table * table_p()
Define the structure of a Casacore table.
void resize(size_t len, Bool copyValues=False)
casacore::Matrix< U > interval2CASA2D(const std::vector< std::vector< T > > &v)
casacore::Vector< U > interval2CASA1D(const std::vector< T > &v)
casacore::Vector< U > _2CASAString1D(const std::vector< T > &v)