Changeset 2317 for trunk/src


Ignore:
Timestamp:
09/29/11 17:11:53 (13 years ago)
Author:
Malte Marquarding
Message:

Ticket #250: make averageChannel work as previously for multibeam data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STMath.cpp

    r2289 r2317  
    396396    vector< Vector<Double> > dirs ;
    397397    vector<int> indexes ;
     398    // Handle MX mode averaging
     399    if (in->nbeam() > 1 ) {     
     400      length = 1;
     401    }
    398402    for ( Int i = 0 ; i < length ; i++ ) {
    399403      Vector<Double> t = dircol(i).getAngle(Unit(String("rad"))).getValue() ;
     
    419423    for ( uInt i = 0 ; i < rowNum ; i++ ) {
    420424      TableCopy::copyRows(tout, subt, outrowCount+i, indexes[i], 1) ;
     425      // Handle MX mode averaging
    421426      if ( avmode != "SCAN") {
    422         //scanColOut.put(outrowCount+i, uInt(0));
     427        scanColOut.put(outrowCount+i, uInt(0));
    423428      }
    424429    }
     
    426431    dircolOut.attach( tout, "DIRECTION" ) ;
    427432    for ( uInt irow = 0 ; irow < rowNum ; irow++ ) {
    428       Vector<Double> t = dircolOut(outrowCount+irow).getAngle(Unit(String("rad"))).getValue() ;
     433      Vector<Double> t = \
     434        dircolOut(outrowCount+irow).getAngle(Unit(String("rad"))).getValue() ;
    429435      Vector<Float> tmp;
    430436      specCol.get(0, tmp);
     
    435441      // mask spectra for different DIRECTION
    436442      for ( uInt jrow = 0 ; jrow < subt.nrow() ; jrow++ ) {
    437         Vector<Double> direction = dircol(jrow).getAngle(Unit(String("rad"))).getValue() ;
     443        Vector<Double> direction = \
     444          dircol(jrow).getAngle(Unit(String("rad"))).getValue() ;
    438445        //if ( t[0] != direction[0] || t[1] != direction[1] ) {
    439446        Double dx = t[0] - direction[0] ;
     
    441448        Double dd = sqrt( dx * dx + dy * dy ) ;
    442449        //if ( !allNearAbs( t, direction, tol ) ) {
    443         if ( dd > tol ) {
     450        if ( dd > tol &&  in->nbeam() < 2 ) {
    444451          flags[jrow] = userflag ;
    445452        }
Note: See TracChangeset for help on using the changeset viewer.