Ignore:
Timestamp:
02/23/09 20:55:35 (15 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: Yes (CAS-1079)

Ready to Release: Yes

Interface Changes: Yes

What Interface Changed:
Added the new functions to get min/max position (channel) of spectra.

  1. std::vector<int> asap::python::stmath::_minmaxpos(ScantableWrapper?& in,

std::vector<bool>& mask, std::string& which)

@python_STMath.cpp

  1. std::vector<int> STMathWrapper::minMaxPos(ScantableWrapper?& in,

std::vector<bool>& mask, std::string& which)

@STMathWrapper.h

  1. std::vector<int> STMath::minMaxPos(CountedPtr?< Scantable > & in,

std::vector< bool > & mask, std::string& which)

@STMath.h & .cpp

  1. IPosition mathutil::minMaxPos(String& which, MaskedArray?<Float>& data) @MathUtils?.h & .cpp

Test Programs:

Run scantable.stats() with the parameter stat='minpos' or 'maxpos',
and you'll get min/max value with its psition.

Put in Release Notes: No

Module(s): scantable.stats()

Description:

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

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


File:
1 edited

Legend:

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

    r1446 r1514  
    3737#include <casa/Arrays/Vector.h>
    3838#include <casa/BasicSL/String.h>
     39#include <casa/Arrays/IPosition.h>
    3940
    4041namespace mathutil {
     
    7778                 const casa::MaskedArray<casa::Float>& data);
    7879
     80// Return a position of min or max value
     81 casa::IPosition minMaxPos(const casa::String& which,
     82                 const casa::MaskedArray<casa::Float>& data);
     83
    7984// Replace masked value by zero
    8085void replaceMaskByZero(casa::Vector<casa::Float>& data,
Note: See TracChangeset for help on using the changeset viewer.