Mikibox package

mikibox.functions.Rx(alpha)[source]

Matrix of right-handed rotation around x-axis [1,0,0] by angle alpha in radians.

mikibox.functions.Ry(alpha)[source]

Matrix of right-handed rotation around y-axis [0,1,0] by angle alpha in radians.

mikibox.functions.Rz(alpha: float) numpy.ndarray[source]

Matrix of right-handed rotation around z-axis [0,0,1] by angle alpha in radians.

mikibox.functions.angle(v1, v2)[source]

Return the angle between two vectors

mikibox.functions.cartesian2spherical(xyz)[source]

Return the spherical [r, theta, phi] coordinates of the cartesian vector [x,y,z] r > 0 theta in (0 : pi) phi in (-pi : pi)

mikibox.functions.gauss_bkg(x, x0, A, sigma, bkg)[source]

Gaussian with constant background.

\(f(x) = A exp(-(x-x_0)^2/(2 \sigma^2)) + bkg\)

To convert to intensity of the peak \(I = \sqrt{2 \pi} A \sigma\)

mikibox.functions.gauss_satellites_bkg(x, x0, xs, As, sigmas, bkg)[source]

Gaussian with constant background.

\(f(x) = A exp(-(x-x_0)^2/(2 \sigma^2)) + bkg\)

To convert to intensity of the peak \(I = \sqrt{2 \pi} A \sigma\)

mikibox.functions.lorentz_bkg(x, x0, A, gamma, bkg)[source]

Gaussian with constant background.

\(f(x) = \frac{A}{(1+(x-x_0)^2/\gamma^2))} + bkg\)

To convert to intensity of the peak \(I = \pi A \gamma\)

mikibox.functions.perp_matrix(q)[source]

Return the matrix representing projection on the plane perpendicular to the given vector q

mikibox.functions.perp_part(m, q)[source]

Return the part of vector m that is perpendicular to the vector q

mikibox.functions.pseudoVoigt_bkg(x, x0, I, f, eta, bkg)[source]

Pseudo-Voigt function.

mikibox.functions.rotate(n, angle)[source]

Return a matrix representing the rotation around vector {n} by {angle} radians. Length of the {n} vector does not matter.