Changeset 2385 for trunk/src


Ignore:
Timestamp:
12/22/11 19:05:30 (13 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-2816

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Bug fix on call_ggridsd


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STGrid.cpp

    r2384 r2385  
    197197  Float *wgrid_p = gwgt.getStorage( deleteWgtG ) ;
    198198  Float *conv_p = convFunc.getStorage( deleteConv ) ;
     199
     200  // pass copy of irow to ggridsd since it will be modified in theroutine
     201  Int irowCopy = irow ;
    199202     
    200203  // call ggridsd
     
    208211           wgt_p,
    209212           &nrow,
    210            &irow,
     213           &irowCopy,
    211214           grid_p,
    212215           wgrid_p,
     
    244247{
    245248  LogIO os( LogOrigin("STGrid", "grid", WHERE) ) ;
     249  double t0,t1 ;
    246250
    247251  // data selection
     252  t0 = mathutil::gettimeofday_sec() ;
    248253  selectData() ;
     254  t1 = mathutil::gettimeofday_sec() ;
     255  os << "selectData: elapsed time is " << t1-t0 << " sec." << LogIO::POST ;
     256
    249257  setupArray() ;
    250258
     
    287295  // TODO: nchunk_ must be determined from nchan_, npol_, and (nx_,ny_)
    288296  //       by considering data size to be allocated for ggridsd input/output
    289   nchunk_ = 100 ;
     297  nchunk_ = 400 ;
    290298  Bool b = nchunk_ >= nrow_ ;
    291299  nchunk_ = min( nchunk_, nrow_ ) ;
     
    369377      t0 = mathutil::gettimeofday_sec() ;
    370378      Int nrow = getDataChunk( spectra, direction, flagtra, rflag, weight ) ;
    371       //os << "nrow = " << nrow << LogIO::POST ;
    372379      t1 = mathutil::gettimeofday_sec() ;
    373380      eGetData += t1-t0 ;
     
    498505    toPixel( direction, xypos ) ; 
    499506    t1 = mathutil::gettimeofday_sec() ;
    500     //os << "xypos=" << xypos << LogIO::POST ;
    501     os << "toPixel: elapsed time is " << t1-t0 << " sec." << LogIO::POST ;
     507    eToPixel += t1-t0 ;
    502508   
    503509    // call ggridsd
     
    546552void STGrid::initPol( Int ipol )
    547553{
    548   ptab_ = tab_( tab_.col("POLNO") == (uInt)ipol ) ;
     554  if ( npol_ == 1 )
     555    ptab_ = tab_ ;
     556  else
     557    ptab_ = tab_( tab_.col("POLNO") == (uInt)ipol ) ;
    549558
    550559  attach( ptab_ ) ;
     
    701710  Table taborg( infile_ ) ;
    702711  if ( ifno == -1 ) {
    703     LogIO os( LogOrigin("STGrid","selectData",WHERE) ) ;
     712    LogIO os( LogOrigin("STGrid","selectData",WHERE) ) ;   
    704713//     os << LogIO::SEVERE
    705714//        << "Please set IFNO before actual gridding"
     
    819828                          Array<Float> &weight )
    820829{
     830  LogIO os( LogOrigin("STGrid","getDataChunk",WHERE) ) ;
    821831  Int nrow = getDataChunk( spectraF_, direction, flagtraUC_, rflagUI_, weight ) ;
    822832  if ( nrow < nchunk_ ) {
     
    864874
    865875  RefRows rows( nprocessed_, nprocessed_+nrow-1, 1 ) ;
    866   os << "rows.nrows()=" << rows.nrows() << LogIO::POST ;
     876  os<<LogIO::DEBUGGING<<"nprocessed_="<<nprocessed_<<": rows.nrows()="<<rows.nrows()<<LogIO::POST ;
    867877  spectraCol_.getColumnCells( rows, spectra ) ;
    868878  flagtraCol_.getColumnCells( rows, flagtra ) ;
     
    875885  else
    876886    tsys = tsysTemp[0] ;
    877  
     887
    878888  double t0,t1 ;
    879889  t0 = mathutil::gettimeofday_sec() ;
Note: See TracChangeset for help on using the changeset viewer.