levelsplot() funcction with StickSpectrum

A place to report and discuss potential bugs
Post Reply
katarkon
Local Expert
Posts: 193
Joined: Mon Jan 12, 2015 4:01 am

levelsplot() funcction with StickSpectrum

Post 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.

Stefan Stoll
EasySpin Creator
Posts: 1108
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: levelsplot() funcction with StickSpectrum

Post by Stefan Stoll »

This is indeed a bug, thanks for reporting!

katarkon
Local Expert
Posts: 193
Joined: Mon Jan 12, 2015 4:01 am

Re: levelsplot() funcction with StickSpectrum

Post 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.

Stefan Stoll
EasySpin Creator
Posts: 1108
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: levelsplot() funcction with StickSpectrum

Post 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

katarkon
Local Expert
Posts: 193
Joined: Mon Jan 12, 2015 4:01 am

Re: levelsplot() funcction with StickSpectrum

Post 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.

Post Reply