Ulm-IQO / qudi-core

A framework for modular measurement applications.
GNU General Public License v3.0
38 stars 21 forks source link

Adding custom fit models #92

Closed simon1schmitt closed 7 months ago

simon1schmitt commented 7 months ago

Feature Description

Although there are already quite a few fit models available, there might be the need of more 'exotic' or customized versions. Since these additional models can be very specific (for example a Multiple-Lorentzian with fixed splittings due to some known hyperfine couplings), they should not go to the core directly. Instead it would be nice if there would be some sort of mechanism, which allows to include additional fit models in a simple and straight forward way (possibly building-up on the existing models) without having the need to modify existing code.

Related Problem

No response

Considered Alternatives

Do not know any. If there are, please let me know.

Additional Context

No response

Contact Details

simon.schmitt@diatope.com

Neverhorst commented 7 months ago

Hey @simon1schmitt ,

sorry the documentation on fit models is still missing.

Since qudi-core has been released, qudi (and most submodules thereof) is organised as PEP 420 namespace module. So any addon package (e.g. qudi-iqo-modules) can expand the existing package namespace.

In case of fit models, it should be sufficient to add a module to src/qudi/util/fit_models/ containing subclasses of qudi.util.fit_model.model.FitModelBase. Keep in mind that adding a new namespace module requires running the installation with pip again.

I hope this adresses your issue. Feel free to open it again if not.