Changeset 1629 for branches/alma
- Timestamp:
- 09/03/09 20:33:39 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alma/python/scantable.py
r1627 r1629 390 390 return workscan 391 391 392 def stats(self, stat='stddev', mask=None): 392 #def stats(self, stat='stddev', mask=None): 393 def stats(self, stat='stddev', mask=None, form='3.3f'): 393 394 """ 394 395 Determine the specified statistic of the current beam/if/pol … … 400 401 mask: an optional mask specifying where the statistic 401 402 should be determined. 403 form: format string to print statistic values 402 404 Example: 403 405 scan.set_unit('channel') … … 439 441 if rtnabc: 440 442 statvals.append(qx['value']) 441 refstr = '(value: %3.3f' % (qy['value'])+' ['+qy['unit']+'])' 443 #refstr = '(value: %3.3f' % (qy['value'])+' ['+qy['unit']+'])' 444 refstr = ('(value: %'+form) % (qy['value'])+' ['+qy['unit']+'])' 442 445 statunit= '['+qx['unit']+']' 443 446 else: 444 refstr = '(@ %3.3f' % (qx['value'])+' ['+qx['unit']+'])' 447 #refstr = '(@ %3.3f' % (qx['value'])+' ['+qx['unit']+'])' 448 refstr = ('(@ %'+form) % (qx['value'])+' ['+qx['unit']+'])' 445 449 #statunit= ' ['+qy['unit']+']' 446 450 out += 'Scan[%d] (%s) ' % (axis[0], src) … … 449 453 if self.nif(-1) > 1: out += ' IF[%d] ' % (axis[2]) 450 454 if self.npol(-1) > 1: out += ' Pol[%d] ' % (axis[3]) 451 out += '= %3.3f ' % (statvals[i]) +refstr+'\n' 455 #out += '= %3.3f ' % (statvals[i]) +refstr+'\n' 456 out += ('= %'+form) % (statvals[i]) +' '+refstr+'\n' 452 457 out += "--------------------------------------------------\n" 453 458
Note:
See TracChangeset
for help on using the changeset viewer.