Changeset 2968
- Timestamp:
- 07/02/14 19:06:47 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Scantable.cpp
r2950 r2968 3029 3029 &Scantable::getNormalPolynomial, 3030 3030 nChanNos); 3031 int nModel = modelReservoir.size(); 3031 3032 3032 3033 for (int whichrow = 0; whichrow < nRow; ++whichrow) { 3033 3034 std::vector<float> sp = getSpectrum(whichrow); 3034 3035 chanMask = getCompositeChanMask(whichrow, mask); 3035 3036 3036 std::vector<float> params; 3037 int nClipped = 0; 3038 std::vector<float> res = doLeastSquareFitting(sp, chanMask, 3037 3038 if (flagrowCol_(whichrow) == 0) { 3039 int nClipped = 0; 3040 std::vector<float> res; 3041 res = doLeastSquareFitting(sp, chanMask, 3039 3042 modelReservoir[getIdxOfNchan(sp.size(), nChanNos)], 3040 3043 params, rms, finalChanMask, 3041 3044 nClipped, thresClip, nIterClip, getResidual); 3042 3045 3043 if (outBaselineTable) { 3044 bt.appenddata(getScan(whichrow), getCycle(whichrow), getBeam(whichrow), 3045 getIF(whichrow), getPol(whichrow), 0, timeSecCol[whichrow], 3046 true, STBaselineFunc::Polynomial, order, std::vector<float>(), 3047 getMaskListFromMask(finalChanMask), params, rms, sp.size(), 3048 thresClip, nIterClip, 0.0, 0, std::vector<int>()); 3046 if (outBaselineTable) { 3047 bt.appenddata(getScan(whichrow), getCycle(whichrow), getBeam(whichrow), 3048 getIF(whichrow), getPol(whichrow), 0, timeSecCol[whichrow], 3049 true, STBaselineFunc::Polynomial, order, std::vector<float>(), 3050 getMaskListFromMask(finalChanMask), params, rms, sp.size(), 3051 thresClip, nIterClip, 0.0, 0, std::vector<int>()); 3052 } else { 3053 setSpectrum(res, whichrow); 3054 } 3055 3056 outputFittingResult(outLogger, outTextFile, csvFormat, chanMask, whichrow, 3057 coordInfo, hasSameNchan, ofs, "polyBaseline()", 3058 params, nClipped); 3049 3059 } else { 3050 setSpectrum(res, whichrow); 3051 } 3052 3053 outputFittingResult(outLogger, outTextFile, csvFormat, chanMask, whichrow, 3054 coordInfo, hasSameNchan, ofs, "polyBaseline()", 3055 params, nClipped); 3060 if (outBaselineTable) { 3061 params.resize(nModel); 3062 for (uInt i = 0; i < params.size(); ++i) { 3063 params[i] = 0.0; 3064 } 3065 bt.appenddata(getScan(whichrow), getCycle(whichrow), getBeam(whichrow), 3066 getIF(whichrow), getPol(whichrow), 0, timeSecCol[whichrow], 3067 true, STBaselineFunc::Polynomial, order, std::vector<float>(), 3068 getMaskListFromMask(chanMask), params, 0.0, sp.size(), 3069 thresClip, nIterClip, 0.0, 0, std::vector<int>()); 3070 } 3071 } 3072 3056 3073 showProgressOnTerminal(whichrow, nRow, showProgress, minNRow); 3057 3074 } … … 3104 3121 &Scantable::getNormalPolynomial, 3105 3122 nChanNos); 3123 int nModel = modelReservoir.size(); 3106 3124 3107 3125 for (int whichrow = 0; whichrow < nRow; ++whichrow) { … … 3109 3127 std::vector<int> currentEdge; 3110 3128 chanMask = getCompositeChanMask(whichrow, mask, edge, currentEdge, lineFinder); 3111 3112 3129 std::vector<float> params; 3113 int nClipped = 0; 3114 std::vector<float> res = doLeastSquareFitting(sp, chanMask, 3130 3131 if (flagrowCol_(whichrow) == 0) { 3132 int nClipped = 0; 3133 std::vector<float> res; 3134 res = doLeastSquareFitting(sp, chanMask, 3115 3135 modelReservoir[getIdxOfNchan(sp.size(), nChanNos)], 3116 3136 params, rms, finalChanMask, 3117 3137 nClipped, thresClip, nIterClip, getResidual); 3118 3138 3119 if (outBaselineTable) { 3120 bt.appenddata(getScan(whichrow), getCycle(whichrow), getBeam(whichrow), 3121 getIF(whichrow), getPol(whichrow), 0, timeSecCol[whichrow], 3122 true, STBaselineFunc::Polynomial, order, std::vector<float>(), 3123 getMaskListFromMask(finalChanMask), params, rms, sp.size(), 3124 thresClip, nIterClip, threshold, chanAvgLimit, currentEdge); 3139 if (outBaselineTable) { 3140 bt.appenddata(getScan(whichrow), getCycle(whichrow), getBeam(whichrow), 3141 getIF(whichrow), getPol(whichrow), 0, timeSecCol[whichrow], 3142 true, STBaselineFunc::Polynomial, order, std::vector<float>(), 3143 getMaskListFromMask(finalChanMask), params, rms, sp.size(), 3144 thresClip, nIterClip, threshold, chanAvgLimit, currentEdge); 3145 } else { 3146 setSpectrum(res, whichrow); 3147 } 3148 3149 outputFittingResult(outLogger, outTextFile, csvFormat, chanMask, whichrow, 3150 coordInfo, hasSameNchan, ofs, "autoPolyBaseline()", 3151 params, nClipped); 3125 3152 } else { 3126 setSpectrum(res, whichrow); 3127 } 3128 3129 outputFittingResult(outLogger, outTextFile, csvFormat, chanMask, whichrow, 3130 coordInfo, hasSameNchan, ofs, "autoPolyBaseline()", 3131 params, nClipped); 3153 if (outBaselineTable) { 3154 params.resize(nModel); 3155 for (uInt i = 0; i < params.size(); ++i) { 3156 params[i] = 0.0; 3157 } 3158 bt.appenddata(getScan(whichrow), getCycle(whichrow), getBeam(whichrow), 3159 getIF(whichrow), getPol(whichrow), 0, timeSecCol[whichrow], 3160 true, STBaselineFunc::Polynomial, order, std::vector<float>(), 3161 getMaskListFromMask(chanMask), params, 0.0, sp.size(), 3162 thresClip, nIterClip, threshold, chanAvgLimit, currentEdge); 3163 } 3164 } 3165 3132 3166 showProgressOnTerminal(whichrow, nRow, showProgress, minNRow); 3133 3167 } … … 3173 3207 &Scantable::getChebyshevPolynomial, 3174 3208 nChanNos); 3209 int nModel = modelReservoir.size(); 3175 3210 3176 3211 for (int whichrow = 0; whichrow < nRow; ++whichrow) { 3177 3212 std::vector<float> sp = getSpectrum(whichrow); 3178 3213 chanMask = getCompositeChanMask(whichrow, mask); 3179 3180 3214 std::vector<float> params; 3181 int nClipped = 0; 3182 std::vector<float> res = doLeastSquareFitting(sp, chanMask, 3215 3216 if (flagrowCol_(whichrow) == 0) { 3217 int nClipped = 0; 3218 std::vector<float> res; 3219 res = doLeastSquareFitting(sp, chanMask, 3183 3220 modelReservoir[getIdxOfNchan(sp.size(), nChanNos)], 3184 3221 params, rms, finalChanMask, 3185 3222 nClipped, thresClip, nIterClip, getResidual); 3186 3223 3187 if (outBaselineTable) { 3188 bt.appenddata(getScan(whichrow), getCycle(whichrow), getBeam(whichrow), 3189 getIF(whichrow), getPol(whichrow), 0, timeSecCol[whichrow], 3190 true, STBaselineFunc::Chebyshev, order, std::vector<float>(), 3191 getMaskListFromMask(finalChanMask), params, rms, sp.size(), 3192 thresClip, nIterClip, 0.0, 0, std::vector<int>()); 3224 if (outBaselineTable) { 3225 bt.appenddata(getScan(whichrow), getCycle(whichrow), getBeam(whichrow), 3226 getIF(whichrow), getPol(whichrow), 0, timeSecCol[whichrow], 3227 true, STBaselineFunc::Chebyshev, order, std::vector<float>(), 3228 getMaskListFromMask(finalChanMask), params, rms, sp.size(), 3229 thresClip, nIterClip, 0.0, 0, std::vector<int>()); 3230 } else { 3231 setSpectrum(res, whichrow); 3232 } 3233 3234 outputFittingResult(outLogger, outTextFile, csvFormat, chanMask, whichrow, 3235 coordInfo, hasSameNchan, ofs, "chebyshevBaseline()", 3236 params, nClipped); 3193 3237 } else { 3194 setSpectrum(res, whichrow); 3195 } 3196 3197 outputFittingResult(outLogger, outTextFile, csvFormat, chanMask, whichrow, 3198 coordInfo, hasSameNchan, ofs, "chebyshevBaseline()", 3199 params, nClipped); 3238 if (outBaselineTable) { 3239 params.resize(nModel); 3240 for (uInt i = 0; i < params.size(); ++i) { 3241 params[i] = 0.0; 3242 } 3243 bt.appenddata(getScan(whichrow), getCycle(whichrow), getBeam(whichrow), 3244 getIF(whichrow), getPol(whichrow), 0, timeSecCol[whichrow], 3245 true, STBaselineFunc::Chebyshev, order, std::vector<float>(), 3246 getMaskListFromMask(chanMask), params, 0.0, sp.size(), 3247 thresClip, nIterClip, 0.0, 0, std::vector<int>()); 3248 } 3249 } 3250 3200 3251 showProgressOnTerminal(whichrow, nRow, showProgress, minNRow); 3201 3252 } … … 3248 3299 &Scantable::getChebyshevPolynomial, 3249 3300 nChanNos); 3301 int nModel = modelReservoir.size(); 3250 3302 3251 3303 for (int whichrow = 0; whichrow < nRow; ++whichrow) { … … 3253 3305 std::vector<int> currentEdge; 3254 3306 chanMask = getCompositeChanMask(whichrow, mask, edge, currentEdge, lineFinder); 3255 3256 3307 std::vector<float> params; 3257 int nClipped = 0; 3258 std::vector<float> res = doLeastSquareFitting(sp, chanMask, 3308 3309 if (flagrowCol_(whichrow) == 0) { 3310 int nClipped = 0; 3311 std::vector<float> res; 3312 res = doLeastSquareFitting(sp, chanMask, 3259 3313 modelReservoir[getIdxOfNchan(sp.size(), nChanNos)], 3260 3314 params, rms, finalChanMask, 3261 3315 nClipped, thresClip, nIterClip, getResidual); 3262 3316 3263 if (outBaselineTable) { 3264 bt.appenddata(getScan(whichrow), getCycle(whichrow), getBeam(whichrow), 3265 getIF(whichrow), getPol(whichrow), 0, timeSecCol[whichrow], 3266 true, STBaselineFunc::Chebyshev, order, std::vector<float>(), 3267 getMaskListFromMask(finalChanMask), params, rms, sp.size(), 3268 thresClip, nIterClip, threshold, chanAvgLimit, currentEdge); 3317 if (outBaselineTable) { 3318 bt.appenddata(getScan(whichrow), getCycle(whichrow), getBeam(whichrow), 3319 getIF(whichrow), getPol(whichrow), 0, timeSecCol[whichrow], 3320 true, STBaselineFunc::Chebyshev, order, std::vector<float>(), 3321 getMaskListFromMask(finalChanMask), params, rms, sp.size(), 3322 thresClip, nIterClip, threshold, chanAvgLimit, currentEdge); 3323 } else { 3324 setSpectrum(res, whichrow); 3325 } 3326 3327 outputFittingResult(outLogger, outTextFile, csvFormat, chanMask, whichrow, 3328 coordInfo, hasSameNchan, ofs, "autoChebyshevBaseline()", 3329 params, nClipped); 3269 3330 } else { 3270 setSpectrum(res, whichrow); 3271 } 3272 3273 outputFittingResult(outLogger, outTextFile, csvFormat, chanMask, whichrow, 3274 coordInfo, hasSameNchan, ofs, "autoChebyshevBaseline()", 3275 params, nClipped); 3331 if (outBaselineTable) { 3332 params.resize(nModel); 3333 for (uInt i = 0; i < params.size(); ++i) { 3334 params[i] = 0.0; 3335 } 3336 bt.appenddata(getScan(whichrow), getCycle(whichrow), getBeam(whichrow), 3337 getIF(whichrow), getPol(whichrow), 0, timeSecCol[whichrow], 3338 true, STBaselineFunc::Chebyshev, order, std::vector<float>(), 3339 getMaskListFromMask(chanMask), params, 0.0, sp.size(), 3340 thresClip, nIterClip, threshold, chanAvgLimit, currentEdge); 3341 } 3342 } 3343 3276 3344 showProgressOnTerminal(whichrow, nRow, showProgress, minNRow); 3277 3345 } … … 3820 3888 &Scantable::getNormalPolynomial, 3821 3889 nChanNos); 3890 int nDOF = nPiece + 3; 3822 3891 3823 3892 for (int whichrow = 0; whichrow < nRow; ++whichrow) { 3824 3893 std::vector<float> sp = getSpectrum(whichrow); 3825 3894 chanMask = getCompositeChanMask(whichrow, mask); 3826 3827 3895 std::vector<int> pieceEdges; 3828 3896 std::vector<float> params; 3829 int nClipped = 0; 3830 std::vector<float> res = doCubicSplineLeastSquareFitting(sp, chanMask, 3831 modelReservoir[getIdxOfNchan(sp.size(), nChanNos)], 3832 nPiece, false, pieceEdges, params, rms, finalChanMask, 3833 nClipped, thresClip, nIterClip, getResidual); 3834 3835 if (outBaselineTable) { 3836 bt.appenddata(getScan(whichrow), getCycle(whichrow), getBeam(whichrow), 3837 getIF(whichrow), getPol(whichrow), 0, timeSecCol[whichrow], 3838 true, STBaselineFunc::CSpline, pieceEdges, std::vector<float>(), 3839 getMaskListFromMask(finalChanMask), params, rms, sp.size(), 3840 thresClip, nIterClip, 0.0, 0, std::vector<int>()); 3897 3898 if (flagrowCol_(whichrow) == 0) { 3899 int nClipped = 0; 3900 std::vector<float> res; 3901 res = doCubicSplineLeastSquareFitting(sp, chanMask, 3902 modelReservoir[getIdxOfNchan(sp.size(), nChanNos)], 3903 nPiece, false, pieceEdges, params, rms, finalChanMask, 3904 nClipped, thresClip, nIterClip, getResidual); 3905 3906 if (outBaselineTable) { 3907 bt.appenddata(getScan(whichrow), getCycle(whichrow), getBeam(whichrow), 3908 getIF(whichrow), getPol(whichrow), 0, timeSecCol[whichrow], 3909 true, STBaselineFunc::CSpline, pieceEdges, std::vector<float>(), 3910 getMaskListFromMask(finalChanMask), params, rms, sp.size(), 3911 thresClip, nIterClip, 0.0, 0, std::vector<int>()); 3912 } else { 3913 setSpectrum(res, whichrow); 3914 } 3915 3916 outputFittingResult(outLogger, outTextFile, csvFormat, chanMask, whichrow, 3917 coordInfo, hasSameNchan, ofs, "cubicSplineBaseline()", 3918 pieceEdges, params, nClipped); 3841 3919 } else { 3842 setSpectrum(res, whichrow); 3843 } 3844 3845 outputFittingResult(outLogger, outTextFile, csvFormat, chanMask, whichrow, 3846 coordInfo, hasSameNchan, ofs, "cubicSplineBaseline()", 3847 pieceEdges, params, nClipped); 3920 if (outBaselineTable) { 3921 pieceEdges.resize(nPiece+1); 3922 for (uInt i = 0; i < pieceEdges.size(); ++i) { 3923 pieceEdges[i] = 0; 3924 } 3925 params.resize(nDOF); 3926 for (uInt i = 0; i < params.size(); ++i) { 3927 params[i] = 0.0; 3928 } 3929 bt.appenddata(getScan(whichrow), getCycle(whichrow), getBeam(whichrow), 3930 getIF(whichrow), getPol(whichrow), 0, timeSecCol[whichrow], 3931 true, STBaselineFunc::CSpline, pieceEdges, std::vector<float>(), 3932 getMaskListFromMask(chanMask), params, 0.0, sp.size(), 3933 thresClip, nIterClip, 0.0, 0, std::vector<int>()); 3934 } 3935 } 3936 3848 3937 showProgressOnTerminal(whichrow, nRow, showProgress, minNRow); 3849 3938 } … … 3896 3985 &Scantable::getNormalPolynomial, 3897 3986 nChanNos); 3987 int nDOF = nPiece + 3; 3898 3988 3899 3989 for (int whichrow = 0; whichrow < nRow; ++whichrow) { … … 3901 3991 std::vector<int> currentEdge; 3902 3992 chanMask = getCompositeChanMask(whichrow, mask, edge, currentEdge, lineFinder); 3903 3904 3993 std::vector<int> pieceEdges; 3905 3994 std::vector<float> params; 3906 int nClipped = 0; 3907 std::vector<float> res = doCubicSplineLeastSquareFitting(sp, chanMask, 3908 modelReservoir[getIdxOfNchan(sp.size(), nChanNos)], 3909 nPiece, false, pieceEdges, params, rms, finalChanMask, 3910 nClipped, thresClip, nIterClip, getResidual); 3911 3912 if (outBaselineTable) { 3913 bt.appenddata(getScan(whichrow), getCycle(whichrow), getBeam(whichrow), 3914 getIF(whichrow), getPol(whichrow), 0, timeSecCol[whichrow], 3915 true, STBaselineFunc::CSpline, pieceEdges, std::vector<float>(), 3916 getMaskListFromMask(finalChanMask), params, rms, sp.size(), 3917 thresClip, nIterClip, threshold, chanAvgLimit, currentEdge); 3995 3996 if (flagrowCol_(whichrow) == 0) { 3997 int nClipped = 0; 3998 std::vector<float> res; 3999 res = doCubicSplineLeastSquareFitting(sp, chanMask, 4000 modelReservoir[getIdxOfNchan(sp.size(), nChanNos)], 4001 nPiece, false, pieceEdges, params, rms, finalChanMask, 4002 nClipped, thresClip, nIterClip, getResidual); 4003 4004 if (outBaselineTable) { 4005 bt.appenddata(getScan(whichrow), getCycle(whichrow), getBeam(whichrow), 4006 getIF(whichrow), getPol(whichrow), 0, timeSecCol[whichrow], 4007 true, STBaselineFunc::CSpline, pieceEdges, std::vector<float>(), 4008 getMaskListFromMask(finalChanMask), params, rms, sp.size(), 4009 thresClip, nIterClip, threshold, chanAvgLimit, currentEdge); 4010 } else { 4011 setSpectrum(res, whichrow); 4012 } 4013 4014 outputFittingResult(outLogger, outTextFile, csvFormat, chanMask, whichrow, 4015 coordInfo, hasSameNchan, ofs, "autoCubicSplineBaseline()", 4016 pieceEdges, params, nClipped); 3918 4017 } else { 3919 setSpectrum(res, whichrow); 3920 } 3921 3922 outputFittingResult(outLogger, outTextFile, csvFormat, chanMask, whichrow, 3923 coordInfo, hasSameNchan, ofs, "autoCubicSplineBaseline()", 3924 pieceEdges, params, nClipped); 4018 if (outBaselineTable) { 4019 pieceEdges.resize(nPiece+1); 4020 for (uInt i = 0; i < pieceEdges.size(); ++i) { 4021 pieceEdges[i] = 0; 4022 } 4023 params.resize(nDOF); 4024 for (uInt i = 0; i < params.size(); ++i) { 4025 params[i] = 0.0; 4026 } 4027 bt.appenddata(getScan(whichrow), getCycle(whichrow), getBeam(whichrow), 4028 getIF(whichrow), getPol(whichrow), 0, timeSecCol[whichrow], 4029 true, STBaselineFunc::CSpline, pieceEdges, std::vector<float>(), 4030 getMaskListFromMask(chanMask), params, 0.0, sp.size(), 4031 thresClip, nIterClip, threshold, chanAvgLimit, currentEdge); 4032 } 4033 } 4034 3925 4035 showProgressOnTerminal(whichrow, nRow, showProgress, minNRow); 3926 4036 } … … 4561 4671 model = modelReservoir[getIdxOfNchan(sp.size(), nChanNos)]; 4562 4672 } 4673 int nModel = modelReservoir.size(); 4563 4674 4564 4675 std::vector<float> params; 4565 int nClipped = 0; 4566 std::vector<float> res = doLeastSquareFitting(sp, chanMask, model, 4676 4677 if (flagrowCol_(whichrow) == 0) { 4678 int nClipped = 0; 4679 std::vector<float> res; 4680 res = doLeastSquareFitting(sp, chanMask, model, 4567 4681 params, rms, finalChanMask, 4568 4682 nClipped, thresClip, nIterClip, getResidual); 4569 4683 4570 if (outBaselineTable) { 4571 bt.appenddata(getScan(whichrow), getCycle(whichrow), getBeam(whichrow), 4572 getIF(whichrow), getPol(whichrow), 0, timeSecCol[whichrow], 4573 true, STBaselineFunc::Sinusoid, nWaves, std::vector<float>(), 4574 getMaskListFromMask(finalChanMask), params, rms, sp.size(), 4575 thresClip, nIterClip, 0.0, 0, std::vector<int>()); 4684 if (outBaselineTable) { 4685 bt.appenddata(getScan(whichrow), getCycle(whichrow), getBeam(whichrow), 4686 getIF(whichrow), getPol(whichrow), 0, timeSecCol[whichrow], 4687 true, STBaselineFunc::Sinusoid, nWaves, std::vector<float>(), 4688 getMaskListFromMask(finalChanMask), params, rms, sp.size(), 4689 thresClip, nIterClip, 0.0, 0, std::vector<int>()); 4690 } else { 4691 setSpectrum(res, whichrow); 4692 } 4693 4694 outputFittingResult(outLogger, outTextFile, csvFormat, chanMask, whichrow, 4695 coordInfo, hasSameNchan, ofs, "sinusoidBaseline()", 4696 params, nClipped); 4576 4697 } else { 4577 setSpectrum(res, whichrow); 4578 } 4579 4580 outputFittingResult(outLogger, outTextFile, csvFormat, chanMask, whichrow, 4581 coordInfo, hasSameNchan, ofs, "sinusoidBaseline()", 4582 params, nClipped); 4698 if (outBaselineTable) { 4699 params.resize(nModel); 4700 for (uInt i = 0; i < params.size(); ++i) { 4701 params[i] = 0.0; 4702 } 4703 bt.appenddata(getScan(whichrow), getCycle(whichrow), getBeam(whichrow), 4704 getIF(whichrow), getPol(whichrow), 0, timeSecCol[whichrow], 4705 true, STBaselineFunc::Sinusoid, nWaves, std::vector<float>(), 4706 getMaskListFromMask(chanMask), params, 0.0, sp.size(), 4707 thresClip, nIterClip, 0.0, 0, std::vector<int>()); 4708 } 4709 } 4710 4583 4711 showProgressOnTerminal(whichrow, nRow, showProgress, minNRow); 4584 4712 } … … 4652 4780 model = modelReservoir[getIdxOfNchan(sp.size(), nChanNos)]; 4653 4781 } 4782 int nModel = modelReservoir.size(); 4654 4783 4655 4784 std::vector<float> params; 4656 int nClipped = 0; 4657 std::vector<float> res = doLeastSquareFitting(sp, chanMask, model, 4785 4786 if (flagrowCol_(whichrow) == 0) { 4787 int nClipped = 0; 4788 std::vector<float> res; 4789 res = doLeastSquareFitting(sp, chanMask, model, 4658 4790 params, rms, finalChanMask, 4659 4791 nClipped, thresClip, nIterClip, getResidual); 4660 4792 4661 if (outBaselineTable) { 4662 bt.appenddata(getScan(whichrow), getCycle(whichrow), getBeam(whichrow), 4663 getIF(whichrow), getPol(whichrow), 0, timeSecCol[whichrow], 4664 true, STBaselineFunc::Sinusoid, nWaves, std::vector<float>(), 4665 getMaskListFromMask(finalChanMask), params, rms, sp.size(), 4666 thresClip, nIterClip, threshold, chanAvgLimit, currentEdge); 4793 if (outBaselineTable) { 4794 bt.appenddata(getScan(whichrow), getCycle(whichrow), getBeam(whichrow), 4795 getIF(whichrow), getPol(whichrow), 0, timeSecCol[whichrow], 4796 true, STBaselineFunc::Sinusoid, nWaves, std::vector<float>(), 4797 getMaskListFromMask(finalChanMask), params, rms, sp.size(), 4798 thresClip, nIterClip, threshold, chanAvgLimit, currentEdge); 4799 } else { 4800 setSpectrum(res, whichrow); 4801 } 4802 4803 outputFittingResult(outLogger, outTextFile, csvFormat, chanMask, whichrow, 4804 coordInfo, hasSameNchan, ofs, "autoSinusoidBaseline()", 4805 params, nClipped); 4667 4806 } else { 4668 setSpectrum(res, whichrow); 4669 } 4670 4671 outputFittingResult(outLogger, outTextFile, csvFormat, chanMask, whichrow, 4672 coordInfo, hasSameNchan, ofs, "autoSinusoidBaseline()", 4673 params, nClipped); 4807 if (outBaselineTable) { 4808 params.resize(nModel); 4809 for (uInt i = 0; i < params.size(); ++i) { 4810 params[i] = 0.0; 4811 } 4812 bt.appenddata(getScan(whichrow), getCycle(whichrow), getBeam(whichrow), 4813 getIF(whichrow), getPol(whichrow), 0, timeSecCol[whichrow], 4814 true, STBaselineFunc::Sinusoid, nWaves, std::vector<float>(), 4815 getMaskListFromMask(chanMask), params, 0.0, sp.size(), 4816 thresClip, nIterClip, threshold, chanAvgLimit, currentEdge); 4817 } 4818 } 4819 4674 4820 showProgressOnTerminal(whichrow, nRow, showProgress, minNRow); 4675 4821 }
Note:
See TracChangeset
for help on using the changeset viewer.