Changeset 2543
- Timestamp:
- 05/22/12 11:57:08 (13 years ago)
- Location:
- branches/hpc33/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/hpc33/src/STMath.cpp
r2542 r2543 166 166 // double t2 = 0 ; 167 167 // double t3 = 0 ; 168 // double t4 = 0 ; 169 // double t5 = 0 ; 168 170 // TableIterator iter(baset, cols); 169 171 // int count = 0 ; … … 179 181 // copy the first row of this selection into the new table 180 182 tout.addRow(); 183 // t4 = mathutil::gettimeofday_sec() ; 181 184 //TableCopy::copyRows(tout, subt, outrowCount, 0, 1); 182 TableCopy::copyRows(tout, baset, outrowCount, rows[0], 1); 185 //TableCopy::copyRows(tout, baset, outrowCount, rows[0], 1); 186 // skip to copy SPECTRA, FLAGTRA, and TSYS since those heavy columns are 187 // overwritten in the following process 188 copyRows( tout, baset, outrowCount, rows[0], 1, False, False, False ) ; 189 // t5 += mathutil::gettimeofday_sec() - t4 ; 183 190 // re-index to 0 184 191 if ( avmode != "SCAN" && avmode != "SOURCE" ) { … … 408 415 // cout << "elapsed time for average(): " << t1-t0 << " sec" << endl ; 409 416 // cout << " elapsed time for acc.add(): " << t3 << " sec" << endl ; 417 // cout << " elapsed time for copyRows(): " << t5 << " sec" << endl ; 410 418 411 419 return out; … … 5357 5365 return sp ; 5358 5366 } 5367 5368 void STMath::copyRows( Table &out, 5369 const Table &in, 5370 uInt startout, 5371 uInt startin, 5372 uInt nrow, 5373 Bool copySpectra, 5374 Bool copyFlagtra, 5375 Bool copyTsys ) 5376 { 5377 uInt nexclude = 0 ; 5378 Block<String> excludeColsBlock( 3 ) ; 5379 if ( !copySpectra ) { 5380 excludeColsBlock[nexclude] = "SPECTRA" ; 5381 nexclude++ ; 5382 } 5383 if ( !copyFlagtra ) { 5384 excludeColsBlock[nexclude] = "FLAGTRA" ; 5385 nexclude++ ; 5386 } 5387 if ( !copyTsys ) { 5388 excludeColsBlock[nexclude] = "TSYS" ; 5389 nexclude++ ; 5390 } 5391 // if ( nexclude < 3 ) { 5392 // excludeCols.resize( nexclude, True ) ; 5393 // } 5394 Vector<String> excludeCols( IPosition(1,nexclude), 5395 excludeColsBlock.storage(), 5396 SHARE ) ; 5397 // cout << "excludeCols=" << excludeCols << endl ; 5398 TableRow rowout( out, excludeCols, True ) ; 5399 ROTableRow rowin( in, excludeCols, True ) ; 5400 uInt rin = startin ; 5401 uInt rout = startout ; 5402 for ( uInt i = 0 ; i < nrow ; i++ ) { 5403 rowin.get( rin ) ; 5404 rowout.putMatchingFields( rout, rowin.record() ) ; 5405 rin++ ; 5406 rout++ ; 5407 } 5408 } -
branches/hpc33/src/STMath.h
r2532 r2543 439 439 int index ) ; 440 440 double getMJD( string strtime ) ; 441 void copyRows( casa::Table &out, 442 const casa::Table &in, 443 casa::uInt startout, 444 casa::uInt startin, 445 casa::uInt nrow, 446 casa::Bool copySpectra=true, 447 casa::Bool copyFlagtra=true, 448 casa::Bool copyTsys=true ) ; 441 449 442 450 bool insitu_;
Note:
See TracChangeset
for help on using the changeset viewer.