Changeset 1992


Ignore:
Timestamp:
02/15/11 18:53:29 (14 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: No (minor improvements)

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs: run scantable.get_row(rowno) and scantable.get_row selector(rowno)

to select single row, rowno, in scantable.

Put in Release Notes: No

Module(s): scantable class

Description:

More straightforward row selection by using a parameter rows in scantable.get_row
and scantable.get_row_selector


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/scantable.py

    r1986 r1992  
    482482        # Select a row
    483483        sel=selector()
    484         sel.set_scans([workscan.getscan(row)])
    485         sel.set_cycles([workscan.getcycle(row)])
    486         sel.set_beams([workscan.getbeam(row)])
    487         sel.set_ifs([workscan.getif(row)])
    488         sel.set_polarisations([workscan.getpol(row)])
    489         sel.set_name(workscan._getsourcename(row))
     484        sel.set_rows([row])
     485        #sel.set_scans([workscan.getscan(row)])
     486        #sel.set_cycles([workscan.getcycle(row)])
     487        #sel.set_beams([workscan.getbeam(row)])
     488        #sel.set_ifs([workscan.getif(row)])
     489        #sel.set_polarisations([workscan.getpol(row)])
     490        #sel.set_name(workscan._getsourcename(row))
    490491        workscan.set_selection(sel)
    491492        if not workscan.nrow() == 1:
     
    26092610
    26102611    def get_row_selector(self, rowno):
    2611         return selector(beams=self.getbeam(rowno),
    2612                         ifs=self.getif(rowno),
    2613                         pols=self.getpol(rowno),
    2614                         scans=self.getscan(rowno),
    2615                         cycles=self.getcycle(rowno))
     2612        #return selector(beams=self.getbeam(rowno),
     2613        #                ifs=self.getif(rowno),
     2614        #                pols=self.getpol(rowno),
     2615        #                scans=self.getscan(rowno),
     2616        #                cycles=self.getcycle(rowno))
     2617        return selector(rows=[rowno])
    26162618
    26172619    def _add_history(self, funcname, parameters):
Note: See TracChangeset for help on using the changeset viewer.