Changeset 66
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDMath.cc
r48 r66 62 62 63 63 using namespace atnf_sd; 64 65 static CountedPtr<SDMemTable> SDMath::average(const CountedPtr<SDMemTable>& in) { 64 //using namespace atnf_sd::SDMath; 65 66 CountedPtr<SDMemTable> SDMath::average(const CountedPtr<SDMemTable>& in) { 66 67 Table t = in->table(); 67 68 ROArrayColumn<Float> tsys(t, "TSYS"); … … 122 123 } 123 124 124 staticCountedPtr<SDMemTable>125 CountedPtr<SDMemTable> 125 126 SDMath::quotient(const CountedPtr<SDMemTable>& on, 126 127 const CountedPtr<SDMemTable>& off) { … … 160 161 } 161 162 162 staticCountedPtr<SDMemTable>163 CountedPtr<SDMemTable> 163 164 SDMath::multiply(const CountedPtr<SDMemTable>& in, Float factor) { 164 165 SDMemTable* sdmt = new SDMemTable(*in); … … 175 176 } 176 177 177 staticbool SDMath::fit(Vector<Float>& thefit, const Vector<Float>& data,178 179 178 bool SDMath::fit(Vector<Float>& thefit, const Vector<Float>& data, 179 const Vector<Bool>& mask, 180 const std::string& fitexpr) { 180 181 181 182 LinearFit<Float> fitter; … … 193 194 } 194 195 195 staticCountedPtr<SDMemTable>196 CountedPtr<SDMemTable> 196 197 SDMath::baseline(const CountedPtr<SDMemTable>& in, 197 198 const std::string& fitexpr, … … 238 239 239 240 240 staticCountedPtr<SDMemTable>241 CountedPtr<SDMemTable> 241 242 SDMath::hanning(const CountedPtr<SDMemTable>& in) { 242 243 … … 281 282 } 282 283 283 staticCountedPtr<SDMemTable>284 CountedPtr<SDMemTable> 284 285 SDMath::averages(const Block<CountedPtr<SDMemTable> >& in, 285 286 const Vector<Bool>& mask) { … … 348 349 } 349 350 350 staticCountedPtr<SDMemTable>351 CountedPtr<SDMemTable> 351 352 SDMath::averagePol(const CountedPtr<SDMemTable>& in, 352 353 const Vector<Bool>& mask) { … … 412 413 413 414 414 staticFloat SDMath::rms(const CountedPtr<SDMemTable>& in,415 Float SDMath::rms(const CountedPtr<SDMemTable>& in, 415 416 const std::vector<bool>& mask) { 416 417 Float rmsval; … … 441 442 } 442 443 443 staticCountedPtr<SDMemTable> SDMath::bin(const CountedPtr<SDMemTable>& in,444 CountedPtr<SDMemTable> SDMath::bin(const CountedPtr<SDMemTable>& in, 444 445 Int width) { 445 446 -
trunk/src/SDMath.h
r48 r66 40 40 class SDMemTable; 41 41 42 classSDMath {43 public:44 staticCountedPtr<SDMemTable> average(const CountedPtr<SDMemTable>& in);45 staticCountedPtr<SDMemTable> quotient(const CountedPtr<SDMemTable>& on,42 namespace SDMath { 43 //public: 44 CountedPtr<SDMemTable> average(const CountedPtr<SDMemTable>& in); 45 CountedPtr<SDMemTable> quotient(const CountedPtr<SDMemTable>& on, 46 46 const CountedPtr<SDMemTable>& off); 47 staticCountedPtr<SDMemTable> multiply(const CountedPtr<SDMemTable>& in,47 CountedPtr<SDMemTable> multiply(const CountedPtr<SDMemTable>& in, 48 48 Float factor); 49 49 50 staticCountedPtr<SDMemTable> baseline(const CountedPtr<SDMemTable>& in,50 CountedPtr<SDMemTable> baseline(const CountedPtr<SDMemTable>& in, 51 51 const std::string& fitexpr, 52 52 const std::vector<bool>& mask); 53 staticCountedPtr<SDMemTable> hanning(const CountedPtr<SDMemTable>& in);53 CountedPtr<SDMemTable> hanning(const CountedPtr<SDMemTable>& in); 54 54 55 staticCountedPtr<SDMemTable>55 CountedPtr<SDMemTable> 56 56 averages(const Block<CountedPtr<SDMemTable> >& in, 57 57 const Vector<Bool>& mask); 58 58 59 staticCountedPtr<SDMemTable>59 CountedPtr<SDMemTable> 60 60 averagePol(const CountedPtr<SDMemTable>& in, const Vector<Bool>& mask); 61 61 62 staticFloat rms(const CountedPtr<SDMemTable>& in,62 Float rms(const CountedPtr<SDMemTable>& in, 63 63 const std::vector<bool>& mask); 64 64 65 staticCountedPtr<SDMemTable> bin(const CountedPtr<SDMemTable>& in,66 65 CountedPtr<SDMemTable> bin(const CountedPtr<SDMemTable>& in, 66 Int width); 67 67 68 private: 69 static bool fit(Vector<Float>& thefit, const Vector<Float>& data, 68 bool fit(Vector<Float>& thefit, const Vector<Float>& data, 70 69 const Vector<Bool>& mask, const std::string& fitexpr); 71 70
Note:
See TracChangeset
for help on using the changeset viewer.