Changeset 2421
- Timestamp:
- 03/04/12 01:46:33 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapgrid.py
r2420 r2421 105 105 numerical value and unit, e.g. '0.5arcmin', or numerical value. 106 106 If those values are specified as numerical value, their units 107 will be assumed to 'arc min'. If which of those is not specified,107 will be assumed to 'arcsec'. If which of those is not specified, 108 108 it will be set to the same value as the other. If none of them 109 109 are specified, it will be determined from map extent and number … … 130 130 """ 131 131 if not isinstance( cellx, str ): 132 cellx = '%sarc min'%(cellx)132 cellx = '%sarcsec'%(cellx) 133 133 if not isinstance( celly, str ): 134 celly = '%sarc min'%(celly)134 celly = '%sarcsec'%(celly) 135 135 self.gridder._defineimage( nx, ny, cellx, celly, center ) 136 136 … … 265 265 idx = 0 266 266 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 ): 268 269 idx += 1 269 270 … … 276 277 #print self.blc 277 278 #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] 280 285 self.cellx = abs( self.blc[0] - incrx[0] ) 281 286 self.celly = abs( self.blc[1] - incry[1] )
Note:
See TracChangeset
for help on using the changeset viewer.