Changeset 2348 for trunk/python


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/python
Files:
2 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 == "":
Note: See TracChangeset for help on using the changeset viewer.