I just tried fitting your dataset in SasView, Pas.
I don't have a back-to-back exponential model (one could be written) so used a
Lorentzian peak model instead.
When I used our L-M optimiser I had to give it a starting peak position 'in the ball
park' before it would latch on. No surprise there.
Then I cleared that fit and tried again with our DREAM optimiser.
https://www.sasview.org/docs/user/qtgui/Perspectives/Fitting/optimizer.html
On the first attempt I was trying to optimise scale, background and peak position at the
same time. This failed to find a good solution, but the output showed me that scale and
background were heavily correlated. So I cleared that fit and tried again with DREAM but
this time I fixed background at 0.0. I then deliberately set the starting values of scale
and peak position to 1.0; ie, way off the expected solution. DREAM got the fit in seconds.
I then refined the background and width.
The SasView optimisers are from a NIST package called bumps. It's available on pypi.
Steve
From: Pascal Manuel - STFC UKRI <pascal.manuel(a)stfc.ac.uk>
Sent: 23 November 2023 17:13
To: Hampson, Thomas (STFC,RAL,ISIS) <thomas.hampson(a)stfc.ac.uk>uk>;
mpb(a)mantidproject.org
Subject: [Mpb] Re: Mantid fitting engine replacement
Dear Tom,
Here is an example of data, python script generated from mantid fitting (sent as txt as
our mailing system does not like sending .py file) and a plot that shows how bad the fit
is, although mantid believe this is a perfectly acceptable fit.
If you get the starting parameters near spot on, it will eventually refine.
This is trying to fit a back to back expo, typical of time of flight data on a
diffractometer (but I have seen similar things with simple gaussian!)
Other programs (also using LM methods) do a good job. in particular, the python fitting
routines seem to do the job.
Hope this helps,
P
Dr Pascal Manuel
ISIS Pulsed Neutron and Muon Facility
STFC Rutherford Appleton Laboratory
Chilton
Oxfordshire OX11 0QX
United Kingdom
Office: + 44 (0)1235 446290
Beamline : +44 (0)1235 567080
Mobile: +44(0) 7833 965011 (also for WhatsApp)
ZoomID :
https://ukri.zoom.us/j/5735149151
Skype : pascal.manuel73
________________________________
From: Hampson, Thomas (STFC,RAL,ISIS) <thomas.hampson(a)stfc.ac.uk>
Sent: Wednesday, November 22, 2023 5:32 PM
To: ISIS Instrument Scientist <ISISInstsci(a)stfc.ac.uk>
Cc: Foxley, Sarah (STFC,RAL,ISIS) <sarah.foxley(a)stfc.ac.uk>uk>; Farooq, Rabiya
(STFC,RAL,ISIS) <Rabiya.Farooq(a)stfc.ac.uk>uk>; Haigh, Jonathan (STFC,RAL,ISIS)
<Jonathan.Haigh(a)stfc.ac.uk>
Subject: RE: Mantid fitting engine replacement
Hi All,
Many thanks to those of you who have replied so far with examples that demonstrate the
limitations of our current fitting framework. I will respond to you individually shortly
to make sure I have enough information to add them to the fitbenchmarking dataset.
If anyone else has any examples of problems they've had with fitting in Mantid then I
would be grateful for your response. More data will help us make a better informed
decision about the potential replacement of the fitting engine.
Regards,
Tom Hampson
From: Hampson, Thomas (STFC,RAL,ISIS)
Sent: 08 November 2023 12:38
To: ISIS Instrument Scientist <ISISInstsci(a)stfc.ac.uk>
Cc: Foxley, Sarah (STFC,RAL,ISIS) <sarah.foxley(a)stfc.ac.uk>uk>; Farooq, Rabiya
(STFC,RAL,ISIS) <Rabiya.Farooq(a)stfc.ac.uk>uk>; Haigh, Jonathan (STFC,RAL,ISIS)
<jonathan.haigh(a)stfc.ac.uk>
Subject: Mantid fitting engine replacement
Dear ISIS Instrument Scientists,
We are in the process of evaluating potential replacements for the Mantid fitting engine
and need your input. We are seeking real examples that will help us quantify the
limitations of the current engine.
Specifically, we would appreciate your feedback on any issues you've encountered with
the Mantid fitting engine, such as:
- Sensitivity to initial parameter values
- Slow performance
- Getting stuck in local minima
To assist us in this evaluation, please provide examples with the following information:
- Fit function used
- Data used in the fit
- Fit range
- Initial parameter values
- Any additional information you believe is relevant
The data you provide will be used with the FitBenchmarking tool, maintained by RSE in
ISIS. This will help us determine whether there is a more suitable replacement.
We also welcome any general feedback on the fitting in Mantid and the fitting interface.
The deadline for your input is the end of November.
Your contributions will greatly assist us in making informed decisions about the future of
the Mantid fitting engine.
Thank you for your assistance.
Sincerely,
Tom Hampson (on behalf of the Mantid team)