- Timestamp:
- 07/30/15 17:11:36 (9 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Scantable.cpp
r3042 r3043 2783 2783 res = doChebyshevFitting(spec, mask, fpar[0], params, rms, finalmask, clipth, clipn); 2784 2784 } else if (ftype == STBaselineFunc::CSpline) { 2785 int nclip = 0; 2786 size_t numChan = spec.size(); 2787 if (cubicSplineModelPool_.find(numChan) == cubicSplineModelPool_.end()) { 2788 cubicSplineModelPool_[numChan] = getPolynomialModel(3, numChan, &Scantable::getNormalPolynomial); 2789 } 2785 2790 if (fpar.size() > 1) { // reading from baseline table in which pieceEdges are already calculated and stored. 2786 res = doCubicSplineFitting(spec, mask, fpar, params, rms, finalmask, clipth, clipn); 2791 //res = doCubicSplineFitting(spec, mask, fpar, params, rms, finalmask, clipth, clipn); 2792 res = doCubicSplineLeastSquareFitting(spec, mask, 2793 cubicSplineModelPool_[numChan], 2794 fpar.size()-1, true, fpar, params, 2795 rms, finalmask, nclip, clipth, 2796 clipn); 2787 2797 } else { // usual cspline fitting by giving nPiece only. fpar will be replaced with pieceEdges. 2788 res = doCubicSplineFitting(spec, mask, fpar[0], fpar, params, rms, finalmask, clipth, clipn); 2798 //res = doCubicSplineFitting(spec, mask, fpar[0], fpar, params, rms, finalmask, clipth, clipn); 2799 res = doCubicSplineLeastSquareFitting(spec, mask, 2800 cubicSplineModelPool_[numChan], 2801 fpar[0], false, fpar, params, 2802 rms, finalmask, nclip, clipth, 2803 clipn); 2789 2804 } 2790 2805 } else if (ftype == STBaselineFunc::Sinusoid) { -
trunk/src/Scantable.h
r3023 r3043 19 19 #include <string> 20 20 #include <vector> 21 #include <map> 21 22 // AIPS++ 22 23 #include <casa/aips.h> … … 993 994 std::vector<float> doSubtractBaseline(std::vector<float>& spec, std::vector<bool>& mask, const STBaselineFunc::FuncName ftype, std::vector<int>& fpar, std::vector<float>& params, float&rms, std::vector<bool>& finalmask, float clipth, int clipn, bool uself, int irow, float lfth, std::vector<int>& lfedge, int lfavg); 994 995 996 // storage of cubic spline model for various number of channels 997 map<size_t, vector< vector<double> > > cubicSplineModelPool_; 998 995 999 }; 996 1000 } // namespace
Note:
See TracChangeset
for help on using the changeset viewer.