// // C++ Interface: STBaselineTable // // Description: // // ApplyTable for baseline subtraction. // // Author: Wataru Kawasaki (C) 2013 // // Copyright: See COPYING file that comes with this distribution // // #ifndef ASAP_BASELINEPARAM_TABLE_H #define ASAP_BASELINEPARAM_TABLE_H #include #include #include "Scantable.h" #include "STApplyTable.h" #include "STBaselineEnum.h" namespace asap { /** ApplyTable for baseline subtraction @author Wataru Kawasaki @date $Date:$ @version $Revision:$ */ class STBaselineTable : public STApplyTable { public: STBaselineTable() {;} STBaselineTable(const Scantable& parent); STBaselineTable(const casa::String &name); virtual ~STBaselineTable(); void setup(); const casa::String& name() const {return name_;}; void attachOptionalColumns(); void save(const std::string &filename); void setdata(casa::uInt irow, casa::uInt scanno, casa::uInt cycleno, casa::uInt beamno, casa::uInt ifno, casa::uInt polno, casa::uInt freqid, casa::Double time, casa::Bool apply, STBaselineFunc::FuncName ftype, casa::Vector fpar, casa::Vector ffpar, casa::Vector mask, casa::Vector res, casa::Float rms, casa::uInt nchan, casa::Float cthres, casa::uInt citer, casa::Float lfthres, casa::uInt lfavg, casa::Vector lfedge); void appenddata(int scanno, int cycleno, int beamno, int ifno, int polno, int freqid, casa::Double time, bool apply, STBaselineFunc::FuncName ftype, vector fpar, vector ffpar, casa::Vector mask, vector res, float rms, int nchan, float cthres, int citer, float lfthres, int lfavg, vector lfedge); void appenddata(int scanno, int cycleno, int beamno, int ifno, int polno, int freqid, casa::Double time, bool apply, STBaselineFunc::FuncName ftype, int fpar, vector ffpar, casa::Vector mask, vector res, float rms, int nchan, float cthres, int citer, float lfthres, int lfavg, vector lfedge); void appenddata(casa::uInt scanno, casa::uInt cycleno, casa::uInt beamno, casa::uInt ifno, casa::uInt polno, casa::uInt freqid, casa::Double time, casa::Bool apply, STBaselineFunc::FuncName ftype, casa::Vector fpar, casa::Vector ffpar, casa::Vector mask, casa::Vector res, casa::Float rms, casa::uInt nchan, casa::Float cthres, casa::uInt citer, casa::Float lfthres, casa::uInt lfavg, casa::Vector lfedge); void appendbasedata(int scanno, int cycleno, int beamno, int ifno, int polno, int freqid, casa::Double time); void setresult(casa::uInt irow, casa::Vector res, casa::Float rms); casa::uInt nchan(casa::uInt ifno); casa::Vector getApply() {return applyCol_.getColumn();} bool getApply(int irow); casa::Vector getFunction() {return ftypeCol_.getColumn();} casa::Vector getFunctionNames(); STBaselineFunc::FuncName getFunctionName(int irow); casa::Matrix getFuncParam() {return fparCol_.getColumn();} std::vector getFuncParam(int irow); casa::Matrix getFuncFParam() {return ffparCol_.getColumn();} casa::Matrix getMaskList() {return maskCol_.getColumn();} std::vector getMask(int irow); casa::Matrix getResult() {return resCol_.getColumn();} casa::Vector getRms() {return rmsCol_.getColumn();} casa::Vector getNChan() {return nchanCol_.getColumn();} casa::uInt getNChan(int irow); casa::Vector getClipThreshold() {return cthresCol_.getColumn();} casa::Vector getClipIteration() {return citerCol_.getColumn();} casa::Vector getLineFinderThreshold() {return lfthresCol_.getColumn();} casa::Vector getLineFinderChanAvg() {return lfavgCol_.getColumn();} casa::Matrix getLineFinderEdge() {return lfedgeCol_.getColumn();} void setApply(int irow, bool apply); private: static const casa::String name_ ; casa::ScalarColumn applyCol_; casa::ScalarColumn ftypeCol_; casa::ArrayColumn fparCol_; casa::ArrayColumn ffparCol_; casa::ArrayColumn maskCol_; casa::ArrayColumn resCol_; casa::ScalarColumn rmsCol_; casa::ScalarColumn nchanCol_; casa::ScalarColumn cthresCol_; casa::ScalarColumn citerCol_; casa::ScalarColumn lfthresCol_; casa::ScalarColumn lfavgCol_; casa::ArrayColumn lfedgeCol_; }; } #endif