- Timestamp:
- 12/22/11 19:48:03 (13 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STGrid.cpp
r2385 r2386 279 279 os << " center = " << center_ << endl ; 280 280 os << " weighting = " << wtype_ << endl ; 281 os << " convfunc = " << convType_ << " with support " << convSupport_ << endl ;281 os << " convfunc = " << convType_ << " with support " << convSupport_ << endl ; 282 282 os << "----------" << LogIO::POST ; 283 283 os << LogIO::NORMAL ; … … 354 354 polMap[0] = ipol ; 355 355 356 os << "start pol " << ipol << LogIO::POST ;356 os << "start pol " << ipol << LogIO::POST ; 357 357 358 358 while( !pastEnd() ) { … … 412 412 413 413 } 414 415 os << "end pol " << ipol << LogIO::POST ; 414 416 415 417 nprocessed_ = 0 ; … … 552 554 void STGrid::initPol( Int ipol ) 553 555 { 554 if ( npol_ == 1 ) 556 LogIO os( LogOrigin("STGrid","initPol",WHERE) ) ; 557 if ( npolOrg_ == 1 ) { 558 os << "single polarization data." << LogIO::POST ; 555 559 ptab_ = tab_ ; 560 } 556 561 else 557 562 ptab_ = tab_( tab_.col("POLNO") == (uInt)ipol ) ; … … 707 712 void STGrid::selectData() 708 713 { 714 LogIO os( LogOrigin("STGrid","selectData",WHERE) ) ; 709 715 Int ifno = ifno_ ; 710 716 Table taborg( infile_ ) ; 711 717 if ( ifno == -1 ) { 712 LogIO os( LogOrigin("STGrid","selectData",WHERE) ) ;713 // os << LogIO::SEVERE714 // << "Please set IFNO before actual gridding"715 // << LogIO::EXCEPTION ;716 718 ROScalarColumn<uInt> ifnoCol( taborg, "IFNO" ) ; 717 719 ifno = ifnoCol( 0 ) ; … … 719 721 << "IFNO is not given. Using default IFNO: " << ifno << LogIO::POST ; 720 722 } 721 // tab = taborg( taborg.col("IFNO") == ifno ) ;722 723 TableExprNode node ; 723 node = taborg.col("IFNO") == ifno ; 724 if ( isMultiIF( taborg ) ) { 725 os << "apply selection on IFNO" << LogIO::POST ; 726 node = taborg.col("IFNO") == ifno ; 727 } 724 728 if ( scanlist_.size() > 0 ) { 729 os << "apply selection on SCANNO" << LogIO::POST ; 725 730 node = node && taborg.col("SCANNO").in( scanlist_ ) ; 726 731 } 727 tab_ = taborg( node ) ; 732 if ( node.isNull() ) { 733 tab_ = taborg ; 734 } 735 else { 736 tab_ = taborg( node ) ; 737 } 728 738 if ( tab_.nrow() == 0 ) { 729 LogIO os( LogOrigin("STGrid","selectData",WHERE) ) ;730 739 os << LogIO::SEVERE 731 740 << "No corresponding rows for given selection: IFNO " << ifno ; … … 734 743 os << LogIO::EXCEPTION ; 735 744 } 736 //attach( tab_ ) ; 745 } 746 747 Bool STGrid::isMultiIF( Table &tab ) 748 { 749 ROScalarColumn<uInt> ifnoCol( tab, "IFNO" ) ; 750 Vector<uInt> ifnos = ifnoCol.getColumn() ; 751 return anyNE( ifnos, ifnos[0] ) ; 737 752 } 738 753 … … 874 889 875 890 RefRows rows( nprocessed_, nprocessed_+nrow-1, 1 ) ; 876 os<<LogIO::DEBUGGING<<"nprocessed_="<<nprocessed_<<": rows.nrows()="<<rows.nrows()<<LogIO::POST ;891 //os<<LogIO::DEBUGGING<<"nprocessed_="<<nprocessed_<<": rows.nrows()="<<rows.nrows()<<LogIO::POST ; 877 892 spectraCol_.getColumnCells( rows, spectra ) ; 878 893 flagtraCol_.getColumnCells( rows, flagtra ) ; … … 904 919 //os << pols << LogIO::POST ; 905 920 Vector<uInt> pollistOrg ; 906 uInt npolOrg= 0 ;921 npolOrg_ = 0 ; 907 922 uInt polno ; 908 923 for ( uInt i = 0 ; i < polnoCol.nrow() ; i++ ) { … … 910 925 polno = pols( i ) ; 911 926 if ( allNE( pollistOrg, polno ) ) { 912 pollistOrg.resize( npolOrg +1, True ) ;913 pollistOrg[npolOrg ] = polno ;914 npolOrg ++ ;927 pollistOrg.resize( npolOrg_+1, True ) ; 928 pollistOrg[npolOrg_] = polno ; 929 npolOrg_++ ; 915 930 } 916 931 } … … 933 948 os << LogIO::SEVERE << "Empty pollist" << LogIO::EXCEPTION ; 934 949 } 935 nrow_ = tab_.nrow() / npolOrg ;950 nrow_ = tab_.nrow() / npolOrg_ ; 936 951 ROArrayColumn<uChar> tmpCol( tab_, "FLAGTRA" ) ; 937 952 nchan_ = tmpCol( 0 ).nelements() ; -
trunk/src/STGrid.h
r2384 r2386 153 153 154 154 void initPol( Int ipol ) ; 155 Bool isMultiIF( Table &tab ) ; 155 156 156 157 … … 160 161 Int ny_ ; 161 162 Int npol_ ; 163 Int npolOrg_ ; 162 164 Int nchan_ ; 163 165 Int nrow_ ;
Note:
See TracChangeset
for help on using the changeset viewer.