Diescrepancies of non-zero crystal field over different sources

I found that there are some difference of non-zero parameters from different sources of Mantid. This is quite confusing.

  1. Crystal Field Theory

  2. mantid/scripts/Inelastic/CrystalField/fitting.py at 20c5d6191d5f14594d7aeda042367c5f4d2949f3 · mantidproject/mantid · GitHub

  3. mantid/Framework/CurveFitting/src/Functions/CrystalFieldPeaksBase.cpp at 313e38f496614ef46c3140c6c36e6203d91df299 · mantidproject/mantid · GitHub

Dear Qi Dawei,

ah, I think there is a bug in the C++ code for C1/Ci where the “imaginary” part of the B21 parameter is fixed to zero, but otherwise I think the code agrees.

I think possibly a confusion is that your table for CrystalFieldPeaksBase.cpp uses a c superscript to denote a complex parameter whereas the tables for fitting.py (and in the documentation) uses a prefix “I” for imaginary (negative sign in the documentation) and no prefix (positive sign in the documentation). So a c prefix means both unprefixed and I-prefixed parameters are allowed (a plus/minus symbol).

From memory, I think that strictly speaking one can chose a particular axis related somehow to the inversion for Ci symmetry which would zero the IB21 parameter but this is not general and doesn’t apply to C1. I can’t quite remember the details and I haven’t found anything in a quick google… So I think we will make an issue to remove the pin to zero in the C++ code.

Best wishes,

Duc.

PS For the special case of cubic symmetry where there is an extra condition that B44 = 5*B40 and B64 = -21*B60 (under Steven’s normalisation, the proportionality constant is different under Wybourne’s normalisation), this is handled by the C++ code when it does the calculation, so the Python code does not allow users to specify B44 and B64 even though they are strictly speaking non-zero.