Mask for esfit

General forum for EasySpin: questions, how to's, etc.
Post Reply
bchica
Newbie
Posts: 5
Joined: Mon Apr 08, 2019 1:44 pm

Mask for esfit

Post by bchica »

Hello,

is it possible to use a masking function to get esfit to ignore a region of the spectrum during fitting. I am trying to fit a spectrum with an S=3/2 species and an S=1/2 species. I just want to fit the inflections corresponding to the s=1/2 feature and ignore an inflection in the region from the s=3/2 system. is such a thing possible? thanks
thanasis
Local Expert
Posts: 245
Joined: Thu Jan 21, 2016 6:28 am
Location: Strasbourg

Re: Mask for esfit

Post by thanasis »

One way I found is this: cut up your spectrum to regions and fill the "masked" region with the value at the end of the previous region.

How I went about masking a central region:

Code: Select all

lim1 = beginning of the spectrum
lim2 = end of the 1st region
lim3 = beginning of the 2nd region
lim4 = end of the spectrum
spc_crop = [spc(lim1:lim2) ; zeros(lim3-lim2-1,1)+spc(lim2) ; spc(lim3:lim4)]; % Crop the spectrum
and then just

Code: Select all

esfit('pepper',spc_crop,Sys,Vary,Exp,[],FitOpt);
If you want just zeros, remove the +spc(lim2) part.
Stefan Stoll
EasySpin Creator
Posts: 1073
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Mask for esfit

Post by Stefan Stoll »

Support for this is on our to-do list for the next major release of EasySpin.
bchica
Newbie
Posts: 5
Joined: Mon Apr 08, 2019 1:44 pm

Re: Mask for esfit

Post by bchica »

Thanks for the reply. if there is no masking functionality currently I could probably get away with simulating the 3/2 signal along with the 1/2. the issue I have though is that when I try to do that the spectrum looks like it has a whole bunch of artifacts. I am looking at the high field region (x band 2800-4000 gauss) and the 3/2 signal has some inflections that are off the scale (4.3 and 3.65) and it seems this causes these artifacts to appear. do you know what causes this?
Post Reply