- Timestamp:
- 12/01/04 10:59:21 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDFitter.cc
r91 r108 84 84 SpectralEstimate estimator(n); 85 85 estimator.setQ(5); 86 Int mn,mx; 87 mn = 0; 88 mx = m_.nelements()-1; 89 for (uInt i=0; i<m_.nelements();++i) { 90 if (m_[i]) { 91 mn = i; 92 break; 93 } 94 } 95 for (uInt j=m_.nelements()-1; j>=0;--j) { 96 if (m_[j]) { 97 mx = j; 98 break; 99 } 100 } 101 //mn = 0+x_.nelements()/10; 102 //mx = x_.nelements()-x_.nelements()/10; 103 estimator.setRegion(mn,mx); 86 104 //estimator.setWindowing(True); 87 105 SpectralList listGauss = estimator.estimate(x_, y_); … … 89 107 parameters_.resize(n*3); 90 108 uInt count = 0; 91 cout << "n = " << n << endl;92 109 for (uInt i=0; i<n;i++) { 93 110 g = dynamic_cast<Gaussian1D<Float>* >(funcs_[i]); … … 242 259 243 260 std::vector<bool> SDFitter::getFixedParameters() const { 244 if (fixedpar_.nelements() == 0) 245 throw (AipsError("No parameter mask set.")); 246 Vector<Bool> out = fixedpar_; 247 std::vector<bool> stlout; 248 out.tovector(stlout); 249 return stlout; 261 Vector<Bool> out(parameters_.nelements()); 262 if (fixedpar_.nelements() == 0) { 263 out = False; 264 //throw (AipsError("No parameter mask set.")); 265 } else { 266 out = fixedpar_; 267 } 268 std::vector<bool> stlout; 269 out.tovector(stlout); 270 return stlout; 250 271 } 251 272
Note:
See TracChangeset
for help on using the changeset viewer.