Changeset 2348


Ignore:
Timestamp:
11/11/11 14:09:03 (13 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: No (a bug fix related to CAS-3606)

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs: all SD unit and regression tests passed

Put in Release Notes: No

Module(s): asap.scantable and asap.asapmath

Description: spceified ifno parameter in some of the calls to scantable.nchan.


Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapmath.py

    r2341 r2348  
    357357            ymin=1.0e100
    358358            ymax=-1.0e100
    359             nchan=s.nchan()
     359            nchan=s.nchan(ifnos[int(i/len(polnos))])
    360360            edge=int(nchan*0.01)
    361361            for j in range(4):
     
    577577            ymin=1.0e100
    578578            ymax=-1.0e100
    579             nchan=scantab.nchan()
     579            nchan=scantab.nchan(ifnos[int(i/len(polnos))])
    580580            edge=int(nchan*0.01)
    581581            for j in range(4):
     
    770770            ymin=1.0e100
    771771            ymax=-1.0e100
    772             nchan=s.nchan()
     772            nchan=s.nchan(ifnos[2*int(i/len(polnos))])
    773773            edge=int(nchan*0.01)
    774774            for j in range(4):
  • trunk/python/scantable.py

    r2322 r2348  
    504504
    505505        """
    506         assert(len(spec) == self.nchan())
     506        assert(len(spec) == self.nchan(self.getif(rowno)))
    507507        return self._setspectrum(spec, rowno)
    508508
     
    13701370            msg += "\nThis mask is only valid for IF=%d" % (self.getif(i))
    13711371        asaplog.push(msg)
    1372         n = self.nchan()
     1372        n = len(data)
    13731373        msk = _n_bools(n, False)
    13741374        # test if args is a 'list' or a 'normal *args - UGLY!!!
     
    14161416        if len(mask) < 2:
    14171417            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):
    14191420            msg = "Number of channels in scantable != number of mask elements"
    14201421            raise TypeError(msg)
    1421         data = self._getabcissa(row)
    14221422        u = self._getcoordinfo()[0]
    14231423        if u == "":
  • trunk/src/Scantable.cpp

    r2347 r2348  
    773773{
    774774    Vector<Float> spcs = specCol_(whichrow);
    775     uInt nchannel = nchan();
     775    uInt nchannel = spcs.nelements();
    776776    if (spcs.nelements() != nchannel) {
    777777      throw(AipsError("Data has incorrect number of channels"));
     
    837837    return;
    838838  }
    839   if ( int(msk.size()) != nchan() ) {
     839  if ( int(msk.size()) != nchan( getIF(whichrow) ) ) {
    840840    throw(AipsError("Mask has incorrect number of channels."));
    841841  }
Note: See TracChangeset for help on using the changeset viewer.