Closed hartytp closed 2 years ago
PR now ready for review. 🎆
I personally avoid that and instead have a FitterBase class (or just Fitter: "base" is a bit of noise word)
Agreed
Todo:
@mbirtwell @AUTProgram I've reshuffled things a bit. In particular:
The ModelParameter
now contains all metadata associated with the parameter (including initial values) as well as a few simple methods for manipulating that metadata. This is the only source of truth for that data anywhere. This means that to change the fit behaviour (e.g. float/fix a parameter) one mutates the model's parameter dictionary.
Fitter
s now store all result data from a single fit and nothing else. Fitting is performed during object construction (so no partially constructed objects).
model = fits.models.Power()
model.parameters['a'].fixed_to = 3
fit = fitter(x, y, model=model)
print(fit.values['a'])
Let me know what you think!
Other than that, I think all feedback has now been addressed and we should be good to merge?
@mbirtwell I think that's everything addressed apart from https://github.com/OxIonics/ionics_fits/pull/1#discussion_r965753320
@mbirtwell happy for me to merge now?
c.f. https://github.com/OxfordIonTrapGroup/ndscan/pull/305
closes #6