Changeset 2133


Ignore:
Timestamp:
04/14/11 10:44:45 (14 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: sdaverage unit test

Put in Release Notes: No

Module(s): Module Names change impacts.

Description: Describe your changes here...

averageall parameter bug fix.


Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STMath.cpp

    r2125 r2133  
    31943194        taqlstream << "SELECT FROM $1 WHERE FREQ_ID IN [" ;
    31953195        for ( uInt i = 0 ; i < freqidlist.size() ; i++ ) {
    3196           taqlstream << i ;
     3196          taqlstream << freqidlist[i] ;
    31973197          if ( i < freqidlist.size() - 1 )
    31983198            taqlstream << "," ;
     
    33993399          //os << "tableid = " << tableid << " rowid = " << rowid << ": " << LogIO::POST ;
    34003400          //os << "   regridChannel applied to " ;
    3401           if ( tableid != reftable )
    3402             refreqid = newin[tableid]->frequencies().addEntry( refpixref, refvalref, refinc ) ;
     3401          //if ( tableid != reftable )
     3402          refreqid = newin[tableid]->frequencies().addEntry( refpixref, refvalref, refinc ) ;
    34033403          for ( uInt irow = 0 ; irow < newin[tableid]->table().nrow() ; irow++ ) {
    34043404            uInt tfreqid = freqIdVec[tableid][irow] ;
  • trunk/src/Scantable.cpp

    r2131 r2133  
    15701570  int ichan = 0 ;
    15711571  double wsum = 0.0 ;
    1572   Vector<Float> z( nChan ) ;
    1573   z[0] = abcissa[0] - 0.5 * olddnu + 0.5 * dnu ;
    1574   for ( int ii = 1 ; ii < nChan ; ii++ )
    1575     z[ii] = z[ii-1] + dnu ;
    15761572  Vector<Float> zi( nChan+1 ) ;
    15771573  Vector<Float> yi( oldsize + 1 ) ;
    1578   zi[0] = z[0] - 0.5 * dnu ;
    1579   zi[1] = z[0] + 0.5 * dnu ;
     1574  zi[0] = abcissa[0] - 0.5 * olddnu ;
     1575  zi[1] = zi[1] + dnu ;
    15801576  for ( int ii = 2 ; ii < nChan ; ii++ )
    1581     zi[ii] = zi[ii-1] + dnu ;
    1582   zi[nChan] = z[nChan-1] + 0.5 * dnu ;
     1577    zi[ii] = zi[0] + dnu * ii ;
     1578  zi[nChan] = zi[nChan-1] + dnu ;
    15831579  yi[0] = abcissa[0] - 0.5 * olddnu ;
    15841580  yi[1] = abcissa[1] + 0.5 * olddnu ;
     
    16291625        }
    16301626      }
    1631       newspec[ii] /= wsum ;
     1627      if ( wsum != 0.0 )
     1628        newspec[ii] /= wsum ;
    16321629      wsum = 0.0 ;
    16331630    }
     
    16761673        }
    16771674      }
    1678       newspec[ii] /= wsum ;
     1675      if ( wsum != 0.0 )
     1676        newspec[ii] /= wsum ;
    16791677      wsum = 0.0 ;
    16801678    }
Note: See TracChangeset for help on using the changeset viewer.