Extended Czjzek distribution Model

class mrsimulator.models.ExtCzjzekDistribution(symmetric_tensor: mrsimulator.spin_system.tensors.SymmetricTensor, eps: float, polar=False)

Bases: mrsimulator.models.czjzek.AbstractDistribution

An extended Czjzek distribution distribution model.

The extended Czjzek random distribution 1 model is an extension of the Czjzek model, given as

(53)\[S_T = S(0) + \rho S_C(\sigma=1),\]

where \(S_T\) is the total tensor, \(S(0)\) is the dominant tensor, \(S_C(\sigma=1)\) is the Czjzek random model attributing to the random perturbation of the tensor about the dominant tensor, \(S(0)\), and \(\rho\) is the size of the perturbation. Note, in the above equation, the \(\sigma\) parameter from the Czjzek random model, \(S_C\), has no meaning and is set to one. The factor, \(\rho\), is defined as

(54)\[\rho = \frac{||S(0)|| \epsilon}{\sqrt{30}},\]

where \(\|S(0)\|\) is the 2-norm of the dominant tensor, and \(\epsilon\) is a fraction.


Gérard Le Caër, Bruno Bureau, and Dominique Massiot, An extension of the Czjzek model for the distributions of electric field gradients in disordered solids and an application to NMR spectra of 71Ga in chalcogenide glasses. Journal of Physics: Condensed Matter, 2010, 22, 065402. DOI: 10.1088/0953-8984/22/6/065402

  • symmetric_tensor (SymmetricTensor) – A shielding or quadrupolar symmetric tensor or equivalent dict object.

  • eps (float) – A fraction determining the extent of perturbation.


>>> from mrsimulator.models import ExtCzjzekDistribution
>>> S0 = {"Cq": 1e6, "eta": 0.3}
>>> ext_cz_model = ExtCzjzekDistribution(S0, eps=0.35)
pdf(pos, size: int = 400000)

Generates a probability distribution function by binning the random variates of length size onto the given grid system.

  • pos – A list of coordinates along the two dimensions given as NumPy arrays.

  • size – The number of random variates drawn in generating the pdf. The default is 400000.


A list of x and y coordinates and the corresponding amplitudes.


>>> import numpy as np
>>> cq = np.arange(50) - 25
>>> eta = np.arange(21)/20
>>> Cq_dist, eta_dist, amp = cz_model.pdf(pos=[cq, eta])
rvs(size: int)

Draw random variates of length size from the distribution.


size – The number of random points to draw.


A list of two NumPy array, where the first and the second array are the anisotropic/quadrupolar coupling constant and asymmetry parameter, respectively.


>>> Cq_dist, eta_dist = ext_cz_model.rvs(size=1000000)