Export components of composite spectra separately
Posted: Mon Jul 25, 2016 7:07 am
From what I have understood, ES can separate the various resonances of a single spectrum, or the individual orientations of a single-crystal calculation. (http://easyspin.org/documentation/pepper.html).
However, I need something a little simpler:
When I fit multicomponent systems, ES exports only the composite spectrum. In order to deconvolute the components, I have only come up with some tricks of my own, none of which is satisfactory.
E.g.: make a run with the best-fit parameters (I let just one vary by very-very little so that I don't get an error) once with Sys1.weight = 0 and then with Sys2.weight = 0. Then I get the individual components. However, they are not weighed to one another, so a composite plot (component + component2 + composite spectrum) will be out of scale.
I have devised a little hack, where I make a custom function and I use an else statement as Matt previously suggested (viewtopic.php?f=3&t=328#p1016). Then, after my custom function makes the calculation, I instruct it to export it to an ascii file:
That way I have the component spectra properly weighed to one another, but not to the composite spectrum given from the fit window within the fit structure (actually, in my example there is a 4.32:1 ratio between the sum of the composite spectra and the fit1.fitSpec).
Have I overlooked something? Is this possible in a clean manner out of the box, or by using a custom function?
However, I need something a little simpler:
When I fit multicomponent systems, ES exports only the composite spectrum. In order to deconvolute the components, I have only come up with some tricks of my own, none of which is satisfactory.
E.g.: make a run with the best-fit parameters (I let just one vary by very-very little so that I don't get an error) once with Sys1.weight = 0 and then with Sys2.weight = 0. Then I get the individual components. However, they are not weighed to one another, so a composite plot (component + component2 + composite spectrum) will be out of scale.
I have devised a little hack, where I make a custom function and I use an else statement as Matt previously suggested (viewtopic.php?f=3&t=328#p1016). Then, after my custom function makes the calculation, I instruct it to export it to an ascii file:
Code: Select all
[x,y] = pepper(Sys,Exp,Opt);
sys1=y' ; save('sys1','sys1','-ascii');
Have I overlooked something? Is this possible in a clean manner out of the box, or by using a custom function?