Changeset 2950


Ignore:
Timestamp:
06/20/14 09:54:34 (11 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-6582

Ready for Test: Yes

Interface Changes: Yes/No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...


Smoothing functions are updated so that flagged rows are not processed.
Flag value for regridding function is changed from 1 to 128.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STMath.cpp

    r2949 r2950  
    24702470    ArrayColumn<Float> specCol(tab, "SPECTRA");
    24712471    ArrayColumn<uChar> flagCol(tab, "FLAGTRA");
     2472    ScalarColumn<uInt> flagrowCol(tab, "FLAGROW");
    24722473    Vector<Float> spec;
    24732474    Vector<uChar> flag;
     2475    Vector<uInt> flagrow = flagrowCol.getColumn();
    24742476    for (uInt i = 0; i < tab.nrow(); ++i) {
     2477      if (flagrow[i] != 0) {
     2478        // do not process flagged row
     2479        continue;
     2480      }
    24752481      specCol.get(i, spec);
    24762482      flagCol.get(i, flag);
     
    25182524    ArrayColumn<Float> specCol(tab, "SPECTRA");
    25192525    ArrayColumn<uChar> flagCol(tab, "FLAGTRA");
     2526    ScalarColumn<uInt> flagrowCol(tab, "FLAGROW");
    25202527    Vector<Float> spec = specCol( 0 );
    25212528    uInt nchan = spec.nelements();
     
    25242531    Vector<uChar> flag;
    25252532    Vector<Bool> mask(nchan);
     2533    Vector<uInt> flagrow = flagrowCol.getColumn();
    25262534    for ( uInt i=0; i<tab.nrow(); ++i) {
     2535      if (flagrow[i] != 0) {
     2536        // do not process flagged row
     2537        continue;
     2538      }
     2539     
    25272540      specCol.get(i, spec);
    25282541      flagCol.get(i, flag);
  • trunk/src/Scantable.cpp

    r2948 r2950  
    21202120            wsum += ( yr - zl ) ;
    21212121          }
    2122           newflag[i] = newflag[i] && oldflag[j] ;
     2122          newflag[i] = (newflag[i] && oldflag[j]) ? 1 << 7 : 0 ;
    21232123        }
    21242124        else {
     
    21282128            wsum += abs(dnu) ;
    21292129          }
    2130           newflag[i] = newflag[i] && oldflag[j] ;
     2130          newflag[i] = (newflag[i] && oldflag[j]) ? 1 << 7 : 0 ;
    21312131          ichan = jj ;
    21322132          break ;
     
    21402140            wsum += ( yr - yl ) ;
    21412141          }
    2142           newflag[i] = newflag[i] && oldflag[j] ;
     2142          newflag[i] = (newflag[i] && oldflag[j]) ? 1 << 7 : 0 ;
    21432143        }
    21442144        else {
     
    21482148            wsum += ( zr - yl ) ;
    21492149          }
    2150           newflag[i] = newflag[i] && oldflag[j] ;
     2150          newflag[i] = (newflag[i] && oldflag[j]) ? 1 << 7 : 0 ;
    21512151          ichan = jj ;
    21522152          break ;
Note: See TracChangeset for help on using the changeset viewer.