Changeset 2672
- Timestamp:
- 10/18/12 21:06:07 (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/ipysupport.py
r2499 r2672 97 97 resample - return a scan with resampled channels 98 98 smooth - return the spectrally smoothed scan 99 reshape - cut out channel range 99 100 poly_baseline - fit a polynomial baseline to all Beams/IFs/Pols 100 101 auto_poly_baseline - automatically fit a polynomial baseline -
trunk/python/scantable.py
r2645 r2672 2192 2192 2193 2193 @asaplog_post_dec 2194 def reshape(self, first, last, insitu=None): 2195 """Resize the band by providing first and last channel. 2196 This will cut off all channels outside [first, last]. 2197 """ 2198 if insitu is None: 2199 insitu = rcParams['insitu'] 2200 varlist = vars() 2201 if last < 0: 2202 last = self.nchan()-1 + last 2203 s = None 2204 if insitu: 2205 s = self 2206 else: 2207 s = self.copy() 2208 s._reshape(first,last) 2209 s._add_history("reshape", varlist) 2210 if not insitu: 2211 return s 2212 2213 @asaplog_post_dec 2194 2214 def resample(self, width=5, method='cubic', insitu=None): 2195 2215 """\ -
trunk/src/Scantable.cpp
r2666 r2672 1835 1835 1836 1836 // if nmax exceeds nChan, reset nmax to nChan 1837 if ( nmax >= nChan ) {1837 if ( nmax >= nChan-1 ) { 1838 1838 if ( nmin == 0 ) { 1839 1839 // nothing to do -
trunk/test/test_observatories/test_parkes_mx.py
r2522 r2672 27 27 rms = avp.stats("rms") 28 28 mx = avp.stats("max_abc") 29 print rms30 29 assert_almost_equals(rms[0], 0.04148, 5) 31 30 assert_almost_equals(mx[0], 86.67328, 5) -
trunk/test/test_scantable.py
r2634 r2672 222 222 assert_almost_equals(res_rms[0], 0.38346, 5) 223 223 assert_almost_equals(res_rms[1], 0.38780, 5) 224 225 226 def test_reshape(self): 227 cp = self.st.copy() 228 n = cp.nchan() 229 rs = cp.reshape(10,-10,False) 230 assert_equals(n-20, rs.nchan()) 231 assert_equals(cp.nchan(), n) 232 rs = cp.reshape(10,n-11,False) 233 assert_equals(n-20, rs.nchan()) 234 cp.reshape(10,-10,True) 235 assert_equals(n-20, cp.nchan())
Note:
See TracChangeset
for help on using the changeset viewer.