Changeset 2421 for trunk


Ignore:
Timestamp:
03/04/12 01:46:33 (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...

Support to plot only 1 pixel result.

Default unit for cell size is changed to 'arcsec' (was 'arcmin').

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapgrid.py

    r2420 r2421  
    105105        numerical value and unit, e.g. '0.5arcmin', or numerical value.
    106106        If those values are specified as numerical value, their units
    107         will be assumed to 'arcmin'. If which of those is not specified,
     107        will be assumed to 'arcsec'. If which of those is not specified,
    108108        it will be set to the same value as the other. If none of them
    109109        are specified, it will be determined from map extent and number
     
    130130        """
    131131        if not isinstance( cellx, str ):
    132             cellx = '%sarcmin'%(cellx)
     132            cellx = '%sarcsec'%(cellx)
    133133        if not isinstance( celly, str ):
    134             celly = '%sarcmin'%(celly)
     134            celly = '%sarcsec'%(celly)
    135135        self.gridder._defineimage( nx, ny, cellx, celly, center )
    136136
     
    265265        idx = 0
    266266        d0 = s.get_direction( 0 ).split()[-1]
    267         while ( s.get_direction(self.npol*idx).split()[-1] == d0 ): 
     267        while ( s.get_direction(self.npol*idx) is not None \
     268                and s.get_direction(self.npol*idx).split()[-1] == d0 ):
    268269            idx += 1
    269270       
     
    276277        #print self.blc
    277278        #print self.trc
    278         incrx = s.get_directionval( self.npol )
    279         incry = s.get_directionval( self.nx*self.npol )
     279        if nrow > 1:
     280            incrx = s.get_directionval( self.npol )
     281            incry = s.get_directionval( self.nx*self.npol )
     282        else:
     283            incrx = [0.0,0.0]
     284            incry = [0.0,0.0]
    280285        self.cellx = abs( self.blc[0] - incrx[0] )
    281286        self.celly = abs( self.blc[1] - incry[1] )
Note: See TracChangeset for help on using the changeset viewer.