CFLevels class - asche1/PyCrystalField GitHub Wiki
CFLevels
class CELevels(self, StevensOperators, Parameters)
Creates a crystal field Hamiltonian and calculates observable quantities from it. Assumes the weak-coupling scheme, and only works for rare-earth ions.
Parameters
Stevens Operators: list of Stevens Operator matrices (generated by theStevensOpfunction)Parameters: list of CEF parameters. This list is multiplied element-wise by the Stevens operators to generate the Hamiltonian.
Note that the __init__ method described above is more suited for fit functions than user-provided Hamiltonians. The preferred class method is the Bdict method below:
Bdict class method:
CFLevels.bdict(ion, Bdict)
Creates a CFLevels object where the user provides only the labels for Stevens Operators, not the operators themselves.
Parameters
ion: string, giving the RE ion to be calculated ("Yb3+", "Ho3+", etc.).Bdict: dictionary, giving the CEF parameters Bnm and values. Example:{'B20':-0.42, 'B40': 0.02, 'B44':0.13}.
Hamiltonian class method:
CFLevels.Hamiltonian(Hamil)
This is where the user provides a square matrix Hamiltonian to the object. This is most useful for fitting routines, because it saves the step of looking up and multiplying the Stevens Operators.
Attributes
H: CEF Hamiltonian in matrix formB: list of CEF parametersJ: Total angular momentum quantum number of the central ioneigenvalues: numpy array giving the energy eigenvalues ofHeigenvectors: numpy array giving the energy eigenvectors ofH
Functions
| Function | Description |
|---|---|
| diagonalize | ? |
| diagonalize_banded | |
| neutronSpectrum | |
| neutronSpectrum_customLineshape | |
| normalizedNeutronSpectrum | |
| normalizedNeutronSpectrum_customLineshape | |
| neutronSpectrum2D | |
| printEigenvectors | |
| printLaTexEigenvectors | |
| gsExpectation | |
| magnetization | |
| susceptibility | |
| gtensor | |
| fitdata |