diff --git a/Framework/CurveFitting/src/Functions/Bk2BkExpConvPV.cpp b/Framework/CurveFitting/src/Functions/Bk2BkExpConvPV.cpp index 7196b8f0bf35da84e129e85537e40ff40ed5b806..cd97ac340d42e852e8f6194a7c78039a603617ba 100644 --- a/Framework/CurveFitting/src/Functions/Bk2BkExpConvPV.cpp +++ b/Framework/CurveFitting/src/Functions/Bk2BkExpConvPV.cpp @@ -69,11 +69,13 @@ double Bk2BkExpConvPV::fwhm() const { } /** Set FWHM - * It is an illegal operation of this type of peak + * This cannot be set directly so we assume Gamma is 0 and set Sigma by doing + * the reverse of calHandEta */ void Bk2BkExpConvPV::setFwhm(const double w) { - UNUSED_ARG(w); - throw std::invalid_argument("Bk2BkExpConvPV is not allowed to set FWHM."); + this->setParameter("Gamma", 0); + auto sigma2 = std::pow(w, 2) / (8.0 * M_LN2); + this->setParameter("Sigma2", sigma2); } /** Set peak center diff --git a/docs/source/release/v5.0.0/mantidworkbench.rst b/docs/source/release/v5.0.0/mantidworkbench.rst index a4d7290537d9b645c89c31edb3b73355bb022f31..deb7095b4b14cdb261c0da3338b5ea4da91542b4 100644 --- a/docs/source/release/v5.0.0/mantidworkbench.rst +++ b/docs/source/release/v5.0.0/mantidworkbench.rst @@ -105,6 +105,7 @@ Bugfixes - The help button in fitting now finds the relevant page. - Fixed an issue with changing normalisation on single spectra plots done from a script - Fixed an issue where fitting a distribution workspace was normalised twice. +- Fixed an issue where adding a Bk2BkExpConvPV function to the fit browser caused a crash - Overplots will be normalized by bin width if they are overplotting a curve from a workspace which is a distribution. - Several bugs in the way Python scripts were parsed and executed, including blank lines after a colon and tabs in strings, have been fixed. - Axes limits of a plot no longer automatically rescale when errorbars are on/off