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

Programs, scripts and GUIs shared by EasySpin users
christian
Newbie
Posts: 1
Joined: Thu Aug 23, 2018 6:30 am

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

Post 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);
ThomasMCasey
User
Posts: 34
Joined: Tue May 26, 2015 1:50 pm

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

Post 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.
ThomasMCasey
User
Posts: 34
Joined: Tue May 26, 2015 1:50 pm

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

Post 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
bruin
User
Posts: 23
Joined: Fri May 29, 2020 11:07 am

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

Post by bruin »

New version works well!

I'm wondering: Is it possible to define equivalent nuclei somehow?
ThomasMCasey
User
Posts: 34
Joined: Tue May 26, 2015 1:50 pm

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

Post 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.
bruin
User
Posts: 23
Joined: Fri May 29, 2020 11:07 am

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

Post by bruin »

Thanks a lot! I will try it tonight immediately!
bruin
User
Posts: 23
Joined: Fri May 29, 2020 11:07 am

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

Post by bruin »

Works perfectly ThomasMCasey !
Thanks!
ThomasMCasey
User
Posts: 34
Joined: Tue May 26, 2015 1:50 pm

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

Post by ThomasMCasey »

Great! No problem, I'm glad you find it helpful!
bruin
User
Posts: 23
Joined: Fri May 29, 2020 11:07 am

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

Post 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?
ThomasMCasey
User
Posts: 34
Joined: Tue May 26, 2015 1:50 pm

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

Post 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?
Post Reply