- Timestamp:
- 02/08/05 13:21:28 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDMemTable.cc
r380 r385 444 444 445 445 SpectralCoordinate spc = getSpectralCoordinate(freqID, whichRow); 446 //447 446 Vector<Double> pixel(nChan()); 448 447 indgen(pixel); … … 709 708 uInt whichRow) const 710 709 { 710 711 711 // Create basic SC 712 712 … … 1085 1085 std::string SDMemTable::summary(bool verbose) const { 1086 1086 1087 // Format header info 1088 1087 1089 ostringstream oss; 1088 1090 oss << endl; … … 1122 1124 oss << endl; 1123 1125 // 1124 String dirtype ="Position ("+ 1125 MDirection::showType(getDirectionReference())+ 1126 ")"; 1126 String dirtype ="Position ("+ MDirection::showType(getDirectionReference()) + ")"; 1127 1127 oss << setw(5) << "Scan" 1128 1128 << setw(15) << "Source" … … 1133 1133 oss << "--------------------------------------------------------------------------------" << endl; 1134 1134 1135 // 1136 uInt scanNo = 0; 1135 // Generate list of scan start and end integrations 1136 1137 Vector<Int> scanIDs = scanCol_.getColumn(); 1138 Vector<uInt> startInt, endInt; 1139 mathutil::scanBoundaries(startInt, endInt, scanIDs); 1140 // 1141 const uInt nScans = startInt.nelements(); 1137 1142 String name; 1138 Int lastScanID = 0;1139 Int scanID;1140 uInt firstRow = 0;1141 1143 Vector<uInt> freqIDs, listFQ; 1142 // 1143 uInt nRow = scanCol_.nrow(); 1144 for (uInt i=0; i<nRow; i++) { 1145 scanCol_.getScalar(i,scanID); 1146 freqidCol_.get(i, freqIDs); 1147 // 1148 if (i>0 && (i==nRow-1 || scanID!=lastScanID)) { 1149 srcnCol_.getScalar(firstRow,name); 1150 String t = formatSec(Double(getInterval(firstRow))); 1151 String posit = formatDirection(getDirection(firstRow,True)); 1152 uInt nInt = (i-firstRow); 1153 1154 // Special case adjustments 1155 1156 if (i==nRow-1 &&scanID==lastScanID) nInt++; 1157 if (nInt==1 && i>1) { 1158 for (uInt j=0; j<freqIDs.nelements(); j++) 1159 mathutil::addEntry(listFQ, freqIDs(j)); 1144 uInt nInt; 1145 // 1146 for (uInt i=0; i<nScans; i++) { 1147 1148 // Get things from first integration of scan 1149 1150 String time = getTime(startInt(i),False); 1151 String tInt = formatSec(Double(getInterval(startInt(i)))); 1152 String posit = formatDirection(getDirection(startInt(i),True)); 1153 srcnCol_.getScalar(startInt(i),name); 1154 1155 // Find all the FreqIDs in this scan 1156 1157 listFQ.resize(0); 1158 for (uInt j=startInt(i); j<endInt(i)+1; j++) { 1159 freqidCol_.get(j, freqIDs); 1160 for (uInt k=0; k<freqIDs.nelements(); k++) { 1161 mathutil::addEntry(listFQ, freqIDs(k)); 1162 } 1160 1163 } 1161 oss << setw(3) << std::right << scanNo << std::left << setw(2) << " " 1164 // 1165 nInt = endInt(i) - startInt(i) + 1; 1166 oss << setw(3) << std::right << i << std::left << setw(2) << " " 1162 1167 << setw(15) << name 1163 1168 << setw(24) << posit 1164 << setw(10) << getTime(firstRow,False)1169 << setw(10) << time 1165 1170 << setw(3) << std::right << nInt << setw(3) << " x " << std::left 1166 << setw(6) << t 1171 << setw(6) << tInt 1167 1172 << " " << listFQ << endl; 1168 //1169 lastScanID = scanID;1170 firstRow = i;1171 scanNo++;1172 listFQ.resize(0);1173 } else {1174 for (uInt j=0; j<freqIDs.nelements(); j++) mathutil::addEntry(listFQ, freqIDs(j));1175 }1176 1173 } 1177 1174 oss << endl; 1178 oss << "Table contains " << table_.nrow() << " integration(s) in " << scanNo<< " scan(s)." << endl;1175 oss << "Table contains " << table_.nrow() << " integration(s) in " << nScans << " scan(s)." << endl; 1179 1176 1180 1177 // Frequency Table 1178 1181 1179 if (verbose) { 1182 1180 std::vector<string> info = getCoordInfo();
Note:
See TracChangeset
for help on using the changeset viewer.