Page 2 of 6

Re: cwEPR App for processing, simulating, and fitting CW EPR data

Posted: Mon Aug 24, 2020 6:52 am
by christian
Hello
I am trying to download your program using MATLAB 2014b and I get this error message. Any ideas? Thanks

Error using nargout
Error: File: cwEPR.mlapp Line: 5 Column: 44
Unexpected MATLAB operator.

Error in cwEPRApp/startApp (line 58)
if nargout(@cwEPR) == 0

Error in cwEPRApp (line 38)
startApp(obj)

Error in appinstall.internal.runapp>execute (line 79)
out = evalin('caller', [script ';']);

Error in appinstall.internal.runapp>runapp13a (line 58)
outobj = execute(fullfile(appinstalldir, [wrapperfile 'App.m']));

Error in appinstall.internal.runapp>runcorrectversion (line 35)
appobj = runapp13a(appinstalldir);

Error in appinstall.internal.runapp (line 17)
out = runcorrectversion(appmetadata, appentrypoint, appinstalldir);

Re: cwEPR App for processing, simulating, and fitting CW EPR data

Posted: Mon Aug 24, 2020 11:37 am
by ThomasMCasey
Hi Christian,

This is most likely related to the matlab version but from what I can find this should only be an issue for versions 2012 or older because the 'evalin' function changed in 2013. Maybe someone else knows of other causes for this error? I'll keep searching for a fix.

Re: cwEPR App for processing, simulating, and fitting CW EPR data

Posted: Tue Aug 25, 2020 10:12 am
by ThomasMCasey
If you are not using the latest version of cwEPR, download version 2.7: https://www.mathworks.com/matlabcentral ... 3292-cwepr

Along with a few bug fixes there are some new features:

- Narrow your esfit to a specific range
- Frequency adjustment slider to quickly align your spectrum
- Toggle the rescale options after simulating (without re-simulating your spectrum, in case your sim is complicated and takes a while)
- Option to use the real or complex portions of the data if the data are complex

Re: cwEPR App for processing, simulating, and fitting CW EPR data

Posted: Tue Sep 08, 2020 7:23 am
by bruin
New version works well!

I'm wondering: Is it possible to define equivalent nuclei somehow?

Re: cwEPR App for processing, simulating, and fitting CW EPR data

Posted: Tue Sep 08, 2020 9:13 am
by ThomasMCasey
Bruin, it looks like I missed the parameter "n" in the Sys lists, a new version (2.8) is published where "n" is now available directly below "Nucs". There was also a bug fix related to saving simulated data.

Re: cwEPR App for processing, simulating, and fitting CW EPR data

Posted: Tue Sep 08, 2020 9:25 am
by bruin
Thanks a lot! I will try it tonight immediately!

Re: cwEPR App for processing, simulating, and fitting CW EPR data

Posted: Tue Sep 08, 2020 10:32 am
by bruin
Works perfectly ThomasMCasey !
Thanks!

Re: cwEPR App for processing, simulating, and fitting CW EPR data

Posted: Tue Sep 08, 2020 10:33 am
by ThomasMCasey
Great! No problem, I'm glad you find it helpful!

Re: cwEPR App for processing, simulating, and fitting CW EPR data

Posted: Tue Sep 08, 2020 11:55 am
by bruin
Dear ThomasMCasey,

I'm confused. I'm trying to simulate an isotropic spectrum with HFIs with one nitrogen atom and 4 sets of 2 equivalent protons. The cwEPR App seems to correctly use the "n = " value to define the equivalent nuclei. However, if I keep all hyperfine couplings the same and change the g-value from g=2.0102 to g=2.0103 I get a totally different lineshape and HFi pattern in the simulation. That should not happen, right? Shouldn't the spectrum simply shift a bit to the left? WIth other simulation programs I've used in the past I've never seen such a strong dependence of the isotropic lineshape on the isotropic g-value.
Could there still be a small bug in the module somewhere? Or is this correct behaviour due to higher order effects?

Re: cwEPR App for processing, simulating, and fitting CW EPR data

Posted: Tue Sep 08, 2020 12:40 pm
by ThomasMCasey
Hi Bruin,

This should not be related to the function of the App itself as the App only collects the necessary structures, passes them to the easyspin functions, then plots the output. You could try to run the same simulation from a script and if it is different I can figure out what the App could be doing wrong. This might be better to ask in the general forum though, my guess is it is not a bug. Changes in lineshape with changes in ge are possible for certain combinations of EZI, NZI, and HFI terms, especially with that many nuclei involved. My guess is it is most noticeable with smaller couplings where there is more peak overlap?