- Timestamp:
- 11/25/15 18:57:32 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STFitter.cpp
r3083 r3087 88 88 throw (AipsError("No x/y data specified.")); 89 89 90 if (funcs_.size() == 0) { 91 throw AipsError("No fit function specified."); 92 } 93 90 94 if (dynamic_cast<Gaussian1D<Float>* >(funcs_[0]) == 0) 91 95 return false; … … 115 119 SpectralList listGauss = estimator.estimate(x_, y_); 116 120 parameters_.resize(n*3); 117 //Gaussian1D<Float>* g = 0;118 //for (uInt i=0; i<n;i++) {119 //g = dynamic_cast<Gaussian1D<Float>* >(funcs_[i]);120 //if (g) {121 // const GaussianSpectralElement *gauss = 122 //dynamic_cast<const GaussianSpectralElement *>(listGauss[i]) ;123 //(*g)[0] = gauss->getAmpl();124 //(*g)[1] = gauss->getCenter();125 // (*g)[2] = gauss->getFWHM(); 126 ///*127 //(*g)[0] = listGauss[i].getAmpl();128 //(*g)[1] = listGauss[i].getCenter();129 //(*g)[2] = listGauss[i].getFWHM();130 //*/131 //}132 //}121 Gaussian1D<Float>* g = 0; 122 for (uInt i=0; i<n;i++) { 123 g = dynamic_cast<Gaussian1D<Float>* >(funcs_[i]); 124 if (g) { 125 const GaussianSpectralElement *gauss = 126 dynamic_cast<const GaussianSpectralElement *>(listGauss[i]) ; 127 (*g)[0] = gauss->getAmpl(); 128 (*g)[1] = gauss->getCenter(); 129 (*g)[2] = gauss->getFWHM(); 130 /* 131 (*g)[0] = listGauss[i].getAmpl(); 132 (*g)[1] = listGauss[i].getCenter(); 133 (*g)[2] = listGauss[i].getFWHM(); 134 */ 135 } 136 } 133 137 estimate_.resize(); 134 138 listGauss.evaluate(estimate_,x_);
Note:
See TracChangeset
for help on using the changeset viewer.