Changeset 2561 for branches/hpc33/src
- Timestamp:
- 06/12/12 10:30:57 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/hpc33/src/STMath.cpp
r2560 r2561 3941 3941 vector<bool> masks = s->getMask( 0 ) ; 3942 3942 3943 // save original table selection 3944 Table torg = s->table_ ; 3945 3943 3946 // off scan 3944 STSelector orig = s->getSelection() ;3945 3947 // TODO 2010/01/08 TN 3946 3948 // Grouping by time should be needed before averaging. … … 3951 3953 // share off scan before average with out 3952 3954 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 ) ; 3956 3956 out->attach() ; 3957 3957 insitu_ = insitu ; … … 3959 3959 masks, 3960 3960 "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 3992 3961 // on scan 3993 3962 // t0 = mathutil::gettimeofday_sec() ; 3994 3963 s->table_ = s->table_( s->table_.col("SRCTYPE") == (Int)SrcType::PSON ) ; 3995 3964 s->attach() ; 3996 //out->table().addRow( s->nrow()-out->nrow() ) ;3997 3965 out->table_ = out->originalTable_ ; 3998 3966 out->attach() ; … … 4030 3998 } 4031 3999 delete iter ; 4032 s->setSelection( orig ) ; 4000 s->table_ = torg ; 4001 s->attach() ; 4033 4002 4034 4003 // t1 = mathutil::gettimeofday_sec() ;
Note:
See TracChangeset
for help on using the changeset viewer.