It’s possible I don’t understand the details of fit function syntax, but this seems to be a bug to me:
I have 2 functions that are identical, but one has a background added. I can’t seem to set constraints in the function with background (ValueError: ParamFunction LinearBackground does not have parameter (f0.Centre).) although as far as I can tell this should be unchanged by adding the background.
I’m running the nightly (5.0.20200909.1539) on macOS 10.13.6
from mantid.simpleapi import *
import matplotlib.pyplot as plt
import numpy as np
d = DeltaFunction(Height=1, Centre=0)
r = Resolution(Workspace = 'resolution')
l = Lorentzian(Amplitude = 50., PeakCentre = 0.0, FWHM = 0.05)
lin = LinearBackground(A0=0.3)
DelLor = CompositeFunction(Convolution(r,(d+l)))
DelLor.tie({'f0.f1.f0.Centre' : 'f0.f1.f1.PeakCentre'})
DelLorBG = CompositeFunction(Convolution(r,(d+l)) + lin)
DelLorBG.tie({'f0.f1.f0.Centre' : 'f0.f1.f1.PeakCentre'})