Changeset 3109
- Timestamp:
- 12/26/16 14:07:42 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/external-alma/atnf/PKSIO/NRODataset.cc
r3101 r3109 1110 1110 vector<double> mscale = MLTSCF ; 1111 1111 double dscale = mscale[getIndex( i )] ; 1112 int cbind = CHBIND ;1113 int chmin = CHMIN ;1112 // int cbind = CHBIND ; 1113 // int chmin = CHMIN ; 1114 1114 1115 1115 // char -> int -> double … … 1160 1160 } 1161 1161 1162 // channel binding if necessary1163 if ( cbind != 1 ) {1164 iter = spec.begin() ;1165 advance( iter, chmin ) ;1166 vector<double>::iterator iter2 = spec.begin() ;1167 for ( int i = 0 ; i < nchan ; i++ ) {1168 double sum0 = 0 ;1169 double sum1 = 0 ;1170 for ( int j = 0 ; j < cbind ; j++ ) {1171 sum0 += *iter ;1172 sum1 += 1.0 ;1173 iter++ ;1174 }1175 *iter2 = sum0 / sum1 ;1176 iter2++ ;1177 // DEBUG1178 //cout << "NRODataset::getSpectrum() bspec[" << i << "] = " << bspec[i] << endl ;1179 //1180 }1181 spec.resize( nchan ) ;1182 }1162 // // channel binding if necessary 1163 // if ( cbind != 1 ) { 1164 // iter = spec.begin() ; 1165 // advance( iter, chmin ) ; 1166 // vector<double>::iterator iter2 = spec.begin() ; 1167 // for ( int i = 0 ; i < nchan ; i++ ) { 1168 // double sum0 = 0 ; 1169 // double sum1 = 0 ; 1170 // for ( int j = 0 ; j < cbind ; j++ ) { 1171 // sum0 += *iter ; 1172 // sum1 += 1.0 ; 1173 // iter++ ; 1174 // } 1175 // *iter2 = sum0 / sum1 ; 1176 // iter2++ ; 1177 // // DEBUG 1178 // //cout << "NRODataset::getSpectrum() bspec[" << i << "] = " << bspec[i] << endl ; 1179 // // 1180 // } 1181 // spec.resize( nchan ) ; 1182 // } 1183 1183 1184 1184 // DEBUG
Note:
See TracChangeset
for help on using the changeset viewer.