saffron (1H HYSCORE) more than 1 proton - error

General forum for EasySpin: questions, how to's, etc.
Post Reply
Ana-Maria
Newbie
Posts: 3
Joined: Mon Oct 17, 2016 10:09 am
Location: University of Manchester

saffron (1H HYSCORE) more than 1 proton - error

Post by Ana-Maria »

Hi,
I'm trying to simulate 1H HYSCORE, but it give me this error: 'Operands to the || and && operators must be convertible to logical scalar values.' if I add more than 1 proton.

I define the nuclei using this:
Sys.Nucs = '63Cu,1H,1H';
Opt.Nuclei = [2 3]; % only protons
and Sys.A is = [M_A; 1HA1; 1HA2]; where each hyperfine matrix is a 3x3 matrix.

Is there any way I can solve this?
Ana-Maria
Last edited by Ana-Maria on Fri Sep 22, 2017 3:51 pm, edited 1 time in total.
Stefan Stoll
EasySpin Creator
Posts: 1041
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: saffron (1H HYSCORE) more than 1 proton - error

Post by Stefan Stoll »

Please post a complete script so we can try to reproduce the error. Make sure you are using the latest EasySpin version.
Ana-Maria
Newbie
Posts: 3
Joined: Mon Oct 17, 2016 10:09 am
Location: University of Manchester

Re: saffron (1H HYSCORE) more than 1 proton - error

Post by Ana-Maria »

I use the last version of EasySpin and Matlab R2012a
Please see the code below:

[par1, par2, par3] = eprload('.DSC');
[ff,dt] = meshgrid(par1{2},par1{1});
contour(dt*1e3,ff*1e3,abs(par2),ll*max(max(par2)));
hold all;
figure(1);

Sys.Nucs = 'M,,1H,1H';
Sys.g = [1.945 0 0; 0 1.945 0; 0 0 1.9745];
AM = [1121 0 0; 0 1121 0; 0 0 1070];
H2A = [3.43E+00 2.19E+00 -7.89E-01; 2.19E+00 -1.35E+00 -3.07E-01; -8.01E-01 -3.12E-01 -2.12E+00];
H3A = [-1.11E+00 1.81E+00 -2.00E+00; 1.81E+00 2.67E-01 -2.89E+00; -2.03E+00 -2.94E+00 8.53E-01];
Sys.A = [AM; H2A; H3A];
Exp.Sequence = 'HYSCORE';
Exp.Field = 260;
Exp.mwFreq = 9.7;
Exp.ExciteWidth = 62.5;
Exp.tau = 0.400;
Exp.t1 = 0.200;
Exp.t2 = 0.200;
Exp.dt = 0.020;
Exp.nPoints = 256;
Opt.Method='perturb1';
Opt.Nuclei = [2 3];

figure(1);
[x1,x2,y,p] = saffron(Sys,Exp,Opt);
[F1,F2] = meshgrid(p.f1,p.f2);
z1 = p.fd;
contour(F1,F2,abs(z1),10,'r','Linewidth',0.8);

Thanks,
Ana-Maria
Last edited by Ana-Maria on Sat Sep 23, 2017 11:13 am, edited 1 time in total.
Stefan Stoll
EasySpin Creator
Posts: 1041
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: saffron (1H HYSCORE) more than 1 proton - error

Post by Stefan Stoll »

This is a bug. It's fixed in version 5.2.3. Thanks for reporting!
Ana-Maria
Newbie
Posts: 3
Joined: Mon Oct 17, 2016 10:09 am
Location: University of Manchester

Re: saffron (1H HYSCORE) more than 1 proton - error

Post by Ana-Maria »

It works well now, thanks as well!
willy40
Newbie
Posts: 6
Joined: Mon Jan 22, 2018 11:57 am
Location: Denver, CO

Re: saffron (1H HYSCORE) more than 1 proton - error

Post by willy40 »

So does anyone know how to simulate HYSCORE data using 'esfit'?
Post Reply