Ignore:
Timestamp:
08/04/06 12:06:38 (18 years ago)
Author:
mar637
Message:

add getNumbers utility function, which is now called by all function which retrieve numbers from the Scantable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Scantable.cpp

    r1068 r1111  
    134134      table_.markForDelete();
    135135  }
    136 
     136  /// @todo reindex SCANNO, recompute nbeam, nif, npol
    137137  if ( clear ) copySubtables(other);
    138138  attachSubtables();
     
    338338
    339339
    340 int Scantable::nscan() const {
    341   Vector<uInt> scannos(scanCol_.getColumn());
    342   uInt nout = GenSort<uInt>::sort( scannos, Sort::Ascending,
    343                        Sort::QuickSort|Sort::NoDuplicates );
    344   return int(nout);
    345 }
    346340
    347341std::string Scantable::formatSec(Double x) const
     
    418412  String inname(filename);
    419413  Path path(inname);
     414  /// @todo reindex SCANNO, recompute nbeam, nif, npol
    420415  inname = path.expandedName();
    421416  table_.deepCopy(inname, Table::New);
     
    532527}
    533528
     529int Scantable::nscan() const {
     530  Vector<uInt> scannos(scanCol_.getColumn());
     531  uInt nout = GenSort<uInt>::sort( scannos, Sort::Ascending,
     532                       Sort::QuickSort|Sort::NoDuplicates );
     533  return int(nout);
     534}
     535
    534536int Scantable::getChannels(int whichrow) const
    535537{
     
    540542{
    541543  return beamCol_(whichrow);
     544}
     545
     546std::vector<uint> Scantable::getNumbers(ScalarColumn<uInt>& col)
     547{
     548  Vector<uInt> nos(col.getColumn());
     549  GenSort<uInt>::sort( nos, Sort::Ascending,
     550                       Sort::QuickSort|Sort::NoDuplicates );
     551  std::vector<uint> stlout;
     552  nos.tovector(stlout);
     553  return stlout;
    542554}
    543555
     
    981993}
    982994
    983 void asap::Scantable::addFit( const STFitEntry & fit, int row )
     995void Scantable::addFit( const STFitEntry & fit, int row )
    984996{
    985997  cout << mfitidCol_(uInt(row)) << endl;
Note: See TracChangeset for help on using the changeset viewer.