// // 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 casacore::String &name); virtual ~STBaselineTable(); void setup(); const casacore::String& name() const {return name_;}; void attachOptionalColumns(); void save(const std::string &filename); void setdata(casacore::uInt irow, casacore::uInt scanno, casacore::uInt cycleno, casacore::uInt beamno, casacore::uInt ifno, casacore::uInt polno, casacore::uInt freqid, casacore::Double time, casacore::Bool apply, STBaselineFunc::FuncName ftype, casacore::Vector fpar, casacore::Vector ffpar, casacore::Vector mask, casacore::Vector res, casacore::Float rms, casacore::uInt nchan, casacore::Float cthres, casacore::uInt citer, casacore::Float lfthres, casacore::uInt lfavg, casacore::Vector lfedge); void appenddata(int scanno, int cycleno, int beamno, int ifno, int polno, int freqid, casacore::Double time, bool apply, STBaselineFunc::FuncName ftype, vector fpar, vector ffpar, casacore::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, casacore::Double time, bool apply, STBaselineFunc::FuncName ftype, int fpar, vector ffpar, casacore::Vector mask, vector res, float rms, int nchan, float cthres, int citer, float lfthres, int lfavg, vector lfedge); void appenddata(casacore::uInt scanno, casacore::uInt cycleno, casacore::uInt beamno, casacore::uInt ifno, casacore::uInt polno, casacore::uInt freqid, casacore::Double time, casacore::Bool apply, STBaselineFunc::FuncName ftype, casacore::Vector fpar, casacore::Vector ffpar, casacore::Vector mask, casacore::Vector res, casacore::Float rms, casacore::uInt nchan, casacore::Float cthres, casacore::uInt citer, casacore::Float lfthres, casacore::uInt lfavg, casacore::Vector lfedge); void appendbasedata(int scanno, int cycleno, int beamno, int ifno, int polno, int freqid, casacore::Double time); void setresult(casacore::uInt irow, casacore::Vector res, casacore::Float rms); casacore::uInt nchan(casacore::uInt ifno); casacore::Vector getApply() {return applyCol_.getColumn();} bool getApply(int irow); casacore::Vector getFunction() {return ftypeCol_.getColumn();} casacore::Vector getFunctionNames(); STBaselineFunc::FuncName getFunctionName(int irow); casacore::Matrix getFuncParam() {return fparCol_.getColumn();} std::vector getFuncParam(int irow); casacore::Matrix getFuncFParam() {return ffparCol_.getColumn();} casacore::Matrix getMaskList() {return maskCol_.getColumn();} std::vector getMask(int irow); casacore::Matrix getResult() {return resCol_.getColumn();} casacore::Vector getRms() {return rmsCol_.getColumn();} casacore::Vector getNChan() {return nchanCol_.getColumn();} casacore::uInt getNChan(int irow); casacore::Vector getClipThreshold() {return cthresCol_.getColumn();} casacore::Vector getClipIteration() {return citerCol_.getColumn();} casacore::Vector getLineFinderThreshold() {return lfthresCol_.getColumn();} casacore::Vector getLineFinderChanAvg() {return lfavgCol_.getColumn();} casacore::Matrix getLineFinderEdge() {return lfedgeCol_.getColumn();} void setApply(int irow, bool apply); private: static const casacore::String name_ ; casacore::ScalarColumn applyCol_; casacore::ScalarColumn ftypeCol_; casacore::ArrayColumn fparCol_; casacore::ArrayColumn ffparCol_; casacore::ArrayColumn maskCol_; casacore::ArrayColumn resCol_; casacore::ScalarColumn rmsCol_; casacore::ScalarColumn nchanCol_; casacore::ScalarColumn cthresCol_; casacore::ScalarColumn citerCol_; casacore::ScalarColumn lfthresCol_; casacore::ScalarColumn lfavgCol_; casacore::ArrayColumn lfedgeCol_; }; } #endif