Hyperfine

class nexus.Hyperfine(id='', weight=1.0, isomer=0.0, magnetic_field=0.0, magnetic_theta=0.0, magnetic_phi=0.0, quadrupole=0.0, quadrupole_alpha=0.0, quadrupole_beta=0.0, quadrupole_gamma=0.0, quadrupole_asymmetry=0.0, texture=1.0, lamb_moessbauer=0.0, isomer_dist=None, magnetic_field_dist=None, magnetic_theta_dist=None, magnetic_phi_dist=None, quadrupole_dist=None, quadrupole_alpha_dist=None, quadrupole_beta_dist=None, quadrupole_gamma_dist=None, quadrupole_asymmetry_dist=None, isotropic=False)

Defines a set of hyperfine parameters acting on a Moessbauer isotope. Parameters can have distributions of type Distribution. Special random 2D and 3D distributions are available.

Parameters:
  • id (string) – User identifier.

  • weight (float or Var) – Relative weight of the site, > 0.

  • isomer (float or Var) – Isomer shift (mm/s).

  • magnetic_field (float or Var) – Magnetic hyperfine field amplitude (Tesla).

  • magnetic_theta (float or Var) – Polar angle of the magnetic field with respect to the beam propagation direction - photon \(k\) vector (degree).

  • magnetic_phi (float or Var) – Azimuthal angle of the magnetic field with respect to the \(sigma\) direction of the beam (degree).

  • quadrupole (float or Var) – Quadrupole splitting amplitude (mm/s).

  • quadrupole_alpha (float or Var) – Euler angle of the electric field gradient \(\alpha\) in extrinsic ZYZ convention (degree).

  • quadrupole_beta (float or Var) – Euler angle of the electric field gradient \(\beta\) in extrinsic ZYZ convention (degree).

  • quadrupole_gamma (float or Var) – Euler angle of the electric field gradient \(\gamma\) in extrinsic ZYZ convention (degree).

  • quadrupole_asymmetry (float or Var) – Asymmetry parameter of the electric field gradient, 0 to 1.

  • texture (float or Var) –

    Texture coefficient between 0 and 1. It assumes the directional parameters of the site with a ratio of texture and a 3D isotropic distribution of the parameters with the ration 1 - texture. If isotropic is True it is not taken into account. Setting texture to 0 is the same as to set isotropic to True.

    New in version 1.1.2.

  • lamb_moessbauer (float or Var) –

    Lamb-Moessbauer factor of the hyperfine site. Only used when the lamb_moessbauer of the material is None.

    New in version 1.1.2.

  • isomer_dist (Distribution) – Distribution to the isomer shift (mm/s).

  • magnetic_field_dist (Distribution) – Distribution to the magnetic hyperfine field amplitude (Tesla).

  • magnetic_theta_dist (Distribution) – Distribution to the polar angle of the magnetic field with respect to the beam propagation direction - photon \(k\) vector (degree).

  • magnetic_phi_dist (Distribution) – Distribution to the azimuthal angle of the magnetic field with respect to the \(sigma\) direction of the beam (degree).

  • quadrupole_dist (Distribution) – Distribution to the quadrupole splitting amplitude (mm/s).

  • quadrupole_alpha_dist (Distribution) – Distribution to the Euler angle of the electric field gradient \(\alpha\) in extrinsic ZYZ convention (degree).

  • quadrupole_beta_dist (Distribution) – Distribution to the Euler angle of the electric field gradient \(\beta\) in extrinsic ZYZ convention (degree).

  • quadrupole_gamma_dist (Distribution) – Distribution to the Euler angle of the electric field gradient \(\gamma\) in extrinsic ZYZ convention (degree).

  • quadrupole_asymmetry_dist (Distribution) – Distribution to the asymmetry parameter of the electric field gradient, 0 to 1.

  • isotropic (bool) – If True the hyperfine site is set to 3D angular distribution. The site parameters (the angels between the magnetic field and the quadrupole) are fixed.

id

User identifier.

Type:

string

weight

Relative weight of the site, > 0.

Type:

Var

isomer

Isomer shift (mm/s).

Type:

Var

magnetic_field

Magnetic hyperfine field amplitude (Tesla).

Type:

Var

magnetic_theta

Polar angle of the magnetic field with respect to the beam propagation direction - photon \(k\) vector (degree).

Type:

Var

magnetic_phi

Azimuthal angle of the magnetic field with respect to the \(sigma\) direction of the beam (degree).

Type:

Var

quadrupole

Quadrupole splitting amplitude (mm/s).

Type:

Var

quadrupole_alpha

Euler angle of the electric field gradient \(\alpha\) in extrinsic ZYZ convention (degree).

Type:

Var

quadrupole_beta

Euler angle of the electric field gradient \(\beta\) in extrinsic ZYZ convention (degree).

Type:

Var

quadrupole_gamma

Euler angle of the electric field gradient \(\gamma\) in extrinsic ZYZ convention (degree).

Type:

Var

quadrupole_asymmetry

Asymmetry parameter of the electric field gradient, 0 to 1.

Type:

Var

texture

Texture coefficient between 0 and 1. It assumes the directional parameters of the site with a ratio of texture and a 3D isotropic distribution of the parameters with the ration 1 - texture. If isotropic is True it is not taken into account. Setting texture to 0 is the same as to set isotropic to True.

New in version 1.1.2.

Type:

Var

lamb_moessbauer

Lamb-Moessbauer factor of the hyperfine site. Only used when the lamb_moessbauer of the material is None.

New in version 1.1.2.

Type:

Var

isomer_dist

Distribution to the isomer shift (mm/s).

Type:

Distribution

magnetic_field_dist

Distribution to the magnetic hyperfine field amplitude (Tesla).

Type:

Distribution

magnetic_theta_dist

Distribution to the polar angle of the magnetic field with respect to the beam propagation direction - photon \(k\) vector (degree).

Type:

Distribution

magnetic_phi_dist

Distribution to the azimuthal angle of the magnetic field with respect to the \(sigma\) direction of the beam (degree).

Type:

Distribution

quadrupole_dist

Distribution to the quadrupole splitting amplitude (mm/s).

Type:

Distribution

quadrupole_alpha_dist

Distribution to the Euler angle of the electric field gradient \(\alpha\) in extrinsic ZYZ convention (degree).

Type:

Distribution

quadrupole_beta_dist

Distribution to the Euler angle of the electric field gradient \(\beta\) in extrinsic ZYZ convention (degree).

Type:

Distribution

quadrupole_gamma_dist

Distribution to the Euler angle of the electric field gradient \(\gamma\) in extrinsic ZYZ convention (degree).

Type:

Distribution

quadrupole_asymmetry_dist

Distribution to the asymmetry parameter of the electric field gradient, 0 to 1.

Type:

Distribution

isotropic

If True the hyperfine site is set to 3D angular distribution. The site parameters (the angels between the magnetic field and the quadrupole) are fixed.

Type:

bool

BareHyperfines

Holds all hyperfine parameters combinations assigned to the site. So each explicit parameter combination due to distributions.

Type:

List of BareHyperfine

Copy(ref_dist=True)

Copy the Hyperfine object.

Parameters:

ref_dist (bool) – Determines wheather the distribution references should be copied as well (True) or not (False). The distributions itself are not copied, just the reference is passed to the new object. Changing values in the distributions will affect both the original and the copied Hyperfine object.

GetIsomerDistribution()

Get the isomer distribution.

Returns:

isomer values, relative weight

Return type:

ndarray, ndarray

GetMagneticFieldDistribution()

Get the magnetic field distribution.

Returns:

magnetic field values, relative weight

Return type:

ndarray, ndarray

GetMagneticPhiDistribution()

Get the magnetic phi angle distribution.

Returns:

magnetic phi values, relative weight

Return type:

ndarray, ndarray

GetMagneticThetaDistribution()

Get the magnetic theta angle distribution.

Returns:

magnetic theta values, relative weight

Return type:

ndarray, ndarray

GetQuadrupoleAlphaDistribution()

Get the quadrupole alpha angle distribution.

Returns:

quadrupole alpha angle values, relative weight

Return type:

ndarray, ndarray

GetQuadrupoleAsymmetryDistribution()

Get the quadrupole asymmetry distribution.

Returns:

quadrupole asymmetry values, relative weight

Return type:

ndarray, ndarray

GetQuadrupoleBetaDistribution()

Get the quadrupole beta angle distribution.

Returns:

quadrupole beta angle values, relative weight

Return type:

ndarray, ndarray

GetQuadrupoleDistribution()

Get the quadrupole distribution.

Returns:

quadrupole values, relative weight

Return type:

ndarray, ndarray

GetQuadrupoleGammaDistribution()

Get the quadrupole gamma angle distribution.

Returns:

quadrupole gamma angle values, relative weight

Return type:

ndarray, ndarray

SetIsomerDistribution(dist)

Set an isomer shift distribution.

Parameters:

dist (Distribution) – Distribution applied to the isomer shift.

SetMagneticFieldDistribution(dist)

Set a magnetic field distribution.

Parameters:

dist (Distribution) – Distribution applied to the magnetic field.

SetMagneticPhiDistribution(dist)

Set a magnetic field azimuthal angle distribution.

Parameters:

dist (Distribution) – Distribution applied to the magnetic field azimuthal angle.

SetMagneticThetaDistribution(dist)

Set a magnetic field polar angle distribution.

Parameters:

dist (Distribution) – Distribution applied to the magnetic field polar angle.

SetQuadrupoleAlphaDistribution(dist)

Set a quadrupole distribution in the \(\alpha\) angle.

Parameters:

dist (Distribution) – Distribution applied to \(\alpha\).

SetQuadrupoleAsymmetryDistribution(dist)

Set a quadrupole distribution in the quadrupole asymmetry.

Parameters:

dist (Distribution) – Distribution applied to the quadrupole asymmetry.

SetQuadrupoleBetaDistribution(dist)

Set a quadrupole distribution in the \(\beta\) angle.

Parameters:

dist (Distribution) – Distribution applied to \(\beta\).

SetQuadrupoleDistribution(dist)

Set a quadrupole distribution.

Parameters:

dist (Distribution) – Distribution applied to the quadrupole amplitude.

SetQuadrupoleGammaDistribution(dist)

Set a quadrupole distribution in the \(\gamma\) angle.

Parameters:

dist (Distribution) – Distribution applied to \(\gamma\).

SetRandomDistribution(target, type, points)

Set a random distribution in the magnetic hyperfine field or the electric field gradient. For a hyperfine site random magnetic and random quadrupole distributions can be set in parallel.

Parameters:
  • target (string) – mag for magnetic distributions. efg for efg distributions. none to reset any angular distribution.

  • type (string) – 3D for 3-dimensional distribution or for 2-dimensional distributions one of the following options: 2Dks, 2Dkp, 2Dsp, 2Dsk, 2Dpk, 2Dps. Convention for 2Dxy is that xy give the plane of the distribution. x and y can be k (k-vector direction), s (\(sigma\) polarization direction) or p (\(pi\) polarization direction).

  • points (int) – Number of points for the distribution.

Note

A hyperfine site should not have too many distributions. Each distribution point number multiplies with the previously set distribution points. For example, having three distributions with each 30 points will result in 27000 distribution points in total for the site. In this case the calculations of the transitions takes quite long. As a rule of thumb try to stay below 1000 distribution points per Hyperfine object. For 3D random distributions in the magnetic field and the quadrupole splitting set Hyperfine.isotropic to True. This will results in considerable faster calculations than setting two 3D distributions.

Examples

Various ways to define a Hyperfine object without distributions.

site = nx.Hyperfine(
  id = "user hyperfine site",
  weight = 1,
  isomer = -0.11,
  magnetic_field = 0,
  magnetic_theta = 0,
  magnetic_phi = 45,
  quadrupole = 0.8,
  quadrupole_alpha = 90,
  quadrupole_beta = 45,
  quadrupole_gamma = 0,
  quadrupole_asymmetry = 0.05,
  isotropic = False)

site.quadrupole.value = 0

site.magnetic_field = 33

site.isotropic = True

print(site)

different ways to define distributions on hyperfine parameters

gauss_dist_mag = nx.lib.distribution.Gaussian(points = 11, fwhm = 3)

# initializer definition of magnetic field distribution
site = nx.Hyperfine(isomer = -0.11,
                    magnetic_field = 33,
                    magnetic_field_dist = gauss_dist_mag)
site = nx.Hyperfine(isomer = -0.11,
                    magnetic_field = 33)

# isomer distribution via set method
gauss_dist_isomer = nx.lib.distribution.Gaussian(points = 11, fwhm = 0.2)

site.SetIsomerDistribution(gauss_dist_isomer)

Random distributions have to be applied by set methods

site.SetRandomDistribution("efg", "3D", 201)

site.SetRandomDistribution("mag", "2Dsk", 201)