- Timestamp:
- 04/25/14 14:01:44 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r2935 r2936 1835 1835 '0~1:2~6,8' = channels 2 to 6 in spws 0,1, and 1836 1836 all channels in spw8 1837 '1.3~1.5GHz' = all spws that fall in or have at1838 least some overwrap with frequency1839 range between1.3GHz and 1.5GHz.1840 '1.3~1.5GHz:1.3~1.5GHz' = channels thatfall1837 '1.3~1.5GHz' = all spws whose central frequency 1838 falls in frequency range between 1839 1.3GHz and 1.5GHz. 1840 '1.3~1.5GHz:1.3~1.5GHz' = channels which fall 1841 1841 between the specified 1842 1842 frequency range in spws 1843 that fall in or have 1844 overwrap with the 1845 specified frequency 1846 range. 1843 whose central frequency 1844 falls in the specified 1845 frequency range. 1847 1846 '1:-200~250km/s' = channels that fall between the 1848 1847 specified velocity range in … … 1991 1990 # 'a~b*Hz' 1992 1991 (expr_f0, expr_f1) = get_freq_by_string(expr0, expr1) 1992 expr_fmin = min(expr_f0, expr_f1) 1993 expr_fmax = max(expr_f0, expr_f1) 1993 1994 no_valid_spw = True 1994 1995 1995 1996 for coord in self._get_coordinate_list(): 1997 spw = coord['if'] 1998 1999 """ 1996 2000 expr_p0 = coord['coord'].to_pixel(expr_f0) 1997 2001 expr_p1 = coord['coord'].to_pixel(expr_f1) … … 1999 2003 expr_pmax = max(expr_p0, expr_p1) 2000 2004 2001 spw = coord['if']2002 2005 pmin = 0.0 2003 2006 pmax = float(self.nchan(spw) - 1) 2004 2007 2005 2008 if ((expr_pmax - pmin)*(expr_pmin - pmax) <= 0.0): 2006 2009 spw_list.append(spw) 2007 2010 no_valid_spw = False 2008 2011 """ 2012 2013 fhead = coord['coord'].to_frequency(0) 2014 ftail = coord['coord'].to_frequency(self.nchan(spw) - 1) 2015 fcen = (fhead + ftail) / 2.0 2016 2017 if ((expr_fmin <= fcen) and (fcen <= expr_fmax)): 2018 spw_list.append(spw) 2019 no_valid_spw = False 2020 2009 2021 if no_valid_spw: 2010 2022 raise ValueError("No valid spw in range ('" + str(expr0) + "~" + str(expr1) + "').") … … 2019 2031 for coord in self._get_coordinate_list(): 2020 2032 spw = coord['if'] 2021 2033 2034 """ 2022 2035 pmin = 0.0 2023 2036 pmax = float(self.nchan(spw) - 1) … … 2030 2043 2031 2044 if ((expr_vmax - vmin)*(expr_vmin - vmax) <= 0.0): 2045 spw_list.append(spw) 2046 no_valid_spw = False 2047 """ 2048 2049 vhead = coord['coord'].to_velocity(0) 2050 vtail = coord['coord'].to_velocity(self.nchan(spw) - 1) 2051 vcen = (vhead + vtail) / 2.0 2052 2053 if ((expr_vmin <= vcen) and (vcen <= expr_vmax)): 2032 2054 spw_list.append(spw) 2033 2055 no_valid_spw = False
Note:
See TracChangeset
for help on using the changeset viewer.