- Timestamp:
- 02/28/05 22:27:17 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDMemTable.cc
r504 r521 389 389 throw (AipsError("You must have 1,2 or 4 polarizations to get the Stokes parameters")); 390 390 } 391 392 // For full conversion we are only supporting linears at the moment 393 394 if (nPol() > 2) { 395 String antName; 396 table_.keywordSet().get("AntennaName", antName); 397 Instrument inst = SDAttr::convertInstrument (antName, True); 398 SDAttr sdAtt; 399 if (sdAtt.feedPolType(inst) != LINEAR) { 400 throw(AipsError("Only linear polarizations are supported")); 401 } 402 } 403 // 391 404 Array<Float> arr; 392 405 stokesCol_.get(whichRow, arr); 393 406 // 394 407 if (doPol && (polSel_==1 || polSel_==2)) { // Q,U --> P, P.A. 395 408 … … 1464 1477 String name; 1465 1478 Vector<uInt> freqIDs, listFQ; 1479 Vector<uInt> restFreqIDs, listRestFQ; 1466 1480 uInt nInt; 1467 1481 … … 1475 1489 // Find all the FreqIDs in this scan 1476 1490 listFQ.resize(0); 1491 listRestFQ.resize(0); 1477 1492 for (uInt j=startInt(i); j<endInt(i)+1; j++) { 1478 1493 freqidCol_.get(j, freqIDs); 1479 1494 for (uInt k=0; k<freqIDs.nelements(); k++) { 1480 1495 mathutil::addEntry(listFQ, freqIDs(k)); 1496 } 1497 // 1498 restfreqidCol_.get(j, restFreqIDs); 1499 for (uInt k=0; k<restFreqIDs.nelements(); k++) { 1500 mathutil::addEntry(listRestFQ, restFreqIDs(k)); 1481 1501 } 1482 1502 } … … 1489 1509 << setw(3) << std::right << nInt << setw(3) << " x " << std::left 1490 1510 << setw(6) << tInt 1491 << " " << listFQ << endl;1511 << " " << listFQ << " " << listRestFQ << endl; 1492 1512 } 1493 1513 oss << endl; … … 1697 1717 // If multiple restfreqs, must be length nIF. In this 1698 1718 // case we will just replace the rest frequencies 1719 // We can't disinguish scalar and vector of length 1 1699 1720 const uInt nRestFreqs = restFreqs.nelements(); 1700 1721 Int idx = -1; … … 1706 1727 throw (AipsError("Number of rest frequencies must be equal to the number of IFs")); 1707 1728 } 1708 cout << "Replacing rest frequencies with given list, one per IF"<< endl;1729 cout << "Replacing rest frequencies, one per IF, with given list : " << restFreqs << endl; 1709 1730 sdft.deleteRestFrequencies(); 1710 1731 for (uInt i=0; i<nRestFreqs; i++) { … … 1717 1738 Quantum<Double> rf(restFreqs[0], unit); 1718 1739 idx = sdft.addRestFrequency(rf.getValue("Hz")); 1719 cout << "Selecting given rest frequency" << endl; 1740 if (whichIF>=0) { 1741 cout << "Selecting given rest frequency (" << restFreqs[0] << ") for IF " << whichIF << endl; 1742 } else { 1743 cout << "Selecting given rest frequency (" << restFreqs[0] << ") for all IFs" << endl; 1744 } 1720 1745 } 1721 1746 … … 1730 1755 srcnCol_.get(i, srcName); 1731 1756 restfreqidCol_.get(i,restFreqIDs); 1732 1733 1757 if (idx==-1) { 1734 1758 // Replace vector of restFreqs; one per IF.
Note:
See TracChangeset
for help on using the changeset viewer.