Changeset 1200 for trunk/src


Ignore:
Timestamp:
08/29/06 11:03:45 (18 years ago)
Author:
mar637
Message:

Merge from Release2.1.0b tag

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STMath.cpp

    r1192 r1200  
    13811381CountedPtr< Scantable >
    13821382  asap::STMath::lagFlag( const CountedPtr< Scantable > & in,
    1383                           double frequency, int width )
     1383                          double frequency, double width )
    13841384{
    13851385  CountedPtr< Scantable > out = getScantable(in, false);
     
    13991399      Vector<Float> spec = specCol(i);
    14001400      Vector<uChar> flag = flagCol(i);
    1401       Int lag = Int(spec.nelements()*abs(inc)/frequency);
     1401      Int lag0 = Int(spec.nelements()*abs(inc)/(frequency+width)+0.5);
     1402      Int lag1 = Int(spec.nelements()*abs(inc)/(frequency-width)+0.5);
    14021403      for (int k=0; k < flag.nelements(); ++k ) {
    14031404        if (flag[k] > 0) {
     
    14071408      Vector<Complex> lags;
    14081409      ffts.fft(lags, spec);
    1409       Int start =  max(0, lag-width);
    1410       Int end =  min(Int(lags.nelements()-1), lag+width);
     1410      Int start =  max(0, lag0);
     1411      Int end =  min(Int(lags.nelements()-1), lag1);
    14111412      if (start == end) {
    14121413        lags[start] = Complex(0.0);
  • trunk/src/STMath.h

    r1192 r1200  
    191191  casa::CountedPtr<Scantable>
    192192    lagFlag( const casa::CountedPtr<Scantable>& in, double frequency,
    193               int width);
     193              double width);
    194194
    195195private:
  • trunk/src/STMathWrapper.h

    r1192 r1200  
    157157
    158158  ScantableWrapper lagFlag( const ScantableWrapper& in,
    159                             double frequency, int width )
     159                            double frequency, double width )
    160160  { return ScantableWrapper(STMath::lagFlag(in.getCP(), frequency, width)); }
    161161
Note: See TracChangeset for help on using the changeset viewer.