Changeset 981
- Timestamp:
- 04/04/06 11:58:41 (19 years ago)
- Location:
- trunk/python
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapmath.py
r945 r981 41 41 varlist = vars() 42 42 if isinstance(args[0],list): 43 lst = tuple(args[0])43 lst = args[0] 44 44 elif isinstance(args[0],tuple): 45 lst = args[0]45 lst = list(args[0]) 46 46 else: 47 lst = tuple(args)47 lst = list(args) 48 48 49 49 del varlist["kwargs"] 50 50 varlist["args"] = "%d scantables" % len(lst) 51 # need special formatting her for history...51 # need special formatting here for history... 52 52 53 53 from asap._asap import stmath … … 63 63 if scanav: scanav = "SCAN" 64 64 else: scanav = "NONE" 65 s = scantable(stm._average(lst, mask, weight, scanav, align)) 65 alignedlst = [] 66 if align: 67 refepoch = lst[0].get_time(0) 68 for scan in lst: 69 alignedlst.append(scan.freq_align(refepoch,insitu=False)) 70 else: 71 aligendlst = lst 72 s = scantable(stm._average(alignedlst, mask, weight, scanav)) 66 73 s._add_history("average_time",varlist) 67 74 print_log() -
trunk/python/scantable.py
r976 r981 757 757 if mask is None: mask = () 758 758 if scanav: 759 scanav = "SCAN" 760 else: 761 scanav = "NONE" 762 s = scantable(self._math._average((self,), mask, weight.upper(), 763 scanav, align)) 759 scanav = "SCAN" 760 else: 761 scanav = "NONE" 762 scan = (self,) 763 if align: 764 scan = (self.freq_align(insitu=False),) 765 s = scantable(self._math._average(scan, mask, weight.upper(), 766 scanav)) 764 767 s._add_history("average_time",varlist) 765 768 print_log() … … 1446 1449 tbl = r._getdata() 1447 1450 if average: 1448 tbl = self._math._average((tbl,),(),'NONE','SCAN' , False)1451 tbl = self._math._average((tbl,),(),'NONE','SCAN') 1449 1452 #tbl = tbl2 1450 1453 if not first:
Note:
See TracChangeset
for help on using the changeset viewer.