- Timestamp:
- 11/25/15 15:36:30 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STMath.cpp
r3010 r3079 15 15 #include <sstream> 16 16 #include <iostream> 17 #include <limits.h> 17 18 18 19 #include <casa/iomanip.h> … … 2057 2058 for (uInt i=0; i < tab.nrow(); ++i ) { 2058 2059 if (in->isAllChannelsFlagged(i)) { 2059 out.push_back( NAN);2060 out.push_back(static_cast<int>(NAN)); 2060 2061 } else { 2061 2062 Vector<Float> spec; specCol.get(i, spec); … … 3427 3428 for ( uInt ifreq = 0 ; ifreq < freqid[itable].size() ; ifreq++ ) { 3428 3429 double minf = iffreq[itable][2*ifreq] ; 3429 uInt groupid ;3430 uInt groupid = UINT_MAX; 3430 3431 for ( uInt igrp = 0 ; igrp < freqgrp.size() ; igrp++ ) { 3431 3432 vector<uInt> memberlist = freqgrp[igrp] ; … … 3434 3435 break ; 3435 3436 } 3437 } 3438 if (groupid == UINT_MAX) { 3439 LogIO os(LogOrigin("STMath", "new_average", WHERE)); 3440 os << LogIO::WARN << "frequency grouping may be failed. set to 0" << LogIO::POST; 3441 groupid = 0; 3436 3442 } 3437 3443 groups[itable][ifreq] = groupid ; … … 3494 3500 3495 3501 // update MAIN 3496 for ( uInt irow = 0 ; irow < newin[itable]->nrow() ; irow++ ) {3502 for ( Int irow = 0 ; irow < newin[itable]->nrow() ; irow++ ) { 3497 3503 uInt groupid = groups[itable][oldFreqId[irow]] ; 3498 3504 newFreqId[irow] = groupid ; … … 3991 3997 const vector< CountedPtr<Scantable> >& sky, 3992 3998 const vector< CountedPtr<Scantable> >& hot, 3993 const vector< CountedPtr<Scantable> >& cold,3999 const vector< CountedPtr<Scantable> >& /*cold*/, 3994 4000 const Vector<uInt> &rows ) 3995 4001 { … … 4026 4032 Block<uInt> flagchan( spsize ) ; 4027 4033 uInt nflag = 0 ; 4028 for ( int irow = 0 ; irow < rows.nelements() ; irow++ ) {4034 for ( size_t irow = 0 ; irow < rows.nelements() ; irow++ ) { 4029 4035 double reftime = timeCol.asdouble(*p) ; 4030 4036 ids = getRowIdFromTime( reftime, timeSkyS ) ; … … 4079 4085 const CountedPtr<Scantable>& sky, 4080 4086 const CountedPtr<Scantable>& hot, 4081 const CountedPtr<Scantable>& cold,4087 const CountedPtr<Scantable>& /*cold*/, 4082 4088 const Vector<uInt> &rows ) 4083 4089 { … … 4104 4110 Block<uInt> flagchan( spsize ) ; 4105 4111 uInt nflag = 0 ; 4106 for ( int irow = 0 ; irow < rows.nelements() ; irow++ ) {4112 for ( size_t irow = 0 ; irow < rows.nelements() ; irow++ ) { 4107 4113 double reftime = timeCol.asdouble(*p) ; 4108 4114 ids = getRowIdFromTime( reftime, timeSky ) ; … … 4242 4248 delete timeCol ; 4243 4249 Vector<Double> interval = s->integrCol_.getColumn() ; 4244 uInt nrow = timeVec.nelements() ;4250 //uInt nrow = timeVec.nelements() ; 4245 4251 uInt outrow = 0 ; 4246 4252
Note:
See TracChangeset
for help on using the changeset viewer.