- Timestamp:
- 08/04/06 12:06:38 (18 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Scantable.cpp
r1068 r1111 134 134 table_.markForDelete(); 135 135 } 136 136 /// @todo reindex SCANNO, recompute nbeam, nif, npol 137 137 if ( clear ) copySubtables(other); 138 138 attachSubtables(); … … 338 338 339 339 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 }346 340 347 341 std::string Scantable::formatSec(Double x) const … … 418 412 String inname(filename); 419 413 Path path(inname); 414 /// @todo reindex SCANNO, recompute nbeam, nif, npol 420 415 inname = path.expandedName(); 421 416 table_.deepCopy(inname, Table::New); … … 532 527 } 533 528 529 int 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 534 536 int Scantable::getChannels(int whichrow) const 535 537 { … … 540 542 { 541 543 return beamCol_(whichrow); 544 } 545 546 std::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; 542 554 } 543 555 … … 981 993 } 982 994 983 void asap::Scantable::addFit( const STFitEntry & fit, int row )995 void Scantable::addFit( const STFitEntry & fit, int row ) 984 996 { 985 997 cout << mfitidCol_(uInt(row)) << endl; -
trunk/src/Scantable.h
r1104 r1111 250 250 std::string getPolType() const; 251 251 252 253 /** 254 * Get the number of integartion cycles 255 * @param scanno the scan number to get the number of rows for. 256 * If scanno<0 the number is retrieved from the header. 257 * @return the number of rows (for the specified scanno) 258 */ 259 int nrow(int scanno=-1) const; 260 261 int getBeam(int whichrow) const; 262 std::vector<uint> getBeamNos() { return getNumbers(beamCol_); } 263 264 int getIF(int whichrow) const; 265 std::vector<uint> getIFNos() { return getNumbers(ifCol_); } 266 267 int getPol(int whichrow) const; 268 std::vector<uint> getPolNos() { return getNumbers(polCol_); } 269 270 std::vector<uint> getScanNos() { return getNumbers(scanCol_); } 271 int getScan(int whichrow) const { return scanCol_(whichrow); } 272 252 273 /** 253 274 * Get the number of channels in the data or a specific IF. This currently … … 258 279 */ 259 280 int nchan(int ifno=-1) const; 260 261 /** 262 * Get the number of integartion cycles 263 * @param scanno the scan number to get the number of rows for. 264 * If scanno<0 the number is retrieved from the header. 265 * @return the number of rows (for the specified scanno) 266 */ 267 int nrow(int scanno=-1) const; 281 int getChannels(int whichrow) const; 268 282 269 283 int ncycle(int scanno=-1) const; 270 271 int getBeam(int whichrow) const;272 int getIF(int whichrow) const;273 int getPol(int whichrow) const;274 284 int getCycle(int whichrow) const { return cycleCol_(whichrow); } 275 int getScan(int whichrow) const { return scanCol_(whichrow); }276 int getChannels(int whichrow) const;277 285 278 286 double getInterval(int whichrow) const … … 402 410 */ 403 411 int rowToScanIndex(int therow); 412 413 std::vector<uint> getNumbers(casa::ScalarColumn<casa::uInt>& col); 404 414 405 415 static const casa::uInt version_ = 2; -
trunk/src/ScantableWrapper.h
r1077 r1111 116 116 { table_->setSpectrum(spectrum, whichrow); } 117 117 118 std::vector<uint> getIFNos() { return table_->getIFNos(); } 118 119 int getIF(int whichrow) const {return table_->getIF(whichrow);} 120 std::vector<uint> getBeamNos() { return table_->getBeamNos(); } 119 121 int getBeam(int whichrow) const {return table_->getBeam(whichrow);} 122 std::vector<uint> getPolNos() { return table_->getPolNos(); } 120 123 int getPol(int whichrow) const {return table_->getPol(whichrow);} 121 124 int getCycle(int whichrow) const {return table_->getCycle(whichrow);} 125 std::vector<uint> getScanNos() { return table_->getScanNos(); } 122 126 int getScan(int whichrow) const {return table_->getScan(whichrow);} 123 127 -
trunk/src/python_Scantable.cpp
r1077 r1111 50 50 .def("_assign", &ScantableWrapper::assign) 51 51 .def("getif", &ScantableWrapper::getIF) 52 .def("getifnos", &ScantableWrapper::getIFNos) 52 53 .def("getbeam", &ScantableWrapper::getBeam) 54 .def("getbeamnos", &ScantableWrapper::getBeamNos) 53 55 .def("getpol", &ScantableWrapper::getPol) 56 .def("getpolnos", &ScantableWrapper::getPolNos) 54 57 .def("getscan", &ScantableWrapper::getScan) 58 .def("getscannos", &ScantableWrapper::getScanNos) 55 59 .def("getcycle", &ScantableWrapper::getCycle) 56 60 .def("nif", &ScantableWrapper::nif,
Note:
See TracChangeset
for help on using the changeset viewer.