Changeset 2348
- Timestamp:
- 11/11/11 14:09:03 (13 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapmath.py
r2341 r2348 357 357 ymin=1.0e100 358 358 ymax=-1.0e100 359 nchan=s.nchan( )359 nchan=s.nchan(ifnos[int(i/len(polnos))]) 360 360 edge=int(nchan*0.01) 361 361 for j in range(4): … … 577 577 ymin=1.0e100 578 578 ymax=-1.0e100 579 nchan=scantab.nchan( )579 nchan=scantab.nchan(ifnos[int(i/len(polnos))]) 580 580 edge=int(nchan*0.01) 581 581 for j in range(4): … … 770 770 ymin=1.0e100 771 771 ymax=-1.0e100 772 nchan=s.nchan( )772 nchan=s.nchan(ifnos[2*int(i/len(polnos))]) 773 773 edge=int(nchan*0.01) 774 774 for j in range(4): -
trunk/python/scantable.py
r2322 r2348 504 504 505 505 """ 506 assert(len(spec) == self.nchan( ))506 assert(len(spec) == self.nchan(self.getif(rowno))) 507 507 return self._setspectrum(spec, rowno) 508 508 … … 1370 1370 msg += "\nThis mask is only valid for IF=%d" % (self.getif(i)) 1371 1371 asaplog.push(msg) 1372 n = self.nchan()1372 n = len(data) 1373 1373 msk = _n_bools(n, False) 1374 1374 # test if args is a 'list' or a 'normal *args - UGLY!!! … … 1416 1416 if len(mask) < 2: 1417 1417 raise TypeError("The mask elements should be > 1") 1418 if self.nchan() != len(mask): 1418 data = self._getabcissa(row) 1419 if len(data) != len(mask): 1419 1420 msg = "Number of channels in scantable != number of mask elements" 1420 1421 raise TypeError(msg) 1421 data = self._getabcissa(row)1422 1422 u = self._getcoordinfo()[0] 1423 1423 if u == "": -
trunk/src/Scantable.cpp
r2347 r2348 773 773 { 774 774 Vector<Float> spcs = specCol_(whichrow); 775 uInt nchannel = nchan();775 uInt nchannel = spcs.nelements(); 776 776 if (spcs.nelements() != nchannel) { 777 777 throw(AipsError("Data has incorrect number of channels")); … … 837 837 return; 838 838 } 839 if ( int(msk.size()) != nchan( ) ) {839 if ( int(msk.size()) != nchan( getIF(whichrow) ) ) { 840 840 throw(AipsError("Mask has incorrect number of channels.")); 841 841 }
Note:
See TracChangeset
for help on using the changeset viewer.