Changeset 1694


Ignore:
Timestamp:
02/11/10 09:45:47 (15 years ago)
Author:
Malte Marquarding
Message:

Ticket #172: inverse scaling factor was used in coordinate resampling. Also added no of channels to each IF in scantable.summary and made all get{IF/Beam/Pol}No functions const

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STFrequencies.cpp

    r1375 r1694  
    212212{
    213213  Vector<Float> offset(1,0.0);
    214   Vector<Float> factors(1,1.0/width);
     214  Vector<Float> factors(1,width);
    215215  Vector<Int> newshape;
    216216  CoordinateSystem csys;
     
    287287        << rec.asDouble("REFVAL") << setw(7)
    288288        << rec.asDouble("REFPIX")
    289         << setw(12)
     289        << setw(15)
    290290        << rec.asDouble("INCREMENT");
    291291  }
     
    294294    int f = outstr.find_first_not_of(' ');
    295295    int l = outstr.find_last_not_of(' ', outstr.size());
    296     if (f < 0) { 
    297       f = 0; 
    298     }
    299     if ( l < f  || l < f ) { 
     296    if (f < 0) {
     297      f = 0;
     298    }
     299    if ( l < f  || l < f ) {
    300300      l = outstr.size();
    301301    }
     
    409409}
    410410
    411 void STFrequencies::shiftRefPix(int npix, uInt id) 
     411void STFrequencies::shiftRefPix(int npix, uInt id)
    412412{
    413413  Table t = table_(table_.col("ID") == Int(id) );
  • trunk/src/Scantable.cpp

    r1692 r1694  
    560560}
    561561
    562 std::vector<uint> Scantable::getNumbers(ScalarColumn<uInt>& col)
     562std::vector<uint> Scantable::getNumbers(const ScalarColumn<uInt>& col) const
    563563{
    564564  Vector<uInt> nos(col.getColumn());
     
    770770      << setw(15) << "Polarisations:" << setw(4) << npol()
    771771      << "(" << getPolType() << ")" << endl
    772       << setw(15) << "Channels:"  << setw(4) << nchan() << endl;
    773   oss << endl;
     772      << setw(15) << "Channels:" << nchan() << endl;
    774773  String tmp;
    775774  oss << setw(15) << "Observer:"
     
    802801      << setw(10) << "Time" << setw(18) << "Integration" << endl;
    803802  oss << setw(5) << "" << setw(5) << "Beam" << setw(3) << "" << dirtype << endl;
    804   oss << setw(10) << "" << setw(3) << "IF" << setw(6) << ""
     803  oss << setw(10) << "" << setw(3) << "IF" << setw(3) << ""
    805804      << setw(8) << "Frame" << setw(16)
    806       << "RefVal" << setw(10) << "RefPix" << setw(12) << "Increment" <<endl;
     805      << "RefVal" << setw(10) << "RefPix" << setw(12) << "Increment"
     806      << setw(7) << "Channels"
     807      << endl;
    807808  oss << asap::SEPERATOR << endl;
    808809  TableIterator iter(table_, "SCANNO");
     
    839840        ROTableRow irow(isubt);
    840841        const TableRecord& irec = irow.get(0);
    841         oss << setw(10) << "";
     842        oss << setw(9) << "";
    842843        oss << setw(3) << std::right << irec.asuInt("IFNO") << std::left
    843             << setw(2) << "" << frequencies().print(irec.asuInt("FREQ_ID"))
     844            << setw(1) << "" << frequencies().print(irec.asuInt("FREQ_ID"))
     845            << setw(3) << "" << nchan(irec.asuInt("IFNO"))
    844846            << endl;
    845847
  • trunk/src/Scantable.h

    r1598 r1694  
    266266
    267267  int getBeam(int whichrow) const;
    268   std::vector<uint> getBeamNos() { return getNumbers(beamCol_); }
     268  std::vector<uint> getBeamNos() const { return getNumbers(beamCol_); }
    269269
    270270  int getIF(int whichrow) const;
    271   std::vector<uint> getIFNos() { return getNumbers(ifCol_); }
     271  std::vector<uint> getIFNos() const { return getNumbers(ifCol_); }
    272272
    273273  int getPol(int whichrow) const;
    274   std::vector<uint> getPolNos() { return getNumbers(polCol_); }
    275 
    276   std::vector<uint> getScanNos() { return getNumbers(scanCol_); }
     274  std::vector<uint> getPolNos() const { return getNumbers(polCol_); }
     275
     276  std::vector<uint> getScanNos() const { return getNumbers(scanCol_); }
    277277  int getScan(int whichrow) const { return scanCol_(whichrow); }
    278278
     
    459459  int rowToScanIndex(int therow);
    460460
    461   std::vector<uint> getNumbers(casa::ScalarColumn<casa::uInt>& col);
     461  std::vector<uint> getNumbers(const casa::ScalarColumn<casa::uInt>& col) const;
    462462
    463463  static const casa::uInt version_ = 3;
Note: See TracChangeset for help on using the changeset viewer.