Changeset 2561 for branches


Ignore:
Timestamp:
06/12/12 10:30:57 (12 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: 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...

Clean up code


File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/hpc33/src/STMath.cpp

    r2560 r2561  
    39413941    vector<bool> masks = s->getMask( 0 ) ;
    39423942
     3943    // save original table selection
     3944    Table torg = s->table_ ;
     3945
    39433946    // off scan
    3944     STSelector orig = s->getSelection() ;
    39453947    // TODO 2010/01/08 TN
    39463948    // Grouping by time should be needed before averaging.
     
    39513953    // share off scan before average with out
    39523954    CountedPtr<Scantable> out = getScantable( s, true ) ;
    3953     Table t = s->table_( s->table_.col("SRCTYPE") == (Int)SrcType::PSOFF ) ;
    3954     //TableCopy::copyRows( out->table(), t ) ;
    3955     out->table_ = t ;
     3955    out->table_ = s->table_( s->table_.col("SRCTYPE") == (Int)SrcType::PSOFF ) ;
    39563956    out->attach() ;
    39573957    insitu_ = insitu ;
     
    39593959                                                       masks,
    39603960                                                       "TINT" ) ;
    3961 //     Table ttab = out->table() ;
    3962 //     ROScalarColumn<Double> *timeCol = new ROScalarColumn<Double>( ttab, "TIME" ) ;
    3963 //     uInt nrow = timeCol->nrow() ;
    3964 //     Vector<Double> timeSep = timeCol->getColumn() ;
    3965 //     delete timeCol ;
    3966 //     for ( uInt i = nrow-2 ; i > 0 ; i-- ) {
    3967 //       timeSep[i] -= timeSep[i-1] ;
    3968 //     }
    3969 //     Vector<Double> interval = out->integrCol_.getColumn() ;
    3970 //     interval /= 86400.0 ;
    3971 //     uInt *newscan = new uInt[nrow] ;
    3972 //     Vector<uInt> newscanno( IPosition(1,nrow), newscan, TAKE_OVER ) ;
    3973 //     uInt *p = newscan ;
    3974 //     uInt newid = 0 ;
    3975 //     for ( uInt i = 0 ; i < nrow - 1 ; i++ ) {
    3976 //       *p = newid ;
    3977 //       double gap = 2.0 * timeSep[i+1] / ( interval[i] + interval[i+1] ) ;
    3978 //       //cout << "gap[" << i << "]=" << setw(5) << gap << endl ;
    3979 //       if ( gap > 1.1 ) {
    3980 // //         cout << "detected gap between " << i << " and " << i+1 << endl ;
    3981 //         newid++ ;
    3982 //       }
    3983 //       p++ ;
    3984 //     }
    3985 //     *p = newid ;
    3986 //     out->scanCol_.putColumn( newscanno ) ;
    3987 //     vector< CountedPtr<Scantable> > tmp( 1, out ) ;
    3988 //     CountedPtr<Scantable> aoff = average( tmp, masks, "TINT", "SCAN" ) ;
    3989 //     t1 = mathutil::gettimeofday_sec() ;
    3990 //     cout << "elapsed time for off averaging: " << t1-t0 << " sec" << endl ;
    3991    
    39923961    // on scan
    39933962//     t0 = mathutil::gettimeofday_sec() ;
    39943963    s->table_ = s->table_( s->table_.col("SRCTYPE") == (Int)SrcType::PSON ) ;
    39953964    s->attach() ;
    3996     //out->table().addRow( s->nrow()-out->nrow() ) ;
    39973965    out->table_ = out->originalTable_ ;
    39983966    out->attach() ;
     
    40303998    }
    40313999    delete iter ;
    4032     s->setSelection( orig ) ;
     4000    s->table_ = torg ;
     4001    s->attach() ;
    40334002
    40344003//     t1 = mathutil::gettimeofday_sec() ;
Note: See TracChangeset for help on using the changeset viewer.