Page 1 of 1

levelsplot() funcction with StickSpectrum

Posted: Mon Oct 21, 2024 5:19 am
by katarkon

When levelsplot() used with Opt.StickSpectrum=true, the follow errors are throwed when mouse is moved over figure window:

Invalid or deleted object.
Error in levelsplot
Error while evaluating Figure WindowButtonMotionFcn

No lines are highlited, of course.
It seems to be a bug.


Re: levelsplot() funcction with StickSpectrum

Posted: Mon Oct 21, 2024 10:06 pm
by Stefan Stoll

This is indeed a bug, thanks for reporting!


Re: levelsplot() funcction with StickSpectrum

Posted: Wed Oct 23, 2024 11:54 pm
by katarkon

It seems that is more general problem. The error occures after the changing of spin system regardless drawing of the stick spectrum.
Only reboot of MATLAB solves the problem. Neither clearing of the figure nor its closing have no effect.

I hope it will be useful.
My system is Win10, MATLAB 2022a, EasySpin 6.0.6

Here the script:
clear, clf

Sys.S = 1/2;
Sys.Nucs='55Mn';
Sys.g=2.001;
Sys.A=mt2mhz(200)/10;

mwFreq=9.6;
Par.PlotThreshold=1e-3;
%Par.SlopeColor = true;
%Par.StickSpectrum = true;

B = [280 400]; % mT
levelsplot(Sys,'x',B,mwFreq,Par);

Just replace Sys.Nucs='55Mn' to Sys.Nucs='63Cu' and back.


Re: levelsplot() funcction with StickSpectrum

Posted: Wed Nov 06, 2024 2:51 pm
by Stefan Stoll

Thanks for reporting! Indeed, this seems to be a bug that needs a bit more work to fix. Please post an issue here: https://github.com/StollLab/EasySpin/issues


Re: levelsplot() funcction with StickSpectrum

Posted: Thu Nov 07, 2024 2:37 am
by katarkon

The bug does not seem to be reproducible. I cannot find unambiguous conditions when it occurs.
Also there is a minor bug with linewidths of transitions at levelsplot diagram. They are initially thicker than ones after mouse hilighting.