void ALCBaselineModellingPresenter::updateFunction() {
  if (IFunction_const_sptr fittedFunc = m_model->fittedFunction()) {
    m_view->setFunction(fittedFunc);
  } else {
    m_view->setFunction(IFunction_const_sptr());
  }
}
Ejemplo n.º 2
0
void ALCPeakFittingPresenter::onFittedPeaksChanged() {
  IFunction_const_sptr fittedPeaks = m_model->fittedPeaks();
  auto dataWS = m_model->data();
  if (fittedPeaks && dataWS) {
    auto x = dataWS->readX(0);
    m_view->setFittedCurve(*(ALCHelper::curveDataFromFunction(fittedPeaks, x)));
    m_view->setFunction(fittedPeaks);
  } else {
    m_view->setFittedCurve(*(ALCHelper::emptyCurveData()));
    m_view->setFunction(IFunction_const_sptr());
  }
}
Ejemplo n.º 3
0
/// Return cost shared pointer to the weight function (creates weight function)
IFunction_const_sptr Laguerre::createWeightDerivative() const
{
  auto fun = new LaguerreWeightDerivative;
  fun->setParameter("Alpha",getParameter("Alpha"));
  return IFunction_const_sptr( fun );
}