Esfit for two triplets with different population distribution

General forum for EasySpin: questions, how to's, etc.
Post Reply
xiaoxun.chen
Newbie
Posts: 4
Joined: Sun Apr 12, 2020 3:10 pm

Esfit for two triplets with different population distribution

Post 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);

Last edited by xiaoxun.chen on Tue Jan 12, 2021 2:59 am, edited 1 time in total.
Stefan Stoll
EasySpin Creator
Posts: 1059
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Esfit for two triplets with different population distribution

Post 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
xiaoxun.chen
Newbie
Posts: 4
Joined: Sun Apr 12, 2020 3:10 pm

Re: Esfit for two triplets with different population distribution

Post by xiaoxun.chen »

Thank you very much! it is woking very well.

Stefan Stoll
EasySpin Creator
Posts: 1059
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Esfit for two triplets with different population distribution

Post by Stefan Stoll »

Great!

Post Reply