Changeset 2978 for trunk/src/STMath.cpp


Ignore:
Timestamp:
07/25/14 23:06:41 (10 years ago)
Author:
WataruKawasaki
Message:

New Development: No

JIRA Issue: Yes CAS-6584, CAS-6787

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs: test_sdcal

Put in Release Notes:

Module(s): sd

Description: (1) modified STMath::almacal(), STMath::cwcal(), and the relevant functions so that flag information are properly handled in sdcal's 'ps'(for ALMA and APEX), 'otf', and 'otfraster' modes.

(2) found a bug in SimpleInterpolationHelper::GetFromTime?() and fixed it (the bug was causing a serious issue reported in CAS-6787).


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STMath.cpp

    r2974 r2978  
    1212
    1313#include <sstream>
     14#include <iostream>
    1415
    1516#include <casa/iomanip.h>
     
    42664267      // accumulate data
    42674268      s->flagsCol_.get( irow, flag ) ;
     4269      //if row-flagged, all channels set flagged
     4270      if (s->getFlagRow(irow)) {
     4271        for (uInt k = 0; k < nchan; ++k) {
     4272          flag(k) = 1 << 7;
     4273        }
     4274      }
    42684275      convertArray( bflag, flag ) ;
    42694276      s->specCol_.get( irow, spec ) ;
    42704277      tsys.assign( s->tsysCol_( irow ) ) ;
    4271       if ( !allEQ(bflag,True) )
    4272         acc.add( spec, !bflag, tsys, interval[irow], timeVec[irow] ) ;
     4278      //if ( !allEQ(bflag,True) )
     4279      acc.add( spec, !bflag, tsys, interval[irow], timeVec[irow] ) ;
    42734280      double gap = 2.0 * 86400.0 * timeSep[i] / ( interval[jrow] + interval[irow] ) ;
    42744281      //cout << "gap[" << i << "]=" << setw(5) << gap << endl ;
     
    43034310    irow = rows[len-1] ;
    43044311    s->flagsCol_.get( irow, flag ) ;
     4312    //if row-flagged, all channels set flagged
     4313    if (s->getFlagRow(irow)) {
     4314      for (uInt k = 0; k < nchan; ++k) {
     4315        flag(k) = 1 << 7;
     4316      }
     4317    }
    43054318    convertArray( bflag, flag ) ;
    43064319    s->specCol_.get( irow, spec ) ;
    43074320    tsys.assign( s->tsysCol_( irow ) ) ;
    4308     if (!allEQ(bflag,True) )
    4309       acc.add( spec, !bflag, tsys, interval[irow], timeVec[irow] ) ;
     4321    //if (!allEQ(bflag,True) )
     4322    acc.add( spec, !bflag, tsys, interval[irow], timeVec[irow] ) ;
    43104323    if ( acc.state() ) {
    43114324      atab.addRow() ;
Note: See TracChangeset for help on using the changeset viewer.