// // C++ Interface: STMathWrapper // // Description: // // // Author: Malte Marquarding , (C) 2006 // // Copyright: See COPYING file that comes with this distribution // // #ifndef ASAPSTMATHWRAPPER_H #define ASAPSTMATHWRAPPER_H #include #include #include #include "STMath.h" #include "Scantable.h" #include "ScantableWrapper.h" namespace asap { /** Wrapper class to handle ScantableWrapper @author Malte Marquarding */ class STMathWrapper : public STMath { public: STMathWrapper() {;} explicit STMathWrapper(bool insitu) : STMath(insitu) {;} virtual ~STMathWrapper() {;} ScantableWrapper average( const std::vector& in, const std::vector& mask, const std::string& weight, const std::string& avmode ) { std::vector > sts; for (unsigned int i=0; i& mask, const std::string& weight) { return ScantableWrapper(STMath::averagePolarisations(in.getCP(),mask, weight));} ScantableWrapper averageBeams( const ScantableWrapper& in, const std::vector& mask, const std::string& weight) { return ScantableWrapper(STMath::averageBeams(in.getCP(),mask, weight));} ScantableWrapper unaryOperate( const ScantableWrapper& in, float val, const std::string& mode, bool tsys=false ) { return ScantableWrapper(STMath::unaryOperate(in.getCP(), val, mode, tsys)); } ScantableWrapper binaryOperate( const ScantableWrapper& left, const ScantableWrapper& right, const std::string& mode) { return ScantableWrapper( STMath::binaryOperate( left.getCP(), right.getCP(), mode ) ); } ScantableWrapper autoQuotient( const ScantableWrapper& in, const std::string& mode = "NEAREST", bool preserve = true ) { return ScantableWrapper(STMath::autoQuotient(in.getCP(), mode, preserve)); } ScantableWrapper quotient( const ScantableWrapper& on, const ScantableWrapper& off, bool preserve = true ) { return ScantableWrapper( STMath::quotient( on.getCP(), off.getCP(), preserve ) ); } ScantableWrapper dototalpower( const ScantableWrapper& calon, const ScantableWrapper& caloff, casa::Float tcal= 0 ) { return ScantableWrapper( STMath::dototalpower( calon.getCP(), caloff.getCP(), tcal ) ); } ScantableWrapper dosigref( const ScantableWrapper& sig, const ScantableWrapper& ref, int smoothref = 0, casa::Float tsysv=0.0, casa::Float tau=0.0) { return ScantableWrapper( STMath::dosigref( sig.getCP(), ref.getCP(), smoothref, tsysv, tau ) ); } ScantableWrapper donod( const ScantableWrapper& s, const std::vector& scans, int smoothref = 0, casa::Float tsysv=0.0, casa::Float tau=0.0, casa::Float tcal=0.0 ) { return ScantableWrapper( STMath::donod( s.getCP(), scans, smoothref, tsysv, tau, tcal ) ); } ScantableWrapper dofs( const ScantableWrapper& s, const std::vector& scans, int smoothref = 0, casa::Float tsysv=0.0, casa::Float tau=0.0, casa::Float tcal=0.0 ) { return ScantableWrapper( STMath::dofs( s.getCP(), scans, smoothref, tsysv, tau, tcal ) ); } ScantableWrapper freqSwitch( const ScantableWrapper& in ) { return ScantableWrapper(STMath::freqSwitch(in.getCP())); } std::vector statistic(const ScantableWrapper& in, const std::vector& mask, const std::string& which) { return STMath::statistic(in.getCP(), mask, which); } ScantableWrapper bin( const ScantableWrapper& in, int width=5) { return ScantableWrapper(STMath::bin(in.getCP(), width)); } ScantableWrapper resample(const ScantableWrapper& in, const std::string& method, float width) { return ScantableWrapper(STMath::resample(in.getCP(), method, width)); } ScantableWrapper smooth(const ScantableWrapper& in, const std::string& kernel, float width, int order=2) { return ScantableWrapper(STMath::smooth(in.getCP(), kernel, width, order)); } ScantableWrapper gainElevation(const ScantableWrapper& in, const std::vector& coeff, const std::string& filename, const std::string& method) { return ScantableWrapper(STMath::gainElevation(in.getCP(), coeff, filename, method)); } ScantableWrapper convertFlux(const ScantableWrapper& in, float d, float etaap, float jyperk) { return ScantableWrapper(STMath::convertFlux(in.getCP(), d, etaap, jyperk)); } ScantableWrapper opacity(const ScantableWrapper& in, const std::vector& tau) { return ScantableWrapper(STMath::opacity(in.getCP(), tau)); } ScantableWrapper merge(const std::vector& in) { std::vector > sts; for (unsigned int i=0; i