ibex_bluesky_core.callbacks.fitting
For IBEX Bluesky scan fitting.
Submodules
Defines the standard fits. |
Members
Tell LiveFit how to fit to a scan. |
|
Live fit, customized for IBEX. |
- class ibex_bluesky_core.callbacks.fitting.FitMethod(model: Model | Callable[[ndarray[Any, dtype[float64]]], ndarray[Any, dtype[float64]]], guess: Callable[[ndarray[Any, dtype[float64]], ndarray[Any, dtype[float64]]], dict[str, Parameter]])[source]
Bases:
object
Tell LiveFit how to fit to a scan. Has a Model function and a Guess function.
Model - Takes x values and a set of parameters to return y values. Guess - Takes x and y values and returns a rough ‘guess’ of the original parameters.
Assign model and guess functions.
- Parameters:
model (lmfit.Model | Callable) – The model function to use.
guess (Callable) – The guess function to use.
- class ibex_bluesky_core.callbacks.fitting.LiveFit(method: FitMethod, y: str, x: str, *, update_every: int = 1, yerr: str | None = None)[source]
Bases:
LiveFit
Live fit, customized for IBEX.
Call Bluesky LiveFit with assumption that there is only one independant variable.
- Parameters:
method (FitMethod) – The FitMethod (Model & Guess) to use when fitting.
y (str) – The name of the dependant variable.
x (str) – The name of the independant variable.
update_every (int, optional) – How often to update the fit. (seconds)
yerr (str or None, optional) – Name of field in the Event document that provides standard deviation for each Y value. None meaning do not use uncertainties in fit.