Changeset 1730 for trunk/python
- Timestamp:
- 04/28/10 21:44:09 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r1725 r1730 417 417 return list(Scantable.get_column_names(self)) 418 418 419 def get_tsys(self ):419 def get_tsys(self, row=-1): 420 420 """ 421 421 Return the System temperatures. … … 423 423 a list of Tsys values for the current selection 424 424 """ 425 425 if row > -1: 426 return self._get_column(self._gettsys, row) 426 427 return self._row_callback(self._gettsys, "Tsys") 428 429 430 def get_weather(self, row=-1): 431 values = self._get_column(self._get_weather, row) 432 if row > -1: 433 return {'temperature': values[0], 434 'pressure': values[1], 'humidity' : values[2], 435 'windspeed' : values[3], 'windaz' : values[4] 436 } 437 else: 438 out = [] 439 for r in values: 440 441 out.append({'temperature': r[0], 442 'pressure': r[1], 'humidity' : r[2], 443 'windspeed' : r[3], 'windaz' : r[4] 444 }) 445 return out 427 446 428 447 def _row_callback(self, callback, label): … … 455 474 return [callback(i) for i in range(self.nrow())] 456 475 else: 457 if 476 if 0 <= row < self.nrow(): 458 477 return callback(row) 459 478 … … 559 578 return self._get_column(self._getdirectionvec, row) 560 579 561 580 @print_log_dec 562 581 def set_unit(self, unit='channel'): 563 582 """
Note:
See TracChangeset
for help on using the changeset viewer.