Changeset 2957


Ignore:
Timestamp:
06/26/14 17:42:59 (10 years ago)
Author:
WataruKawasaki
Message:

New Development: No

JIRA Issue: Yes CAS-6599

Ready for Test: Yes

Interface Changes: Yes

What Interface Changed: function paramter

Test Programs:

Put in Release Notes: No

Module(s): sd

Description: add a paramter to sd.scantable.stats() to skip outputting formatted statistical values to temporary text file.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/scantable.py

    r2954 r2957  
    892892
    893893    @asaplog_post_dec
    894     def stats(self, stat='stddev', mask=None, form='3.3f', row=None):
     894    def stats(self, stat='stddev', mask=None, form='3.3f', row=None, skip_flaggedrow=False):
    895895        """\
    896896        Determine the specified statistic of the current beam/if/pol
     
    910910            row:     row number of spectrum to process.
    911911                     (default is None: for all rows)
     912
     913            skip_flaggedrow: if True, skip outputting text for flagged
     914                             spectra. default is False.
    912915
    913916        Example:
     
    922925                             "number of channels. Please use setselection() "
    923926                             "to select individual IFs")
    924         rtnabc = False
    925         if stat.lower().endswith('_abc'): rtnabc = True
    926927        getchan = False
    927928        if stat.lower().startswith('min') or stat.lower().startswith('max'):
     
    929930            getchan = True
    930931            statvals = []
    931         if not rtnabc:
     932
     933        rtnabc = False
     934        if stat.lower().endswith('_abc'):
     935            rtnabc = True
     936        else:
    932937            if row == None:
    933938                statvals = self._math._stats(self, mask, stat)
     
    952957
    953958        for i in rows:
    954             print '@@@@@@@@'
    955             print '['+str(i)+'/'+str(rows)+'] -- '+('RowFlagged' if self._getflagrow(i) else '')
    956             print '@@@@@@@@'
    957             #if self._getflagrow(i): continue
    958959            refstr = ''
    959960            statunit= ''
     
    966967                else:
    967968                    refstr = ('(@ %'+form) % (qx['value'])+' ['+qx['unit']+'])'
     969
     970            if skip_flaggedrow and self._getflagrow(i): continue
    968971
    969972            tm = self._gettime(i)
Note: See TracChangeset for help on using the changeset viewer.