- Timestamp:
- 04/20/06 14:41:10 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r1010 r1024 598 598 Parameters: 599 599 [min,max],[min2,max2],... 600 Pairs of start/end points specifying the regions600 Pairs of start/end points (inclusive)specifying the regions 601 601 to be masked 602 602 invert: optional argument. If specified as True, … … 608 608 Example: 609 609 scan.set_unit('channel') 610 611 610 a) 612 msk = scan. set_mask([400,500],[800,900])611 msk = scan.create_mask([400,500],[800,900]) 613 612 # masks everything outside 400 and 500 614 613 # and 800 and 900 in the unit 'channel' 615 614 616 615 b) 617 msk = scan. set_mask([400,500],[800,900], invert=True)616 msk = scan.create_mask([400,500],[800,900], invert=True) 618 617 # masks the regions between 400 and 500 619 618 # and 800 and 900 in the unit 'channel' 620 619 c) 620 mask only channel 400 621 msk = scan.create_mask([400,400]) 621 622 """ 622 623 row = 0 … … 641 642 raise TypeError("A window needs to be defined as [min,max]") 642 643 for i in range(n): 643 if data[i] >= window[0] and data[i] < window[1]:644 if data[i] >= window[0] and data[i] <= window[1]: 644 645 msk[i] = 1 645 646 if kwargs.has_key('invert'):
Note:
See TracChangeset
for help on using the changeset viewer.