- Timestamp:
- 07/06/06 11:21:41 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r1070 r1073 52 52 # crude check if asap table 53 53 if os.path.exists(filename+'/table.info'): 54 Scantable.__init__(self, filename, "memory")54 Scantable.__init__(self, filename, rcParams['scantable.storage']=='disk') 55 55 if unit is not None: 56 56 self.set_fluxunit(unit) … … 790 790 return s 791 791 792 def average_channel(self, mode="MEDIAN", align=False):792 def average_channel(self, mode="MEDIAN", scanav=False, align=False): 793 793 """ 794 794 Return the (median) average of a scan. 795 795 Note: 796 796 in channels only - align if necessary 797 the m deian Tsys is computed.797 the median Tsys is computed. 798 798 Parameters: 799 799 one scan or comma separated scans 800 800 mode: type of average, default "MEDIAN" 801 scanav: True averages each scan separately 802 False (default) averages all scans together, 801 803 align: align the spectra in velocity before averaging. It takes 802 804 the time of the first spectrum as reference time. 803 805 Example: 804 # m deian average the scan806 # median average the scan 805 807 newscan = scan.average_channel() 806 808 """ 807 809 varlist = vars() 808 810 if mode is None: mode = 'MEDIAN' 811 scanav = "NONE" 812 if scanav: scanav = "SCAN" 809 813 scan = self 810 814 try: 811 815 if align: 812 816 scan = self.freq_align(insitu=False) 813 s = scantable(self._math._averagechannel(scan, mode ))817 s = scantable(self._math._averagechannel(scan, mode, scanav)) 814 818 except RuntimeError,msg: 815 819 if rcParams['verbose']: … … 1523 1527 if average: 1524 1528 asaplog.push('Auto averaging integrations') 1529 stype = int(rcParams['scantable.storage'] == 'disk') 1525 1530 for name in fullnames: 1526 r = stfiller() 1531 tbl = Scantable(stype) 1532 print stype 1533 r = stfiller(tbl) 1527 1534 msg = "Importing %s..." % (name) 1528 1535 asaplog.push(msg,False) … … 1530 1537 r._open(name,-1,-1) 1531 1538 r._read() 1532 tbl = r._getdata()1539 #tbl = r._getdata() 1533 1540 if average: 1534 1541 tbl = self._math._average((tbl,),(),'NONE','SCAN')
Note:
See TracChangeset
for help on using the changeset viewer.