- Timestamp:
- 11/25/13 16:47:38 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r2844 r2867 1654 1654 maskstring = str(valid_ifs)[1:-1] 1655 1655 ## split each selection "IF range[:CHAN range]" 1656 sellist = maskstring.split(',') 1656 # split maskstring by "<spaces>,<spaces>" 1657 comma_sep = re.compile('\s*,\s*') 1658 sellist = comma_sep.split(maskstring) 1659 # separator by "<spaces>:<spaces>" 1660 collon_sep = re.compile('\s*:\s*') 1657 1661 for currselstr in sellist: 1658 selset = c urrselstr.split(':')1662 selset = collon_sep.split(currselstr) 1659 1663 # spw and mask string (may include ~, < or >) 1660 1664 spwmasklist = self._parse_selection(selset[0], typestr='integer', … … 1796 1800 maxidx = max(idx) 1797 1801 del idx 1798 sellist = selexpr.split(',') 1802 # split selexpr by "<spaces>,<spaces>" 1803 comma_sep = re.compile('\s*,\s*') 1804 sellist = comma_sep.split(selexpr) 1799 1805 idxlist = [] 1800 1806 for currselstr in sellist: … … 1829 1835 --> returns [[0.,2.5],[5.0,7.0],[9.,9.]] 1830 1836 """ 1831 selgroups = selstr.split(';') 1837 # split selstr by '<spaces>;<spaces>' 1838 semi_sep = re.compile('\s*;\s*') 1839 selgroups = semi_sep.split(selstr) 1832 1840 sellists = [] 1833 1841 if typestr.lower().startswith('int'): … … 1838 1846 1839 1847 for currsel in selgroups: 1848 if currsel.strip() == '*' or len(currsel.strip()) == 0: 1849 minsel = minval 1850 maxsel = maxval 1840 1851 if currsel.find('~') > 0: 1841 1852 # val0 <= x <= val1 1842 1853 minsel = formatfunc(currsel.split('~')[0].strip()) 1843 maxsel = formatfunc(currsel.split('~')[1].strip()) 1854 maxsel = formatfunc(currsel.split('~')[1].strip()) 1844 1855 elif currsel.strip().find('<=') > -1: 1845 1856 bound = currsel.split('<=')
Note:
See TracChangeset
for help on using the changeset viewer.