Using esfit for magnetometry data
Posted: Thu Feb 21, 2019 12:06 pm
Hi everyone,
I am trying to fit magnetometry data (magnetic susceptibility) using the curry function, using J as my fitting parameters. The problem I am running into is that for an 8 spin system, each J is treated as a different parameter. I would like to add the constraint that all J's are equal or scaled by a certain value. Here is a three spin example of the method I am using after importing a data set.
%importing some data
exchi = datay;
expT = datax;
FitSys.S = [S S S];
FitSys.g = [g;g;g];
FitSys.J = [J1 J1 J1]/1.44*30000;
FitSys.D = [Dpv;Dpv;Dpv];
Exp.CrystalOrientation = [0 0 0];
Exp.Temperature = ;
Exp.Field = 100;
%vary parameters
Vary.J = [90000 90000 90000];
FitOpt.Scaling = 'none';
ChiOpt.Output = 'ChiCGS OneColoumn';
bestchi = esfit('curry',expchi(:),FitSys,Vary,Exp,ChiOpt,FitOpt);
chioptdata.Output = 'ChiCGS';
chisim = curry(bestchi,Exp,chioptdata);
I have also attempted to use the 'user defined functions' but am not exactly sure how to include this type of constraint. Any help on this matter would be appreciated.
Thanks.
I am trying to fit magnetometry data (magnetic susceptibility) using the curry function, using J as my fitting parameters. The problem I am running into is that for an 8 spin system, each J is treated as a different parameter. I would like to add the constraint that all J's are equal or scaled by a certain value. Here is a three spin example of the method I am using after importing a data set.
%importing some data
exchi = datay;
expT = datax;
FitSys.S = [S S S];
FitSys.g = [g;g;g];
FitSys.J = [J1 J1 J1]/1.44*30000;
FitSys.D = [Dpv;Dpv;Dpv];
Exp.CrystalOrientation = [0 0 0];
Exp.Temperature = ;
Exp.Field = 100;
%vary parameters
Vary.J = [90000 90000 90000];
FitOpt.Scaling = 'none';
ChiOpt.Output = 'ChiCGS OneColoumn';
bestchi = esfit('curry',expchi(:),FitSys,Vary,Exp,ChiOpt,FitOpt);
chioptdata.Output = 'ChiCGS';
chisim = curry(bestchi,Exp,chioptdata);
I have also attempted to use the 'user defined functions' but am not exactly sure how to include this type of constraint. Any help on this matter would be appreciated.
Thanks.