Changeset 2557 for branches


Ignore:
Timestamp:
06/11/12 17:40:21 (13 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...

Minor speed-up of STMath::almacal


File:
1 edited

Legend:

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

    r2556 r2557  
    39433943    // off scan
    39443944    STSelector orig = s->getSelection() ;
    3945     STSelector sel = orig ;
    3946     vector<int> typesOrig = orig.getTypes() ;
    3947     vector<int> types = typesOrig ;
    3948     types.push_back( SrcType::PSOFF ) ;
    3949     sel.setTypes( types ) ;
    3950     s->setSelection( sel ) ;
    39513945    // TODO 2010/01/08 TN
    39523946    // Grouping by time should be needed before averaging.
     
    39563950    insitu_ = false ;
    39573951    // share off scan before average with out
    3958     CountedPtr<Scantable> out = getScantable( s, false ) ;
     3952    CountedPtr<Scantable> out = getScantable( s, true ) ;
     3953    Table t = s->table_( s->table_.col("SRCTYPE") == (Int)SrcType::PSOFF ) ;
     3954    TableCopy::copyRows( out->table(), t ) ;
    39593955    insitu_ = insitu ;
    39603956    Table ttab = out->table() ;
     
    40033999//     double t3 = mathutil::gettimeofday_sec() ;
    40044000//     cout << "aoff.nrow = " << aoff->nrow() << endl ;
    4005     sel = orig ;
    40064001//     t1 = mathutil::gettimeofday_sec() ;
    40074002//     cout << "elapsed time for off averaging: " << t1-t0 << " sec" << endl ;
     
    40104005    // on scan
    40114006//     t0 = mathutil::gettimeofday_sec() ;
    4012     types[types.size()-1] = SrcType::PSON ;
    4013     sel.setTypes( types ) ;
    4014     s->setSelection( sel ) ;
     4007    s->table_ = s->table_( s->table_.col("SRCTYPE") == (Int)SrcType::PSON ) ;
     4008    s->attach() ;
    40154009    out->table().addRow( s->nrow()-out->nrow() ) ;
    40164010    copyRows( out->table(), s->table(), 0, 0, s->nrow(), False ) ;
    4017     sel.reset() ;
    40184011//     t1 = mathutil::gettimeofday_sec() ;
    40194012//     cout << "elapsed time for preparing output table: " << t1-t0 << " sec" << endl ;
     
    40284021    cols[2] = "IFNO" ;
    40294022    STIdxIter *iter = new STIdxIterAcc( out, cols ) ;
     4023    STSelector sel ;
    40304024    while ( !iter->pastEnd() ) {
    40314025      Vector<uInt> ids = iter->current() ;
Note: See TracChangeset for help on using the changeset viewer.