- Timestamp:
- 03/10/11 03:01:49 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/MSFiller.cpp
r2028 r2033 449 449 if ( sdh.poltype == "" ) sdh.poltype = getPolType( corrtype[0] ) ; 450 450 // source information 451 //os_ << "srcId = " << srcId << ", spwId = " << spwId << LogIO::POST ;451 // os_ << "srcId = " << srcId << ", spwId = " << spwId << LogIO::POST ; 452 452 MSSource srctabSel = srctab( srctab.col("SOURCE_ID") == srcId && srctab.col("SPECTRAL_WINDOW_ID") == spwId ) ; 453 453 if ( srctabSel.nrow() == 0 ) { 454 454 srctabSel = srctab( srctab.col("SOURCE_ID") == srcId && srctab.col("SPECTRAL_WINDOW_ID") == -1 ) ; 455 455 } 456 tcolr = tpoolr->construct( srctabSel, "NAME" ) ; 457 String srcName = tcolr->asString( 0 ) ; 458 tpoolr->destroy( tcolr ) ; 456 String srcName( "" ) ; 457 Vector<Double> srcPM( 2, 0.0 ) ; 458 Vector<Double> srcDir( 2, 0.0 ) ; 459 MDirection md ; 460 Int numLines = 0 ; 461 ROArrayColumn<Double> *roArrDCol = 0 ; 462 if ( srctabSel.nrow() > 0 ) { 463 // source name 464 tcolr = tpoolr->construct( srctabSel, "NAME" ) ; 465 srcName = tcolr->asString( 0 ) ; 466 tpoolr->destroy( tcolr ) ; 467 468 // source proper motion 469 roArrDCol = new ROArrayColumn<Double>( srctabSel, "PROPER_MOTION" ) ; 470 srcPM = (*roArrDCol)( 0 ) ; 471 delete roArrDCol ; 472 473 // source direction 474 roArrDCol = new ROArrayColumn<Double>( srctabSel, "DIRECTION" ) ; 475 srcDir = (*roArrDCol)( 0 ) ; 476 delete roArrDCol ; 477 478 // source direction as MDirection object 479 ROScalarMeasColumn<MDirection> *tmpMeasCol = new ROScalarMeasColumn<MDirection>( srctabSel, "DIRECTION" ) ; 480 md = (*tmpMeasCol)( 0 ) ; 481 delete tmpMeasCol ; 482 483 // number of lines 484 tcolr = tpoolr->construct( srctabSel, "NUM_LINES" ) ; 485 Int numLines = tcolr->asInt( 0 ) ; 486 tpoolr->destroy( tcolr ) ; 487 488 } 489 else { 490 md = MDirection( Quantum<Double>(0.0,Unit("rad")), Quantum<Double>(0.0,Unit("rad")) ) ; 491 } 459 492 460 493 // SRCNAME … … 462 495 *strRF = srcName ; 463 496 464 //os_ << "srcName = " << srcName << LogIO::POST ; 465 ROArrayColumn<Double> *roArrDCol = new ROArrayColumn<Double>( srctabSel, "PROPER_MOTION" ) ; 466 Array<Double> srcPM = (*roArrDCol)( 0 ) ; 467 delete roArrDCol ; 497 // os_ << "srcName = " << srcName << LogIO::POST ; 468 498 469 499 // SRCPROPERMOTION … … 472 502 473 503 //os_ << "srcPM = " << srcPM << LogIO::POST ; 474 roArrDCol = new ROArrayColumn<Double>( srctabSel, "DIRECTION" ) ;475 Array<Double> srcDir = (*roArrDCol)( 0 ) ;476 delete roArrDCol ;477 504 478 505 // SRCDIRECTION … … 481 508 482 509 //os_ << "srcDir = " << srcDir << LogIO::POST ; 483 ROScalarMeasColumn<MDirection> *tmpMeasCol = new ROScalarMeasColumn<MDirection>( srctabSel, "DIRECTION" ) ;484 MDirection md = (*tmpMeasCol)( 0 ) ;485 delete tmpMeasCol ;486 510 487 511 // for MOLECULES subtable 488 tcolr = tpoolr->construct( srctabSel, "NUM_LINES" ) ;489 Int numLines = tcolr->asInt( 0 ) ;490 tpoolr->destroy( tcolr ) ;491 512 // os_ << "numLines = " << numLines << LogIO::POST ; 492 513 … … 504 525 } 505 526 } 506 //os_ << "restFreqs = " << restFreqs << LogIO::POST ;527 // os_ << "restFreqs = " << restFreqs << LogIO::POST ; 507 528 if ( srctabSel.tableDesc().isColumn( "TRANSITION" ) ) { 508 529 ROArrayColumn<String> transitionCol( srctabSel, "TRANSITION" ) ; … … 573 594 Double increment = (*sharedQDArrCol)( spwId )( refip ).getValue( "Hz" ) ; 574 595 delete sharedQDArrCol ; 575 //os_ << "nchan = " << nchan << " refchan = " << refchan << "(even=" << even << ") refpix = " << refpix << LogIO::POST ;596 // os_ << "nchan = " << nchan << " refchan = " << refchan << "(even=" << even << ") refpix = " << refpix << LogIO::POST ; 576 597 sharedQDArrCol = new ROArrayQuantColumn<Double>( spwtab, "CHAN_FREQ" ) ; 577 598 Vector< Quantum<Double> > chanFreqs = (*sharedQDArrCol)( spwId ) ; … … 652 673 TableIterator iter5( t4, "STATE_ID" ) ; 653 674 while( !iter5.pastEnd() ) { 654 //time0 = gettimeofday_sec() ;655 //os_ << "start 5th iteration: " << time0 << LogIO::POST ;675 // time0 = gettimeofday_sec() ; 676 // os_ << "start 5th iteration: " << time0 << LogIO::POST ; 656 677 Table t5 = iter5.table() ; 657 678 tcolr = tpoolr->construct( t5, "STATE_ID" ) ; … … 664 685 665 686 Int nrow = t5.nrow() ; 666 //time1 = gettimeofday_sec() ;667 //os_ << "end 5th iteration init: " << time1 << " (" << time1-time0 << "sec)" << LogIO::POST ;687 // time1 = gettimeofday_sec() ; 688 // os_ << "end 5th iteration init: " << time1 << " (" << time1-time0 << "sec)" << LogIO::POST ; 668 689 669 690 uInt cycle = 0 ; … … 882 903 tpoolr->destroy( mFlagRowCol ) ; 883 904 884 //time1 = gettimeofday_sec() ;885 //os_ << "end 5th iteration: " << time1 << " (" << time1-time0 << "sec)" << LogIO::POST ;905 // time1 = gettimeofday_sec() ; 906 // os_ << "end 5th iteration: " << time1 << " (" << time1-time0 << "sec)" << LogIO::POST ; 886 907 887 908 iter5.next() ;
Note:
See TracChangeset
for help on using the changeset viewer.