Changeset 2679 for trunk


Ignore:
Timestamp:
10/23/12 19:08:00 (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...

Updated description for asapgrid.setFunc().


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapgrid.py

    r2678 r2679  
    2525                      center='J2000 10h10m10s -5d05m05s' )
    2626       # set convolution function
    27        g.setFunc( func='sf', width=3 )
     27       g.setFunc( func='sf', convsupport=3 )
    2828       # enable min/max clipping
    2929       g.enableClip()
     
    138138        """
    139139        Set convolution function. Possible options are 'box' (Box-car,
    140         default), 'sf' (prolate spheroidal), and 'gauss' (Gaussian).
    141         Width of convolution function can be set using width parameter.
    142         By default (-1), width is automatically set depending on each
    143         convolution function. Default values for width are:
     140        default), 'sf' (prolate spheroidal), 'gauss' (Gaussian), and
     141        'gjinc' (Gaussian * Jinc).
     142        Width of convolution function can be set using several parameters.
     143        For 'box' and 'sf', we have one parameter, convsupport, that
     144        specifies a cut-off radius of the convlolution function. By default
     145        (-1), convsupport is automatically set depending on each convolution
     146        function. Default values for convsupport are:
    144147
    145148           'box': 1 pixel
    146149           'sf': 3 pixels
    147            'gauss': 1 pixel (width is used as HWHM)
    148 
    149         func -- Function type ('box', 'sf', 'gauss').
    150         width -- Width of convolution function. Default (-1) is to
    151                  choose pre-defined value for each convolution function.
     150
     151        For 'gauss', we have two parameters for convolution function,
     152        truncate and gwidth. The truncate is similar to convsupport
     153        except that truncate allows to specify its value as float or
     154        string consisting of numeric and unit (e.g. '10arcsec' or
     155        '3pixel'). Available units are angular units ('arcsec', 'arcmin',
     156        'deg', etc.) and 'pixel'. Default unit is 'pixel' so that if
     157        you specify numerical value or string without unit to gwidth,
     158        the value will be interpreted as 'pixel'. gwidth is an HWHM of
     159        gaussian. It also allows string value. Interpretation of the
     160        value for gwidth is same as truncate. Default value for 'gauss'
     161        is
     162
     163              gwidth: '-1' ---> sqrt(log(2.0)) pixel
     164            truncate: '-1' ---> 3*gwidth pixel
     165
     166        For 'gjinc', there is an additional parameter jwidth that
     167        specifies a width of the jinc function whose functional form is
     168
     169            jinc(x) = J_1(pi*x/jwidth) / (pi*x/jwidth)
     170
     171        Default values for 'gjinc' is
     172
     173              gwidth: '-1' ---> 2.52*sqrt(log(2.0)) pixel
     174              jwidth: '-1' ---> 1.55
     175            truncate: '-1' ---> automatically truncate at first null
     176
     177        Default values for gwidth and jwidth are taken from Mangum et al.
     178        (2007).
     179
     180        func -- Function type ('box', 'sf', 'gauss', 'gjinc').
     181        convsupport -- Width of convolution function. Default (-1) is
     182                       to choose pre-defined value for each convolution
     183                       function. Effective only for 'box' and 'sf'.
     184        truncate -- Truncation radius of the convolution function.
     185                    Acceptable value is an integer or a float in units of
     186                    pixel, or a string consisting of numeric plus unit.
     187                    Default unit for the string is 'pixel'. Default (-1)
     188                    is to choose pre-defined value for each convolution
     189                    function. Effective only for 'gauss' and 'gjinc'.
     190        gwidth -- The HWHM of the gaussian. Acceptable value is an integer
     191                  or a float in units of pixel, or a string consisting of
     192                  numeric plus unit. Default unit for the string is 'pixel'.
     193                  Default (-1) is to choose pre-defined value for each
     194                  convolution function. Effective only for 'gauss' and
     195                  'gjinc'.
     196        jwidth -- The width of the jinc function. Acceptable value is an
     197                  integer or a float in units of pixel, or a string
     198                  consisting of numeric plus unit. Default unit for the
     199                  string is 'pixel'. Default (-1) is to choose pre-defined
     200                  value for each convolution function. Effective only for
     201                  'gjinc'.
    152202        """
    153203        self.gridder._setfunc(func,
     
    156206                              gwidth=gwidth,
    157207                              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 )
    173208
    174209    def setWeight( self, weightType='uniform' ):
Note: See TracChangeset for help on using the changeset viewer.