gigablochs.bloch.precess#
- gigablochs.bloch.precess(magnetization, B_field, dt, *, axis=-1, **kwargs)[source]#
Simulate the precession of the magnetization vector under the influence of the magnetic field.
This function simulates the precession of the magnetization vector according to the Bloch equations. The precession is computed using the Rodrigues’ rotation formula.
- Parameters:
magnetization (ndarray) – The initial magnetization vector.
B_field (ndarray) – The magnetic field vector in Tesla.
dt (float) – The time step in seconds.
axis (int, optional) – The spatial axis along which precession takes place. Default is -1.
**kwargs (dict) – Additional keyword arguments to pass to the
unit_field_and_anglefunction.
- Returns:
The magnetization vector after precession.
- Return type:
ndarray
See also
unit_field_and_angle,utils.rodrigues_rotation,relax