Changeset 1994 for trunk/python


Ignore:
Timestamp:
02/16/11 14:59:40 (14 years ago)
Author:
Kana Sugimoto
Message:

New Development: Yes

JIRA Issue: Yes (CAS-1306)

Ready for Test: Yes

Interface Changes: Yes

What Interface Changed: added row selection parameters to scantable.flag,

ScantableWrapper::flag and Scantable::flag.

Test Programs:

Put in Release Notes: No

Module(s): scantable class

Description:

Enabled a row selection in scantable.flag.

  • A parameter 'row' is added to scantable.flag. The default value -1 applies

specified channel flags to the all rows in the scantable (same as previous code).

  • A parameter 'whichrow' is also added to ScantableWrapper::flag and

Scantable::flag accordingly.

  • The actual flagg application part in the code Scantable::flag is moved to a new

private function Scantable::applyChanFlag(uInt whichrow, vector<bool> msk, uChar flagval).
The function applies flag with a value, 'flagval', to masked channels, 'msk',
in a selected row, 'whichrow'.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/scantable.py

    r1992 r1994  
    10141014
    10151015    @asaplog_post_dec
    1016     def flag(self, mask=None, unflag=False):
     1016    def flag(self, row=-1, mask=None, unflag=False):
    10171017        """\
    10181018        Flag the selected data using an optional channel mask.
     
    10201020        Parameters:
    10211021
     1022            row:    an optional row number in the scantable.
     1023                      Default -1 flags all rows
     1024                     
    10221025            mask:   an optional channel mask, created with create_mask. Default
    10231026                    (no mask) is all channels.
     
    10281031        varlist = vars()
    10291032        mask = mask or []
    1030         self._flag(mask, unflag)
     1033        self._flag(row, mask, unflag)
    10311034        self._add_history("flag", varlist)
    10321035
Note: See TracChangeset for help on using the changeset viewer.