Changeset 1545
- Timestamp:
- 03/27/09 15:52:54 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r1536 r1545 784 784 and args or args[0] 785 785 for window in ws: 786 if (len(window) != 2 or window[0] > window[1] ): 787 raise TypeError("A window needs to be defined as [min, max]") 786 if len(window) != 2: 787 raise ValueError("A window needs to be defined as [start, end]") 788 if window[0] > window[1]: 789 tmp = window[0] 790 window[0] = window[1] 791 window[1] = tmp 788 792 for i in range(n): 789 793 if data[i] >= window[0] and data[i] <= window[1]:
Note:
See TracChangeset
for help on using the changeset viewer.