Page 1 of 1

MS values in levelsplot

Posted: Thu Aug 01, 2024 6:25 am
by friedrich95

Hello,
is there an easy way to assign the MS levels to the energy levels that are plottet in the levelsplot?

Thank you very much


Re: MS values in levelsplot

Posted: Thu Aug 01, 2024 9:40 pm
by Stefan Stoll

Not directly, but it is possible to color the levels by their |mS| value, i.e. the magnitude of the expectation value of the spin operator S_zL, where zL is the lab z axis along the magnetic field.

For this, use the option Opt.SlopeColor = true.

Here is an example:

Code: Select all

clear, clc

Sys.S = 7/2;
Sys.D = 1000;

Opt.SlopeColor = true;
levelsplot(Sys,'xy',[0 300],[],Opt);

Re: MS values in levelsplot

Posted: Sat Aug 03, 2024 8:15 am
by thanasis

That's a really nice addition!

Is there a way to define a custom color palette for the various ms values?

Thanks,

Thanasis