epraya.JCalpowder#

JCalpowder(Hamer, Expe, iwas, jwas, kwas, weight, hulk, Nucl='None')#

Function for the simulation of the EPR spectrum for powder samples using the JAX functions. Instead of making the calculations with fors cycles, uses the vmap function for the calculations, dividing the points of calculations in blocks, that pass using the Oneori (One orientation) and Processvmap functions.

Parameters:
  • Hamer (Class) – Container for the hamiltonian parameters of the system.

  • Expe (Class) – Container for the experimental conditions.

  • iwas (jax.np.array) – Vectors (points in the grid) to consider in the calculation of the spectrum in the x direction.

  • jwas (jax.np.array) – Vectors (points in the grid) to consider in the calculation of the spectrum in the y direction.

  • kwas (jax.np.array) – Vectors (points in the grid) to consider in the calculation of the spectrum in the z direction.

  • weight (jax.np.array) – Normalized value of the weight of the points to evaluate it’s contribution to the spectrum.

  • hulk (jax.np.array) – Smaller convex poligon tha contains all the points require for the simulation.

  • Nucl (str) – Isotope of the sample. Can be the quantum number and the element or only the element (‘55Mn’ or ‘Mn’)

Returns:

Blist2 (jax.np.array) – Array of the magnetic field.

espectotaljax.np.array

Array of the counts of the spectrum.

Example

>>> import matplotlib.pyplot as plt
>>> import epraya as epr
>>> import numpy as np
>>> import jax.numpy as jxn
>>> Ham,Exp,_=epr.Jstart()
>>> iwas,jwas,kwas,weight,hulk=epr.Delaunay(Exp)
>>> iwas,jwas,kwas,weight,hulk=jxn.array(iwas),jxn.array(jwas),jxn.array(kwas),jxn.array(weight),jxn.array(hulk)
>>> Ham.S=3/2
>>> Ham.I=1
>>> Ham.g=np.array([2.003, 2, 2])
>>> Ham.A=np.array([200, 200, 200])  #Hyperfine constant
>>> Ham.D=np.array([800,200])      #Zero field D and E
>>> Ham.Hpp=[0,10]
>>> Exp.Freq=9.4
>>> Exp.Points=4096
>>> Exp.Temperature=300
>>> Exp.Frange=[0,800]
>>> print(epr.JCalpowder(Ham,Exp,iwas,jwas,kwas,weight,hulk))
(Array([0.00000000e+00, 1.95360195e-01, 3.90720391e-01, ...,
   7.99609280e+02, 7.99804640e+02, 8.00000000e+02], dtype=float64),
Array([ 1.48600800e-22,  1.06329540e-21,  6.49499460e-22, ...,
    2.06205909e-21,  5.04622598e-22, -1.50266650e-21], dtype=float64))