Changeset 2955 for trunk/src/STCalTsysTable.cpp
- Timestamp:
- 06/25/14 15:28:36 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STCalTsysTable.cpp
r2756 r2955 19 19 #include <tables/Tables/ScaColDesc.h> 20 20 #include <tables/Tables/TableRecord.h> 21 #include <tables/Tables/TableIter.h> 21 22 #include <measures/TableMeasures/TableMeasDesc.h> 22 23 #include <measures/TableMeasures/TableMeasRefDesc.h> … … 42 43 : STApplyTable(name) 43 44 { 45 if (!table_.tableDesc().isColumn("FLAGTRA")) { 46 LogIO os(LogOrigin("STCalTsysTable", "STCalTsysTable", WHERE)); 47 os << "Adding FLAGTRA column to " << name << " with initial value of 0 (all data valid)." << LogIO::POST; 48 table_.addColumn(ArrayColumnDesc<uChar>("FLAGTRA")); 49 TableIterator iter(table_, "IFNO"); 50 while (!iter.pastEnd()) { 51 Table t = iter.table(); 52 ArrayColumn<Float> tsysCol(t, "TSYS"); 53 IPosition shape(2, tsysCol.shape(0)[0], t.nrow()); 54 ArrayColumn<uChar> flagtraCol(t, "FLAGTRA"); 55 Array<uChar> flagtra(shape, (uChar)0); 56 flagtraCol.putColumn(flagtra); 57 iter.next(); 58 } 59 } 60 44 61 attachOptionalColumns(); 45 62 } … … 52 69 { 53 70 table_.addColumn(ArrayColumnDesc<Float>("TSYS")); 71 table_.addColumn(ArrayColumnDesc<uChar>("FLAGTRA")); 54 72 table_.addColumn(ScalarColumnDesc<Float>("ELEVATION")); 55 73 … … 62 80 { 63 81 tsysCol_.attach(table_, "TSYS"); 82 flagtraCol_.attach(table_, "FLAGTRA"); 64 83 elCol_.attach(table_,"ELEVATION"); 65 84 … … 68 87 void STCalTsysTable::setdata(uInt irow, uInt scanno, uInt cycleno, 69 88 uInt beamno, uInt ifno, uInt polno, uInt freqid, 70 Double time, Float elevation, Vector<Float> tsys) 89 Double time, Float elevation, 90 const Vector<Float> &tsys, 91 const Vector<uChar> &flagtra) 71 92 { 72 93 if (irow >= (uInt)nrow()) { … … 82 103 elCol_.put(irow, elevation); 83 104 tsysCol_.put(irow, tsys); 105 flagtraCol_.put(irow, flagtra); 84 106 } 85 107 86 108 void STCalTsysTable::appenddata(uInt scanno, uInt cycleno, 87 109 uInt beamno, uInt ifno, uInt polno, uInt freqid, 88 Double time, Float elevation, Vector<Float> tsys) 110 Double time, Float elevation, 111 const Vector<Float> &tsys, 112 const Vector<uChar> &flagtra) 89 113 { 90 114 uInt irow = nrow(); 91 115 table_.addRow(1, True); 92 setdata(irow, scanno, cycleno, beamno, ifno, polno, freqid, time, elevation, tsys); 116 setdata(irow, scanno, cycleno, beamno, ifno, polno, freqid, time, elevation, 117 tsys, flagtra); 93 118 } 94 119
Note: See TracChangeset
for help on using the changeset viewer.