Page 1 of 1

Esfit for two triplets with different population distribution

Posted: Fri May 29, 2020 2:23 am
by xiaoxun.chen

Hello,

I was trying to do the fitting of my sample under 60K which might have two sets of triplets with different population distribution.

I can vary the population by the user-defined fitting function for only one triplet system.

How can I vary the other one simultaneously during the fitting?

Below are the script and the user-defined fitting function. Thank you very much!!

clear, clc, clf
[B,Spec] = textread('Ben.txt','%f %f');
Sys.S = 1;
Sys.g = 2.005;
D=-2720;
E=400;
D2=-10000;
E2=600;
Sys.D = [D,E];
Sys2.D = [D2,E2];
Sys.lwpp = 5 ;
Vary.Temperature = [2 2 2];
Sys.Temperature =[2 2 3];
Vary2.Temperature = [2 2 2]; ???????????????????
Sys2.Temperature =[2 2 3]; ????????????????
Xband.mwFreq = 9.737974;
Xband.Mode = 'perpendicular';
Opt = struct('Verbosity',1);
Opt.nKnots = 31;
hold on
esfit('mymy',Spec,Sys,Vary,Xband);
/////////////////////////////
function y = mymy(Sys,Exp,Opt);
Exp.Temperature = Sys.Temperature;
[x,y] = pepper(Sys,Exp,Opt);


Re: Esfit for two triplets with different population distribution

Posted: Fri Jun 19, 2020 10:49 pm
by Stefan Stoll
You can get this to work by running the two simulations separately in your user-defined simulation function. Here is a sketch of the idea:

Code: Select all

[B,spc] = mysim({Quinone,Quinone2},Exp,Opt)

function spc = mysim(Sys,Exp,Opt)
Exp.Temperature = Sys{1}.Temperature;
[B,spc1] = pepper(Sys{1},Exp,Opt);
Exp.Temperature = Sys{2}.Temperature;
[B,spc2] = pepper(Sys{2},Exp,Opt);
spc = spc1 + spc2;
end

Re: Esfit for two triplets with different population distribution

Posted: Thu Oct 08, 2020 3:49 am
by xiaoxun.chen

Thank you very much! it is woking very well.


Re: Esfit for two triplets with different population distribution

Posted: Thu Oct 15, 2020 5:22 pm
by Stefan Stoll

Great!