Ignore:
Timestamp:
06/24/14 19:59:46 (10 years ago)
Author:
WataruKawasaki
Message:

New Development: No

JIRA Issue: Yes CAS-6598

Ready for Test: Yes

Interface Changes: Yes

What Interface Changed: add a parameter for some functions

Test Programs: test_sdscale

Put in Release Notes:

Module(s): sd

Description: add a parameter 'skip_flaggedrow' for STMath::unaryOperate(), STMath::arrayOperate(), STMath::arrayOperateChannel(), STMath::arrayOperateRow() and their python interfaces if exist. the default value of 'skip_flaggedrow' is false so default behaviour of these functions will not change.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapmath.py

    r2904 r2952  
    10251025
    10261026@asaplog_post_dec
    1027 def _array2dOp( scan, value, mode="ADD", tsys=False, insitu=None):
     1027def _array2dOp( scan, value, mode="ADD", tsys=False, insitu=None, skip_flaggedrow=False):
    10281028    """
    10291029    This function is workaround on the basic operation of scantable
     
    10361036    insitu:  if False, a new scantable is returned.
    10371037             Otherwise, the array operation is done in-sitsu.
     1038    skip_flaggedrow: skip operation for row-flagged spectra.
    10381039    """
    10391040    if insitu is None: insitu = rcParams['insitu']
     
    10441045    stm._setinsitu(insitu)
    10451046    if len( value ) == 1:
    1046         s = scantable( stm._arrayop( scan, value[0], mode, tsys ) )
     1047        s = scantable( stm._arrayop( scan, value[0], mode, tsys, skip_flaggedrow ) )
    10471048    elif len( value ) != nrow:
    10481049        raise ValueError( 'len(value) must be 1 or conform to scan.nrow()' )
     
    10621063            s.set_selection( sel )
    10631064            if len( value[irow] ) == 1:
    1064                 stm._unaryop( s, value[irow][0], mode, tsys )
     1065                stm._unaryop( s, value[irow][0], mode, tsys, skip_flaggedrow )
    10651066            else:
    10661067                #stm._arrayop( s, value[irow], mode, tsys, 'channel' )
    1067                 stm._arrayop( s, value[irow], mode, tsys )
     1068                stm._arrayop( s, value[irow], mode, tsys, skip_flaggedrow )
    10681069        s.set_selection(basesel)
    10691070    return s
Note: See TracChangeset for help on using the changeset viewer.