ibex_bluesky_core.devices.muon
Muon-specific bluesky devices and utilities.
Members
Create a new Muon asymmetry reducer. |
|
Equation for a damped oscillator with an offset, as a function of time \(t\). |
|
Equation for two damped oscillators with an offset, as a function of time \(t\). |
- class ibex_bluesky_core.devices.muon.MuonAsymmetryReducer(*, prefix: str, forward_detectors: ndarray[tuple[Any, ...], dtype[int32]], backward_detectors: ndarray[tuple[Any, ...], dtype[int32]], alpha: float = 1.0, time_bin_edges: Variable | None = None, model: Model, fit_parameters: Parameters)[source]
Bases:
Reducer,StandardReadableCreate a new Muon asymmetry reducer.
- Parameters:
prefix – PV prefix for the
SimpleDae.forward_detectors – numpy
arrayof detector spectra to select for forward-scattering. For example,np.array([1, 2, 3])selects spectra 1-3 inclusive. All detectors in this list are assumed to have the same time channel boundaries.backward_detectors – numpy
arrayof detector spectra to select for backward-scattering.alpha – Scaling factor used in asymmetry calculation, applied to backward detector counts. Defaults to 1.
time_bin_edges – Optional scipp
Variabledescribing bin-edges for rebinning the data before fitting. This must be bin edge coordinates, aligned along a scipp dimension label of “tof”, have a unit of time, for example nanoseconds, and must be strictly ascending. UseNoneto not apply any rebinning to the data.model –
lmfit.model.Modelobject describing the model to fit to the muon data. The independent variable must be \(t\) (time, in nanoseconds).fit_parameters –
lmfit.parameter.Parametersobject describing the initial parameters (and constraints) for each fit parameter.
- ibex_bluesky_core.devices.muon.damped_oscillator(t: ndarray[tuple[Any, ...], dtype[floating]], B: float, A_0: float, omega_0: float, phi_0: float, lambda_0: float) ndarray[tuple[Any, ...], dtype[floating]][source]
Equation for a damped oscillator with an offset, as a function of time \(t\).
\[B + A_0 \cos(\omega_0 t + \phi_0) e^{-\lambda_0 t}\]
- ibex_bluesky_core.devices.muon.double_damped_oscillator(t: ndarray[tuple[Any, ...], dtype[floating]], B: float, A_0: float, omega_0: float, phi_0: float, lambda_0: float, A_1: float, omega_1: float, phi_1: float, lambda_1: float) ndarray[tuple[Any, ...], dtype[floating]][source]
Equation for two damped oscillators with an offset, as a function of time \(t\).
\[B + A_0 \cos(\omega_0 t + \phi_0) e^{-\lambda_0 t} + A_1 \cos(\omega_1 t + \phi_1) e^{-\lambda_1 t}\]