Page 1 of 1

resfreqs - Using different orientations

Posted: Wed Mar 30, 2016 7:12 am
by Charles
I want to calculate the resonance frequencies in the x, the y and the z direction. I use e.g. the following code:

Code: Select all

Sys.S = 1;
Sys.D = -30000;
Sys.g = 2;

Params.CrystalOrientation = [0 pi/2; pi/2 pi/2; 0 0];
Params.Field = 1000;

resfreqs_matrix(Sys,Params)
I expect that there are three columns as an output, of which two should have the same value because the system does not differ in the x and the y direction. But I only get this output:

Code: Select all

ans =

   1.0e+04 *

    1.9948    1.9948
    7.1897    7.1897
    5.1948    5.1948
It looks like the z direction is missing. What am I doing wrong?

Re: resfreqs - Using different orientations

Posted: Wed Mar 30, 2016 10:47 am
by Stefan Stoll
In Params.CrystalOrientation, EasySpin expects all three Euler angles for each orientation. So each row should have 3 values: phi, theta and chi. Since chi only affects the intensities, but not the resonance positions, you can use chi=0.

What is happening in your case is that EasySpin sees 3 rows (instead of 3 columns) and transposes the matrix to get the 3 columns for the 3 angles. As a consequence, you get something different from what you expected.

If you use

Code: Select all

Params.CrystalOrientation = [0 pi/2 0; pi/2 pi/2 0; 0 0 0];
then you should get what you expect.