Changeset 2932 for trunk/python
- Timestamp:
- 04/21/14 16:36:29 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r2930 r2932 2145 2145 2146 2146 for spw in res.keys(): 2147 if spw not in valid_ifs: 2147 if spw in valid_ifs: 2148 # remove duplicated chennal ranges 2149 for i in reversed(xrange(len(res[spw]))): 2150 for j in xrange(i): 2151 if ((res[spw][i][0]-res[spw][j][1])*(res[spw][i][1]-res[spw][j][0]) <= 0): 2152 res[spw][j][0] = min(res[spw][i][0], res[spw][j][0]) 2153 res[spw][j][1] = max(res[spw][i][1], res[spw][j][1]) 2154 res[spw].pop(i) 2155 break 2156 else: 2148 2157 del res[spw] 2149 2158 … … 2374 2383 for thelist in currlist: 2375 2384 idxlist += range(thelist[0],thelist[1]+1) 2385 # remove duplicated elements after first ones 2386 for i in reversed(xrange(len(idxlist))): 2387 if idxlist.index(idxlist[i]) < i: 2388 idxlist.pop(i) 2376 2389 msg = "Selected %s: %s" % (mode.upper()+"NO", str(idxlist)) 2377 2390 asaplog.push(msg)
Note:
See TracChangeset
for help on using the changeset viewer.