Changeset 2987


Ignore:
Timestamp:
08/20/14 16:35:38 (10 years ago)
Author:
WataruKawasaki
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs:

Put in Release Notes:

Module(s): sd

Description: fixed parse_idx_selection for mode='row' so that it returns a list of existing row numbers only.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/scantable.py

    r2984 r2987  
    24052405        if smode == 'r':
    24062406            minidx = 0
    2407             maxidx = self.nrow()
     2407            maxidx = self.nrow()-1
    24082408        else:
    24092409            idx = getattr(self,"get"+mode+"nos")()
     
    24252425            if idxlist.index(idxlist[i]) < i:
    24262426                idxlist.pop(i)
     2427
     2428        # remove elements outside range [minidx, maxidx] for smode='r'
     2429        if smode == 'r':
     2430            for i in reversed(xrange(len(idxlist))):
     2431                if (idxlist[i] < minidx) or (idxlist[i] > maxidx):
     2432                    idxlist.pop(i)
     2433       
    24272434        msg = "Selected %s: %s" % (mode.upper()+"NO", str(idxlist))
    24282435        asaplog.push(msg)
Note: See TracChangeset for help on using the changeset viewer.