Model with extended likelihood function using pm.DensityDist or pm.Potential

Similar question appeared before: https://discourse.pymc.io/search?q=spectrum%20gaussian, where I think the below two posts might help also in your case: Fitting a spectra of gaussians, Interpolated PDF in a Mixture Model.