- Timestamp:
- 02/20/06 14:44:25 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Scantable.cpp
r805 r837 188 188 } 189 189 190 void asap::Scantable::setupHistoryTable( )190 void Scantable::setupHistoryTable( ) 191 191 { 192 192 TableDesc tdh("", "1", TableDesc::Scratch); … … 293 293 } 294 294 295 int Scantable::n Scan() const {295 int Scantable::nscan() const { 296 296 int n = 0; 297 297 int previous = -1; int current = 0; … … 379 379 } 380 380 381 int asap::Scantable::nbeam( int scanno ) const381 int Scantable::nbeam( int scanno ) const 382 382 { 383 383 if ( scanno < 0 ) { … … 397 397 } 398 398 399 int asap::Scantable::nif( int scanno ) const399 int Scantable::nif( int scanno ) const 400 400 { 401 401 if ( scanno < 0 ) { … … 415 415 } 416 416 417 int asap::Scantable::npol( int scanno ) const417 int Scantable::npol( int scanno ) const 418 418 { 419 419 if ( scanno < 0 ) { … … 433 433 } 434 434 435 int asap::Scantable::nrow( int scanno ) const435 int Scantable::nrow( int scanno ) const 436 436 { 437 437 if ( scanno < 0 ) { 438 return int(table_.nrow()); 438 Block<String> cols(2); 439 cols[0] = "SCANNO"; 440 cols[1] = "CYCLENO"; 441 TableIterator it(table_, cols); 442 int n = 0; 443 while ( !it.pastEnd() ) { 444 ++n; 445 } 446 return n; 439 447 } else { 440 448 // take the first POLNO,IFNO,CYCLENO as nbeam shouldn't vary with these … … 449 457 450 458 451 int asap::Scantable::nchan( int scanno, int ifno ) const452 { 453 if ( scanno < 0 &&ifno < 0 ) {459 int Scantable::nchan( int scanno, int ifno ) const 460 { 461 if ( scanno < 0 || ifno < 0 ) { 454 462 Int n; 455 463 table_.keywordSet().get("nChan",n); … … 463 471 && table_.col("CYCLENO") == 0 ); 464 472 ROArrayColumn<Float> v(tab, "SPECTRA"); 465 cout << v.shape(0) << endl; 466 return 0; 473 return v(0).nelements(); 467 474 } 468 475 return 0; … … 614 621 } 615 622 616 std::string asap::Scantable::summary( bool verbose )623 std::string Scantable::summary( bool verbose ) 617 624 { 618 625 // Format header info
Note:
See TracChangeset
for help on using the changeset viewer.