Changeset 2670 for trunk


Ignore:
Timestamp:
10/18/12 14:08:21 (12 years ago)
Author:
Malte Marquarding
Message:

Fix for #270: rmedian flags were incorrectly handled. Also remove excessive conversion step

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/MathUtils.cpp

    r2619 r2670  
    197197    // add data value
    198198    out[i] = ms.add(in[i+hwidth], flag[i+hwidth]);
    199     outflag[i] = (ms.nval() == 0);
     199    outflag[i] = (ms.nval() > 0 );
    200200  }
    201201  // replicate edge values from first value with full width of values
  • trunk/src/STMath.cpp

    r2658 r2670  
    24552455      if (kernel == "hanning") {
    24562456        mathutil::hanning(specout, maskout, spec, !mask);
    2457         convertArray(flag, !maskout);
    24582457      } else if (kernel == "rmedian") {
    24592458        mathutil::runningMedian(specout, maskout, spec , mask, width);
    2460         convertArray(flag, maskout);
    24612459      } else if (kernel == "poly") {
    24622460        mathutil::polyfit(specout, maskout, spec, !mask, width, order);
    2463         convertArray(flag, !maskout);
    24642461      }
    24652462
Note: See TracChangeset for help on using the changeset viewer.