SymmetricTensor¶
-
class
mrsimulator.spin_system.tensors.SymmetricTensor(*, property_units: Dict = {'Cq': 'Hz', 'alpha': 'rad', 'beta': 'rad', 'gamma': 'rad', 'zeta': 'ppm'}, zeta: float = None, Cq: float = None, eta: mrsimulator.spin_system.tensors.ConstrainedFloatValue = None, alpha: float = None, beta: float = None, gamma: float = None)¶ Bases:
mrsimulator.utils.parseable.ParseableBase SymmetricTensor class representing the traceless symmetric part of an irreducible second-rank tensor.
-
zeta¶ The anisotropy parameter of the nuclear shielding tensor, in ppm, expressed using the Haeberlen convention. The default value is None.
Example
>>> shielding = SymmetricTensor() >>> shielding.zeta = 10
- Type
float (optional)
-
Cq¶ The quadrupolar coupling constant, in Hz, derived from the electric field gradient tensor. The default value is None.
Example
>>> efg = SymmetricTensor() >>> efg.Cq = 10e6
- Type
float (optional)
-
eta¶ The asymmetry parameter of the SymmetricTensor expressed using the Haeberlen convention. The default value is None.
Example
>>> shielding.eta = 0.1 >>> efg.eta = 0.5
- Type
float (optional)
-
alpha¶ Euler angle, \(\alpha\), in radians. The default value is None.
Example
>>> shielding.alpha = 0.15 >>> efg.alpha = 1.5
- Type
float (optional)
-
beta¶ Euler angle, \(\beta\), in radians. The default value is None.
Example
>>> shielding.beta = 3.1415 >>> efg.beta = 1.1451
- Type
float (optional)
-
gamma¶ Euler angle, \(\gamma\), in radians. The default value is None.
Example
>>> shielding.gamma = 2.1 >>> efg.gamma = 0
- Type
float (optional)
Example
>>> shielding = SymmetricTensor(zeta=10, eta=0.1, alpha=0.15, beta=3.14, gamma=2.1) >>> efg = SymmetricTensor(Cq=10e6, eta=0.5, alpha=1.5, beta=1.1451, gamma=0)
Method Documentation
-
to_freq_dict(larmor_frequency: float) → dict¶ Serialize the SymmetricTensor object to a JSON compliant python dictionary where the attribute values are numbers expressed in default units. The default unit for attributes with respective dimensionalities are: - frequency: Hz - angle: rad
- Parameters
larmor_frequency (float) – The larmor frequency in MHz.
- Returns
A python dict
-
json() → dict¶ Parse the class object to a JSON compliant python dictionary object where the attribute value with physical quantity is expressed as a string with a number and a unit.
-