void PolynomialFit::setOrder(int order) { d_order = order; d_p = d_order + 1; freeWorkspace(); initWorkspace(d_p); d_formula = generateFormula(d_order); d_param_names = generateParameterList(d_order); d_param_explain.clear(); for (int i=0; i<d_p; i++) d_param_explain << ""; }
void MultiPeakFit::setNumPeaks(int n) { d_peaks = n; if (d_profile == Gauss) d_explanation = tr("Gauss Fit"); else d_explanation = tr("Lorentz Fit"); if (d_peaks > 1) d_explanation += "(" + QString::number(d_peaks) +") " + tr("multi-peak"); freeWorkspace(); d_p = 3*d_peaks + 1; initWorkspace(d_p); d_param_names = generateParameterList(d_peaks); d_param_explain = generateExplanationList(d_peaks); d_formula = generateFormula(d_peaks, d_profile); }