Page 1 of 1

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

Posted: Fri Sep 22, 2017 4:17 am
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

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

Posted: Fri Sep 22, 2017 8:33 am
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.

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

Posted: Fri Sep 22, 2017 4:04 pm
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

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

Posted: Sat Sep 23, 2017 11:00 am
by Stefan Stoll
This is a bug. It's fixed in version 5.2.3. Thanks for reporting!

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

Posted: Sat Sep 23, 2017 12:53 pm
by Ana-Maria
It works well now, thanks as well!

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

Posted: Mon Jan 22, 2018 12:28 pm
by willy40
So does anyone know how to simulate HYSCORE data using 'esfit'?