Skip to content
Snippets Groups Projects
Commit d061710a authored by Alice Russell's avatar Alice Russell
Browse files

Re #28153 Change how Bk2BkExpConvPV gets the width

parent 80acf94a
No related branches found
No related tags found
No related merge requests found
...@@ -69,11 +69,13 @@ double Bk2BkExpConvPV::fwhm() const { ...@@ -69,11 +69,13 @@ double Bk2BkExpConvPV::fwhm() const {
} }
/** Set FWHM /** 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) { void Bk2BkExpConvPV::setFwhm(const double w) {
UNUSED_ARG(w); this->setParameter("Gamma", 0);
throw std::invalid_argument("Bk2BkExpConvPV is not allowed to set FWHM."); auto sigma2 = std::pow(w, 2) / (8.0 * M_LN2);
this->setParameter("Sigma2", sigma2);
} }
/** Set peak center /** Set peak center
......
...@@ -105,6 +105,7 @@ Bugfixes ...@@ -105,6 +105,7 @@ Bugfixes
- The help button in fitting now finds the relevant page. - 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 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 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. - 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. - 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 - Axes limits of a plot no longer automatically rescale when errorbars are on/off
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment