Changeset 2569 for branches


Ignore:
Timestamp:
06/14/12 13:07:35 (12 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-2816

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Skip to call residual method to get model (fitted result).
Instead model is calculated as data-residual.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/hpc33/src/STFitter.cpp

    r2394 r2569  
    376376
    377377  // Fit
    378   Vector<Float> sigma(x_.nelements());
    379   sigma = 1.0;
     378//   Vector<Float> sigma(x_.nelements());
     379//   sigma = 1.0;
    380380
    381381  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_); 
    383384  if ( !fitter.converged() ) {
    384385     return false;
     
    398399  // use fitter.residual(model=True) to get the model
    399400  thefit_.resize(x_.nelements());
    400   fitter.residual(thefit_,x_,True);
     401  // model = data - residual
     402//   fitter.residual(thefit_,x_,True);
     403  thefit_ = y_ - residual_ ;
    401404  return true;
    402405}
     
    417420
    418421  // Fit
    419   Vector<Float> sigma(x_.nelements());
    420   sigma = 1.0;
     422//   Vector<Float> sigma(x_.nelements());
     423//   sigma = 1.0;
    421424
    422425  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_);
    424428  std::vector<float> ps;
    425429  parameters_.tovector(ps);
     
    436440  // use fitter.residual(model=True) to get the model
    437441  thefit_.resize(x_.nelements());
    438   fitter.residual(thefit_,x_,True);
     442  // model = data - residual
     443//   fitter.residual(thefit_,x_,True);
     444  thefit_ = y_ - residual_ ;
    439445  return true;
    440446}
Note: See TracChangeset for help on using the changeset viewer.