Changeset 2678 for trunk/python


Ignore:
Timestamp:
10/23/12 13:59:36 (12 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-4429

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...

Added new parameter to asapgrid.setFunc(). Also, default behavior
of STGrid is changed.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapgrid.py

    r2671 r2678  
    135135        self.gridder._defineimage( nx, ny, cellx, celly, center )
    136136
    137     def setFunc( self, func='box', width=-1, gwidth="", jwidth="" ):
     137    def setFunc( self, func='box', convsupport=-1, truncate="-1", gwidth="-1", jwidth="-1" ):
    138138        """
    139139        Set convolution function. Possible options are 'box' (Box-car,
     
    151151                 choose pre-defined value for each convolution function.
    152152        """
    153         fname = func.upper()
    154         if fname == 'GAUSS' or fname == 'GJINC':
    155             gw = str(gwidth)
    156             jw = str(jwidth)
    157             w = str(width)
    158             if w[0] == '-': w = ''
    159             #self.gridder._setfunc(fname, -1, w, gw, jw)
    160             self.gridder._setfunc(fname,convsupport=-1,gwidth=gw,jwidth=jw,truncate=w)
    161         else:
    162             self.gridder._setfunc( func, convsupport=width )
     153        self.gridder._setfunc(func,
     154                              convsupport=convsupport,
     155                              truncate=truncate,
     156                              gwidth=gwidth,
     157                              jwidth=jwidth)
     158##         fname = func.upper()
     159##         if fname == 'GAUSS' or fname == 'GJINC':
     160##             gw = str(gwidth)
     161##             jw = str(jwidth)
     162##             w = str(width)
     163##             #if len(w) > 0 and w[0] == '-':
     164##             #    w = ''
     165##             #self.gridder._setfunc(fname, -1, w, gw, jw)
     166##             self.gridder._setfunc(fname,convsupport=-1,gwidth=gw,jwidth=jw,truncate=w)
     167##         else:
     168##             #if isinstance(width,str):
     169##             #    w = -1
     170##             #else:
     171##             #    w = width
     172##             self.gridder._setfunc( func, convsupport=width )
    163173
    164174    def setWeight( self, weightType='uniform' ):
Note: See TracChangeset for help on using the changeset viewer.