Changeset 2938
- Timestamp:
- 05/02/14 19:43:14 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Scantable.cpp
r2908 r2938 1110 1110 Block< Vector<uInt> > ifNos(nfid), polNos(nfid); 1111 1111 Vector<Int> fIdchans(nfid,-1); 1112 Vector<Double> fIdfreq0(nfid,-1); 1113 Vector<Double> fIdfcent(nfid,-1); 1112 1114 map<uInt, Int> fidMap; // (FREQ_ID, row # in FREQ subtable) pair 1113 1115 for (Int i=0; i < nfid; i++){ … … 1189 1191 fIdchans(ftabRow)=(*spec).shape()(0); 1190 1192 } 1193 if (fIdfreq0(ftabRow) < 0 ) { 1194 SpectralCoordinate spc = frequencies().getSpectralCoordinate(ftabRow); 1195 Double fs, fe; 1196 spc.toWorld(fs, 0); 1197 spc.toWorld(fe, fIdchans(ftabRow)-1); 1198 fIdfreq0(ftabRow) = fs; 1199 fIdfcent(ftabRow) = 0.5 * ( fs + fe ); 1200 } 1191 1201 // Should keep ifNos and polNos form the previous SCANNO 1192 1202 if ( !anyEQ(ifNos[ftabRow],ifNoCol(0)) ) { … … 1227 1237 RORecordFieldPtr< Array<Float> > spec(rec, "SPECTRA"); 1228 1238 fIdchans(ftabRow) = (*spec).shape()(0); 1239 } 1240 if (fIdfreq0(ftabRow) < 0 ) { 1241 SpectralCoordinate spc = frequencies().getSpectralCoordinate(ftabRow); 1242 Double fs, fe; 1243 spc.toWorld(fs, 0); 1244 spc.toWorld(fe, fIdchans(ftabRow)-1); 1245 fIdfreq0(ftabRow) = fs; 1246 fIdfcent(ftabRow) = 5.e-1 * ( fs + fe ); 1229 1247 } 1230 1248 if ( !anyEQ(ifNos[ftabRow],ifNoCol(i)) ) { … … 1274 1292 // List FRECUENCIES Table (using STFrequencies.print may be slow) 1275 1293 oss << "FREQUENCIES: " << nfreq << endl; 1276 oss << std::right << setw(5) << "ID" << setw(2) << "" 1277 << std::left << setw(5) << "IFNO" << setw(2) << "" 1294 // oss << std::right << setw(5) << "ID" << setw(2) << "" 1295 // << std::left << setw(5) << "IFNO" << setw(2) << "" 1296 // << setw(8) << "Frame" 1297 // << setw(16) << "RefVal" 1298 // << setw(7) << "RefPix" 1299 // << setw(15) << "Increment" 1300 // << setw(9) << "Channels" 1301 // << setw(6) << "POLNOs" << endl; 1302 // Int tmplen; 1303 // for (Int i=0; i < nfid; i++){ 1304 // // List row=i of FREQUENCIES subtable 1305 // ifNos[i].shape(tmplen); 1306 // if (tmplen >= 1) { 1307 // oss << std::right << setw(5) << ftabIds(i) << setw(2) << "" 1308 // << setw(3) << ifNos[i](0) << setw(1) << "" 1309 // << std::left << setw(46) << frequencies().print(ftabIds(i)) 1310 // << setw(2) << "" 1311 // << std::right << setw(8) << fIdchans[i] << setw(2) << "" 1312 // << std::left << polNos[i]; 1313 // if (tmplen > 1) { 1314 // oss << " (" << tmplen << " chains)"; 1315 // } 1316 // oss << endl; 1317 // } 1318 oss << std::right << setw(4) << "ID" << setw(2) << "" 1319 << std::left << setw(9) << "IFNO(SPW)" << setw(2) << "" 1320 << setw(8) << "#Chans" 1278 1321 << setw(8) << "Frame" 1279 << setw(16) << "RefVal" 1280 << setw(7) << "RefPix" 1281 << setw(15) << "Increment" 1282 << setw(9) << "Channels" 1322 << setw(12) << "Ch0[MHz]" 1323 << setw(14) << "ChanWid[kHz]" 1324 << setw(14) << "Center[MHz]" 1283 1325 << setw(6) << "POLNOs" << endl; 1284 1326 Int tmplen; … … 1286 1328 // List row=i of FREQUENCIES subtable 1287 1329 ifNos[i].shape(tmplen); 1330 Double refpix, refval, increment ; 1288 1331 if (tmplen >= 1) { 1289 oss << std::right << setw(5) << ftabIds(i) << setw(2) << "" 1290 << setw(3) << ifNos[i](0) << setw(1) << "" 1291 << std::left << setw(46) << frequencies().print(ftabIds(i)) 1292 << setw(2) << "" 1293 << std::right << setw(8) << fIdchans[i] << setw(2) << "" 1332 freqTable_.getEntry( refpix, refval, increment, ftabIds(i) ) ; 1333 oss << std::right << setw(4) << ftabIds(i) << setw(2) << "" 1334 << std::left << setw(9) << ifNos[i](0) << setw(2) << "" 1335 << std::right << setw(6) << fIdchans[i] << setw(2) << "" 1336 << setw(6) << frequencies().getFrameString(true) 1337 << setw(2) << "" 1338 << setw(10) << std::setprecision(9) << (fIdfreq0[i]*1.e-6) << setw(2) << "" 1339 << setw(12) << (increment*1.e-3) << setw(2) << "" 1340 << setw(12) << (fIdfcent[i]*1.e-6) << setw(2) << "" 1294 1341 << std::left << polNos[i]; 1295 1342 if (tmplen > 1) {
Note:
See TracChangeset
for help on using the changeset viewer.