Ignore:
Timestamp:
12/26/16 14:07:42 (8 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Put in Release Notes: No

Module(s): sdsaveold

Description: A fix to the handling of CHBIND for NRO dataset.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/external-alma/atnf/PKSIO/NRODataset.cc

    r3101 r3109  
    11101110  vector<double> mscale = MLTSCF ;
    11111111  double dscale = mscale[getIndex( i )] ;
    1112   int cbind = CHBIND ;
    1113   int chmin = CHMIN ;
     1112//  int cbind = CHBIND ;
     1113//  int chmin = CHMIN ;
    11141114
    11151115  // char -> int -> double
     
    11601160  }
    11611161
    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   }
     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//  }
    11831183
    11841184  // DEBUG
Note: See TracChangeset for help on using the changeset viewer.