Changeset 2569
- Timestamp:
- 06/14/12 13:07:35 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/hpc33/src/STFitter.cpp
r2394 r2569 376 376 377 377 // Fit 378 Vector<Float> sigma(x_.nelements());379 sigma = 1.0;378 // Vector<Float> sigma(x_.nelements()); 379 // sigma = 1.0; 380 380 381 381 parameters_.resize(); 382 parameters_ = fitter.fit(x_, y_, sigma, &m_); 382 // parameters_ = fitter.fit(x_, y_, sigma, &m_); 383 parameters_ = fitter.fit(x_, y_, &m_); 383 384 if ( !fitter.converged() ) { 384 385 return false; … … 398 399 // use fitter.residual(model=True) to get the model 399 400 thefit_.resize(x_.nelements()); 400 fitter.residual(thefit_,x_,True); 401 // model = data - residual 402 // fitter.residual(thefit_,x_,True); 403 thefit_ = y_ - residual_ ; 401 404 return true; 402 405 } … … 417 420 418 421 // Fit 419 Vector<Float> sigma(x_.nelements());420 sigma = 1.0;422 // Vector<Float> sigma(x_.nelements()); 423 // sigma = 1.0; 421 424 422 425 parameters_.resize(); 423 parameters_ = fitter.fit(x_, y_, sigma, &m_); 426 // parameters_ = fitter.fit(x_, y_, sigma, &m_); 427 parameters_ = fitter.fit(x_, y_, &m_); 424 428 std::vector<float> ps; 425 429 parameters_.tovector(ps); … … 436 440 // use fitter.residual(model=True) to get the model 437 441 thefit_.resize(x_.nelements()); 438 fitter.residual(thefit_,x_,True); 442 // model = data - residual 443 // fitter.residual(thefit_,x_,True); 444 thefit_ = y_ - residual_ ; 439 445 return true; 440 446 }
Note:
See TracChangeset
for help on using the changeset viewer.