mantid icon indicating copy to clipboard operation
mantid copied to clipboard

Prevent Mantid crash when fitting Gaussian peaks for a CrystalFieldFunction

Open SilkeSchomann opened this issue 2 years ago • 0 comments

Description of work.

Added check for height ties based on sigma for Gaussian peaks within a CrystalFieldFunction to void IFunction::sortTies(). In this case the tie is not sorted but still applied as usual for its respective peak function. The sortTies function does not differentiate between ties applied to individual peaks separately and ties that can potentially influence each other. This caused Mantid crashes for multisite CrystalField objects with Gaussian peaks as Gaussian peaks automatically have a tie based on sigma for its height.

To test:

Run the script from the original issue 34245 and check it works.

Fixes #34245


Reviewer

Please comment on the following (full description):

Code Review
  • Is the code of an acceptable quality?
  • Does the code conform to the coding standards?
  • Are the unit tests small and test the class in isolation?
  • If there is GUI work does it follow the GUI standards?
  • If there are changes in the release notes then do they describe the changes appropriately?
  • Are the release notes saved in a separate file, using Issue or PR number for file name and in the correct location?
Functional Tests
  • Do changes function as described? Add comments below that describe the tests performed?
  • Do the changes handle unexpected situations, e.g. bad input?
  • Has the relevant (user and developer) documentation been added/updated?

Does everything look good? Mark the review as Approve. A member of @mantidproject/gatekeepers will take care of it.

SilkeSchomann avatar Aug 11 '22 12:08 SilkeSchomann