Dear Thomas,
I looked closer at the EasySpin changes and the code, and the most important functionality of cwEPR can be relatively easily restored.
It seems that the rescaling problem is caused by the fact that "rescaledata" does not support "minmax, lsq0, lsq1"
The baseline corrections originally included in recaledata are now apparently replaced by "basecorr", but I could not figure out how this can be easily solved in cwEPR. If you can have a look at that, this would be great.
It seems that there is also some problem with passing (some of the) FitOpt options to esfit. This is however not a big problem, as most fitting options can be directly entered in the esfit popup window nowadays. So perhaps FitOpt can (for now at least) be simply deactivated in esfit?
The following changes do seem to solve most problems, but I would prefer if you check things:
replace lines 5788-5793 by:
% Create FitScalingDropDown
app.FitScalingDropDown = uidropdown(app.FitOptTab);
app.FitScalingDropDown.Items = {'none', 'lsq', 'maxabs'};
app.FitScalingDropDown.Position = [82 103 76 22];
app.FitScalingDropDown.Value = ['none' ...
''];
replace lines 5903-5908 by:
% Create RescaleDropDown
app.RescaleDropDown = uidropdown(app.cwEPRapp);
app.RescaleDropDown.Items = {'maxabs', 'lsq', 'none'};
app.RescaleDropDown.ValueChangedFcn = createCallbackFcn(app, @showDatas, true);
app.RescaleDropDown.Position = [1112 14 79 22];
app.RescaleDropDown.Value = 'maxabs';
remove "FitOpt" from all esfit lines
e.g. line 4202 becomes:
esfit(spc(:,app.currslice), @app.custom_fittwomethods, {Sys, Exp, Opt}, {Vary});
similar for the esfit lines 4207, 4239, 4267 and 4272
Thanks for your help!
With best regards,
Bas