MagneticAnisotropy¶
- class MagneticAnisotropy(temperatures, theta_angles, phi_angles, relative_magnetic_moments, max_total_magnetic_moment, total_torques)¶
An object storing magnetic moments and spin torques at a range of temperatures.
- Parameters:
temperatures – The list of temperatures.
theta_angles – The list of theta angles.
phi_angles – The list of phi angles.
relative_magnetic_moments – The relative magnetic moment for each temperature, theta and phi angle. Thus it should be an array of shape (N_temp, N_theta, N_phi, 3), where N_temp is the number of temperatures, N_theta is the number of theta angles and N_phi is the number of phi angles.
total_torques – The total magnetic torque on the system for each temperature, phi and theta angle. Must be an array of the same shape as ‘relative_magnetic_moments’.
- freeEnergy(use_phi_angle=True)¶
- Parameters:
use_phi_angle (bool) – Determines what angle should be used for the integration. If True the phi angles will be used; otherwise the theta angles.
- Returns:
The free energy obtained by integrating the torque over angles. The shape is (n_t, n_a), where n_t is the number of temperatures, and n_a is the number of angle points.
- Return type:
PhysicalQuantity of type energy
- magneticAnisotropyEnergy(use_phi_angle=True)¶
- Parameters:
use_phi_angle (bool) – Determines what angle should be used for the integration. If True the phi angles will be used; otherwise the theta angles.
- Returns:
The maximum difference of the free energy for each temperature
- Return type:
PhysicalQuantity of type energy
- maxTotalMagneticMoment()¶
Get the maximum total magnetic moment.
- Returns:
The maximum total magnetic moment.
- Return type:
PhysicalQuantity of type energy/magnetic field
- metatext()¶
- Returns:
The metatext of the object or None if no metatext is present.
- Return type:
str | None
- nlinfo()¶
- Returns:
Structured information about the data.
- Return type:
dict
- nlprint(stream)¶
Print report with the data and results to a given stream.
- Parameters:
stream (stream) – The stream that the report should be written to.
- phiAngles()¶
Get the list of phi angles.
- Returns:
The phi angles.
- relativeMagneticMoments()¶
Calculate the relative magnetizations.
- Returns:
The relative magnetizations. The relative magnetizations. Will be an array of shape (N_temp, N_theta, N_phi, 3).
- Retype:
ndarray
- relativeMagnetizations()¶
Calculate the relative magnetizations.
- Returns:
The relative magnetizations. Will be an array of shape (N_temp, N_theta, N_phi).
- Retype:
ndarray
- setMetatext(metatext)¶
Set a given metatext string on the object.
- Parameters:
metatext (str | None) – The metatext string that should be set. A value of “None” can be given to remove the current metatext.
- temperatures()¶
Get the list of temperatures.
- Returns:
The temperatures.
- thetaAngles()¶
Get the list of theta angles.
- Returns:
The theta angles.
- totalMagneticMoments()¶
Get the total magnetic moments.
- Returns:
The list of magnetic moments.
- Return type:
PhysicalQuantity with units of energy/magnetic field
- totalTorques()¶
Get the total magnetic torques on the system.
- Returns:
The total magnetic torques. Will be an array of shape (N_temp, N_theta, N_phi, 3).
- Return type:
PhysicalQuantity with units of energy
- uniqueString()¶
Return a unique string representing the state of the object.