Changeset 2630 for trunk/src


Ignore:
Timestamp:
08/07/12 18:18:26 (12 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: test_sdgrid

Put in Release Notes: No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Minor speedup


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STGrid.cpp

    r2629 r2630  
    10841084//   os << "xmin=" << xmin << LogIO::POST ;
    10851085//   os << "center_=" << center_ << LogIO::POST ;
    1086 
     1086  decCorr_ = 1.0 / cos( center_[1] ) ;
    10871087
    10881088  nx_ = nx ;
     
    11431143  cellx_ = qcellx.getValue( "rad" ) ;
    11441144  // DEC correction
    1145   cellx_ /= cos( center_[1] ) ;
     1145  cellx_ *= decCorr_ ;
    11461146  celly_ = qcelly.getValue( "rad" ) ;
    11471147  //os << "cellx_=" << cellx_ << ", celly_=" << celly_ << ", cos("<<center_(1)<<")=" << cos(center_(1)) << LogIO::POST ;
     
    15411541  Double *wp_p = p_p ;
    15421542  for ( uInt i = 0 ; i < nrow ; i++ ) {
    1543     *wp_p = pixc[0] + ( *ww_p - center_[0] ) / cos( center_[1] ) / cellx_ ;
     1543    *wp_p = pixc[0] + ( *ww_p - center_[0] ) * decCorr_ / cellx_ ;
    15441544    wp_p++ ;
    15451545    ww_p++ ;
Note: See TracChangeset for help on using the changeset viewer.