- Timestamp:
- 07/15/04 15:59:46 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDMemTableWrapper.h
r41 r51 36 36 37 37 #include "SDMemTable.h" 38 #include "SDReader.h"39 #include "SDMath.h"40 38 41 39 namespace atnf_sd { … … 58 56 return SDMemTableWrapper(*this, scan); 59 57 } 60 std::vector<float> getSpectrum(int whichRow ) const {58 std::vector<float> getSpectrum(int whichRow=0) const { 61 59 return table_->getSpectrum(whichRow); 62 60 } … … 68 66 } 69 67 70 float getTsys(int whichRow ) {return table_->getTsys(whichRow);}71 double getTime(int whichRow) {return table_->getTime(whichRow);}68 float getTsys(int whichRow=0) {return table_->getTsys(whichRow);} 69 std::string getTime(int whichRow=0) {return table_->getTime(whichRow);} 72 70 73 std::vector<bool> getMask(int whichRow ) const {71 std::vector<bool> getMask(int whichRow=0) const { 74 72 return table_->getMask(whichRow); 75 73 } 76 74 bool setMask(const std::vector<int> mvals) const { 77 75 return table_->setMask(mvals); 78 76 } 79 77 80 std::string getSourceName(int whichRow ) {78 std::string getSourceName(int whichRow=0) { 81 79 return table_->getSourceName(whichRow); 82 80 } … … 94 92 int nPol() {return table_->nPol();} 95 93 int nChan() {return table_->nChan();} 94 int nScans() {return table_->nScans();} 96 95 97 96 //sets the mask … … 109 108 }; 110 109 111 class SDReaderWrapper : public SDReader {112 public:113 SDReaderWrapper() {;}114 SDReaderWrapper(SDMemTableWrapper tbl) :115 SDReader(tbl.getCP()){;}116 SDMemTableWrapper getSDMemTable() const {117 return SDMemTableWrapper(getTable());118 }119 };120 121 class SDMathWrapper {122 public:123 SDMemTableWrapper average(const SDMemTableWrapper& sdt) {124 return SDMemTableWrapper(SDMath::average(sdt.getCP()));125 }126 SDMemTableWrapper quotient(const SDMemTableWrapper& on,127 const SDMemTableWrapper& off) {128 return SDMemTableWrapper(SDMath::quotient(on.getCP(),129 off.getCP()));130 }131 SDMemTableWrapper multiply(const SDMemTableWrapper& in,132 Float factor) {133 return SDMemTableWrapper(SDMath::multiply(in.getCP(),factor));134 }135 136 SDMemTableWrapper hanning(const SDMemTableWrapper& in) {137 return SDMemTableWrapper(SDMath::hanning(in.getCP()));138 }139 std::vector<float> baseline(const SDMemTableWrapper& in, const std::string& fitexpr) {140 return SDMath::baseline(in.getCP(), fitexpr);141 }142 };143 144 110 } // namespace 145 146 111 #endif 147
Note:
See TracChangeset
for help on using the changeset viewer.