Changeset 1222
- Timestamp:
- 08/31/06 12:04:30 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/Release2.1.0b/src/STMath.cpp
r1204 r1222 1126 1126 const std::string& weight ) 1127 1127 { 1128 if (in->getPolType() != "linear" || in->npol() != 2 ) 1129 throw(AipsError("averagePolarisations can only be applied to two linear polarisations.")); 1128 if (in->npol() <= 2 ) 1129 throw(AipsError("averagePolarisations can only be applied to two or more" 1130 "polarisations")); 1130 1131 bool insitu = insitu_; 1131 1132 setInsitu(false); 1132 CountedPtr< Scantable > pols = getScantable(in, false);1133 CountedPtr< Scantable > pols = getScantable(in, true); 1133 1134 setInsitu(insitu); 1134 1135 Table& tout = pols->table(); 1135 // give all rows the same POLNO 1136 std::string taql = "SELECT FROM $1 WHERE POLNO IN [0,1]"; 1137 Table tab = tableCommand(taql, in->table()); 1138 if (tab.nrow() == 0 ) 1139 throw(AipsError("Could not find any rows with POLNO==0 and POLNO==1")); 1140 TableCopy::copyRows(tout, tab); 1136 1141 TableVector<uInt> vec(tout, "POLNO"); 1137 1142 vec = 0;
Note:
See TracChangeset
for help on using the changeset viewer.