I’m using EndErfc to model a step function in some data (a muon range curve). The function erf or erfc isn’t in the restricted set available in UserFunction and it’s too much work for a one off fit to write my own Python function.
Expected behaviour
Should work as documented. With A negative the curve should drop from a higher to a lower value. Ideally the documented restriction that D>=0 should not be here, the user should have the choice to apply that constraint to the fit when appropriate.
Actual behavior
It’s OK with increasing data (A positive). With parameter A negative, the function returns a flat line with value dependent on A but not on the background term D. Therefore the fit fails on decreasing data.
Steps to reproduce the behavior
Find some data with a decreasing step function. Use this function to try to fit it. Use EvaluateFunction and play around with the parameters.
Platforms affected
Noticed in Mantid 3.9, Windows - not used it before.