Changeset 521 for trunk


Ignore:
Timestamp:
02/28/05 22:27:17 (20 years ago)
Author:
kil064
Message:

add restFreqIDs to summary listing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SDMemTable.cc

    r504 r521  
    389389     throw (AipsError("You must have 1,2 or 4 polarizations to get the Stokes parameters"));
    390390  }
     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//
    391404  Array<Float> arr;
    392405  stokesCol_.get(whichRow, arr);
    393 
     406//
    394407  if (doPol && (polSel_==1 || polSel_==2)) {       //   Q,U --> P, P.A.
    395408
     
    14641477  String name;
    14651478  Vector<uInt> freqIDs, listFQ;
     1479  Vector<uInt> restFreqIDs, listRestFQ;
    14661480  uInt nInt;
    14671481
     
    14751489    // Find all the FreqIDs in this scan
    14761490    listFQ.resize(0);     
     1491    listRestFQ.resize(0);     
    14771492    for (uInt j=startInt(i); j<endInt(i)+1; j++) {
    14781493      freqidCol_.get(j, freqIDs);
    14791494      for (uInt k=0; k<freqIDs.nelements(); k++) {
    14801495        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));
    14811501      }
    14821502    }
     
    14891509        << setw(3) << std::right << nInt  << setw(3) << " x " << std::left
    14901510        << setw(6) <<  tInt
    1491         << " " << listFQ << endl;
     1511        << " " << listFQ << " " << listRestFQ << endl;
    14921512  }
    14931513  oss << endl;
     
    16971717   // If multiple restfreqs, must be length nIF. In this
    16981718   // case we will just replace the rest frequencies
     1719   // We can't disinguish scalar and vector of length 1
    16991720   const uInt nRestFreqs = restFreqs.nelements();
    17001721   Int idx = -1;
     
    17061727         throw (AipsError("Number of rest frequencies must be equal to the number of IFs"));
    17071728      }
    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;
    17091730      sdft.deleteRestFrequencies();
    17101731      for (uInt i=0; i<nRestFreqs; i++) {
     
    17171738      Quantum<Double> rf(restFreqs[0], unit);
    17181739      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      }
    17201745   }
    17211746   
     
    17301755         srcnCol_.get(i, srcName);
    17311756         restfreqidCol_.get(i,restFreqIDs);       
    1732 
    17331757         if (idx==-1) {
    17341758           // Replace vector of restFreqs; one per IF.
Note: See TracChangeset for help on using the changeset viewer.