Changeset 2363
- Timestamp:
- 12/07/11 17:05:24 (13 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapgrid.py
r2362 r2363 22 22 self.gridder._defineimage( nx, ny, cellx, celly, center ) 23 23 24 def setOption( self, convType='box', convSupport=-1 ):25 self.gridder._setoption( convType, convSupport)24 def setOption( self, convType='box', width=-1 ): 25 self.gridder._setoption( convType, width ) 26 26 27 27 def setWeight( self, weightType='uniform' ): -
trunk/src/STGrid.cpp
r2362 r2363 623 623 { 624 624 convFunc = 0.0 ; 625 for ( Int i = 0 ; i < convSampling_*convSupport_ ; i++ ) { 626 Double hwhm = convSampling_ * convSupport_ * 0.25 ; 625 // HWHM of the Gaussian is convSupport_ / 4 626 // To take into account Gaussian tail, kernel cutoff is set to 4 * HWHM 627 Int len = convSampling_ * convSupport_ ; 628 Double hwhm = len * 0.25 ; 629 for ( Int i = 0 ; i < len ; i++ ) { 627 630 Double val = Double(i) / hwhm ; 628 631 convFunc(i) = exp( -log(2)*val*val ) ; … … 653 656 } 654 657 else if ( convType_ == "GAUSS" ) { 658 // to take into account Gaussian tail 655 659 if ( convSupport_ < 0 ) 656 convSupport_ = 3 ; 660 convSupport_ = 12 ; // 3 * 4 661 else { 662 convSupport_ = userSupport_ * 4 ; 663 } 657 664 Int convSize = convSampling_ * ( 2 * convSupport_ + 2 ) ; 658 665 convFunc.resize( convSize ) ;
Note:
See TracChangeset
for help on using the changeset viewer.