llg3d.post.domain_wall¶
Analyse domain wall profiles.
Functions
|
Fit the data to a hyperbolic tangent function. |
|
Fit the magnetization profile to a hyperbolic tangent function. |
- fit_data_to_tanh(x, data)[source]¶
Fit the data to a hyperbolic tangent function.
- Parameters:
x (ndarray) – x coordinates
data (ndarray) – magnetization profile data
- Returns:
m_0: saturation magnetization
x_0: center of the domain wall
w: width of the domain wall
- Return type:
A tuple (m_0, x_0, w) containing the fitted parameters
- fit_m1_to_tanh(result, time_index=-1)[source]¶
Fit the magnetization profile to a hyperbolic tangent function.
The function is defined as:
\[m(x) = m_0 * \tanh\left(\frac{x - x_0}{w}\right)\]where:
m_0 is the saturation magnetization,
x_0 is the center of the domain wall,
w is the width of the domain wall.
- Parameters:
result (RunResults) – RunResults object containing the magnetization profile.
time_index (int) – Index of the time step to fit (default is the last time step). etc.). Default is -1 (last time step).
- Returns:
A tuple (m_0, x_0, w) containing the fitted parameters.
- Return type:
tuple[float64, …]