Changeset 1516 for branches


Ignore:
Timestamp:
02/24/09 14:12:51 (16 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: Yes (CAS-1079)

Ready to Release: Yes

Interface Changes: Yes

What Interface Changed: Changed names of functions

  1. (NEW) std::vector<int> asap::python::stmath::_minmaxchan (OLD) std::vector<int> asap::python::stmath::_minmaxpos @python_STMath.cpp
  2. (NEW) std::vector<int> STMathWrapper::minMaxChan (OLD) std::vector<int> STMathWrapper::minMaxPos @STMathWrapper.h
  3. (NEW) std::vector<int> STMath::minMaxChan (OLD) std::vector<int> STMath::minMaxPos @STMath.h & .cpp

Test Programs:

Run scantable.stats() with the parameter stat='min_abc' or 'max_abc',
and you(ll get min/max value with its position.
Notice that parameter names to select in scantable.stats() are also changed.

Put in Release Notes: No

Module(s): scantable.stats()

Description:

The names of functions are changed from rev. 1514.

These modifications are to return min/max value with its
position (channel/frequency/velocity) by running scantable.stats().

Diagram:
scantable.stats() ->asap::python::stmath::_minmaxchan
-> STMathWrapper::minMaxChan -> STMath::minMaxChan() -> mathutil::minMaxPos()
-> casa::minMax (@casacore/casa/casa/Arrays/MaskArrMath.tcc)


Location:
branches/alma/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/alma/src/MathUtils.cpp

    r1514 r1516  
    8484   String str(which);
    8585   str.upcase();
    86    if (str.matches(String("MINPOS"))) {
     86   if (str.matches(String("MIN_ABC"))) {
    8787     return minPos;
    88    } else if (str.matches(String("MAXPOS"))) {
     88   } else if (str.matches(String("MAX_ABC"))) {
    8989     return maxPos;
    9090   } else {
  • branches/alma/src/STMath.cpp

    r1514 r1516  
    10971097}
    10981098
    1099 std::vector< int > STMath::minMaxPos( const CountedPtr< Scantable > & in,
     1099std::vector< int > STMath::minMaxChan( const CountedPtr< Scantable > & in,
    11001100                                        const std::vector< bool > & mask,
    11011101                                        const std::string& which )
     
    11131113    if (ma.ndim() != 1) {
    11141114      throw (ArrayError(
    1115           "std::vector<int> STMath::minMaxPos("
     1115          "std::vector<int> STMath::minMaxChan("
    11161116          "ContedPtr<Scantable> &in, std::vector<bool> &mask, "
    11171117          " std::string &which)"
  • branches/alma/src/STMath.h

    r1514 r1516  
    207207                               const std::string& which);
    208208
    209   std::vector< int > minMaxPos(const casa::CountedPtr<Scantable>& in,
    210                                const std::vector<bool>& mask,
    211                                const std::string& which);
     209  std::vector< int > minMaxChan(const casa::CountedPtr<Scantable>& in,
     210                                const std::vector<bool>& mask,
     211                                const std::string& which);
    212212
    213213  casa::CountedPtr<Scantable> bin( const casa::CountedPtr<Scantable>& in,
  • branches/alma/src/STMathWrapper.h

    r1514 r1516  
    121121  { return STMath::statistic(in.getCP(), mask, which); }
    122122
    123   std::vector<int> minMaxPos(const ScantableWrapper& in,
     123  std::vector<int> minMaxChan(const ScantableWrapper& in,
    124124                               const std::vector<bool>& mask,
    125125                               const std::string& which)
    126   { return STMath::minMaxPos(in.getCP(), mask, which); }
     126  { return STMath::minMaxChan(in.getCP(), mask, which); }
    127127
    128128  ScantableWrapper bin( const ScantableWrapper& in, int width=5)
  • branches/alma/src/python_STMath.cpp

    r1514 r1516  
    5757        .def("_dofs", &STMathWrapper::dofs)
    5858        .def("_stats", &STMathWrapper::statistic)
    59         .def("_minmaxpos", &STMathWrapper::minMaxPos)
     59        .def("_minmaxchan", &STMathWrapper::minMaxChan)
    6060        .def("_freqswitch", &STMathWrapper::freqSwitch)
    6161        .def("_bin", &STMathWrapper::bin)
Note: See TracChangeset for help on using the changeset viewer.