Changeset 1078


Ignore:
Timestamp:
07/06/06 11:28:58 (18 years ago)
Author:
mar637
Message:

added scan averaging to average_channel

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STMath.cpp

    r1069 r1078  
    191191CountedPtr< Scantable >
    192192  STMath::averageChannel( const CountedPtr < Scantable > & in,
    193                           const std::string & mode )
     193                          const std::string & mode,
     194                          const std::string& avmode )
    194195{
    195196  // clone as this is non insitu
     
    207208  cols[1] = String("IFNO");
    208209  cols[2] = String("POLNO");
     210  if ( avmode == "SCAN") {
     211    cols.resize(4);
     212    cols[3] = String("SCANNO");
     213  }
    209214  uInt outrowCount = 0;
    210215  uChar userflag = 1 << 7;
     
    222227    specCol.get(0, tmp);
    223228    uInt nchan = tmp.nelements();
     229    // have to do channel by channel here as MaskedArrMath
     230    // doesn't have partialMedians
    224231    Vector<uChar> flags = flagCol.getColumn(Slicer(Slice(0)));
    225232    Vector<Float> outspec(nchan);
  • trunk/src/STMath.h

    r1069 r1078  
    6161  casa::CountedPtr<Scantable>
    6262    averageChannel( const casa::CountedPtr<Scantable> & in,
    63                      const std::string& mode = "MEDIAN");
     63                    const std::string& mode = "MEDIAN",
     64                    const std::string& avmode = "SCAN");
    6465
    6566  casa::CountedPtr< Scantable >
  • trunk/src/STMathWrapper.h

    r1069 r1078  
    4949  ScantableWrapper
    5050    averageChannel( const ScantableWrapper& in,
    51                     const std::string& mode = "MEDIAN")
     51                    const std::string& mode = "MEDIAN",
     52                    const std::string& avmode = "NONE")
    5253  {
    53     return ScantableWrapper(STMath::averageChannel(in.getCP(), mode));
     54    return ScantableWrapper(STMath::averageChannel(in.getCP(), mode, avmode));
    5455  }
    5556
Note: See TracChangeset for help on using the changeset viewer.