Changeset 1593 for trunk/python
- Timestamp:
- 07/02/09 15:46:52 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r1590 r1593 35 35 if average is None: 36 36 average = rcParams['scantable.autoaverage'] 37 if parallactify is None: 38 parallactify = rcParams['scantable.parallactify'] 37 parallactify = parallactify or rcParams['scantable.parallactify'] 39 38 varlist = vars() 40 39 from asap._asap import stmath … … 107 106 """ 108 107 from os import path 109 if format is None: format =rcParams['scantable.save']108 format = format or rcParams['scantable.save'] 110 109 suffix = '.'+format.lower() 111 110 if name is None or name == "": … … 173 172 try: 174 173 bsel = self.get_selection() 175 sel = selector() 176 sel.set_scans(allscans) 174 sel = selector(scans=allscans) 177 175 self.set_selection(bsel+sel) 178 176 scopy = self._copy() … … 184 182 else: 185 183 raise 186 187 184 188 185 def get_scan(self, scanid=None): … … 256 253 """ 257 254 info = Scantable._summary(self, True) 258 #if verbose is None: verbose = rcParams['scantable.verbosesummary']259 255 if filename is not None: 260 256 if filename is "": … … 356 352 scan.stats(stat='mean', mask=m) 357 353 """ 358 if mask == None: 359 mask = [] 354 mask = mask or [] 360 355 if not self._check_ifs(): 361 356 raise ValueError("Cannot apply mask as the IFs have different " … … 595 590 scan.set_freqframe('BARY') 596 591 """ 597 if frame is None: frame =rcParams['scantable.freqframe']592 frame = frame or rcParams['scantable.freqframe'] 598 593 varlist = vars() 599 594 valid = ['REST', 'TOPO', 'LSRD', 'LSRK', 'BARY', \ … … 664 659 """ 665 660 varlist = vars() 666 if mask is None: 667 mask = [] 661 mask = mask or [] 668 662 try: 669 663 self._flag(mask) … … 822 816 source and IF basis, use scantable.set_selection() before using 823 817 this function. 824 # provide your scantable is call scan818 # provide your scantable is called scan 825 819 selection = selector() 826 820 selection.set_name("ORION*") … … 961 955 """ 962 956 varlist = vars() 963 if weight is None: weight = 'TINT' 964 if mask is None: mask = () 965 if scanav: scanav = "SCAN" 966 else: scanav = "NONE" 957 weight = weight or 'TINT' 958 mask = mask or () 959 scanav = (scanav and 'SCAN') or 'NONE' 967 960 scan = (self, ) 968 961 try: … … 1004 997 self._math._setinsitu(insitu) 1005 998 varlist = vars() 1006 if jyperk is None: jyperk =-1.01007 if d is None: d =-1.01008 if eta is None: eta =-1.0999 jyperk = jyperk or -1.0 1000 d = d or -1.0 1001 eta = eta or -1.0 1009 1002 s = scantable(self._math._convertflux(self, d, eta, jyperk)) 1010 1003 s._add_history("convert_flux", varlist) … … 1056 1049 self._math._setinsitu(insitu) 1057 1050 varlist = vars() 1058 if poly is None: 1059 poly = () 1051 poly = poly or () 1060 1052 from os.path import expandvars 1061 1053 filename = expandvars(filename) 1062 1054 s = scantable(self._math._gainel(self, poly, filename, method)) 1063 1055 s._add_history("gain_el", varlist) 1064 if insitu: self._assign(s) 1065 else: return s 1056 if insitu: 1057 self._assign(s) 1058 else: 1059 return s 1066 1060 1067 1061 @print_log_dec … … 1084 1078 self._math._setinsitu(insitu) 1085 1079 varlist = vars() 1086 if reftime is None: reftime =""1080 reftime = reftime or "" 1087 1081 s = scantable(self._math._freq_align(self, reftime, method)) 1088 1082 s._add_history("freq_align", varlist) … … 1165 1159 """ 1166 1160 varlist = vars() 1167 if mask is None: 1168 mask = () 1161 mask = mask or () 1169 1162 s = scantable(self._math._averagepol(self, mask, weight.upper())) 1170 1163 s._add_history("average_pol", varlist) … … 1183 1176 """ 1184 1177 varlist = vars() 1185 if mask is None: 1186 mask = () 1178 mask = mask or () 1187 1179 s = scantable(self._math._averagebeams(self, mask, weight.upper())) 1188 1180 s._add_history("average_beam", varlist) … … 1592 1584 remove: Output = Toff * (on/off) - Ton 1593 1585 """ 1594 if mask is None: mask =()1586 mask = mask or () 1595 1587 varlist = vars() 1596 1588 on = scantable(self._math._mx_extract(self, 'on'))
Note:
See TracChangeset
for help on using the changeset viewer.