negative HWHM?

480 views
Skip to first unread message

Joy Cristy Piagola

unread,
Jun 25, 2013, 6:02:07 AM6/25/13
to fityk...@googlegroups.com
Hello, I am using a split-function and it gives a negative value for its HWHM. What's the meaning of this negative value for HWHM?

Marcin Wojdyr

unread,
Jun 25, 2013, 10:24:12 AM6/25/13
to fityk...@googlegroups.com
On 25 June 2013 11:02, Joy Cristy Piagola <joycrist...@gmail.com> wrote:
> Hello, I am using a split-function and it gives a negative value for its
> HWHM. What's the meaning of this negative value for HWHM?

I don't know which split function do you use, but in most or all
function the sign of hwhm doesn't matter.
See the corresponding function formula.
It's better to present FWHM and HWHM as positive numbers, but on the
other hand if the function is valid with any real number used as hwhm
there is no reason to prevent negative values. So if you see the minus
only in the parameter value you may safely ignore it, it only means
that the fitting algorithm changed the sign of this parameter.

Marcin

Joy Cristy Piagola

unread,
Jul 18, 2013, 11:44:26 AM7/18/13
to fityk...@googlegroups.com
Thank you for your reply. On the other hand, what's the shape factor for? I noticed they affect the HWHM values. I'm really new to using this program and I'm still trying to figure it out but I'm really having a hard time. By the way, I'm using splitvoigt. 

C L

unread,
Jan 20, 2014, 9:01:45 AM1/20/14
to fityk...@googlegroups.com
@Joy: Have you figured out how to correctly calculate the FWHM?

I'm having similar problems (with the splitvoigt, too). If I export my data, and then just simply add up the hwhm1 and hwm2, I end up with too low values (by a factor of ~2!). I checked it against the fitted function by simply estimating the correct values from the graph.

Joy Cristy Piagola

unread,
Jan 20, 2014, 9:44:22 AM1/20/14
to fityk...@googlegroups.com
still have not figured this one out.. But then I still used the sum of HWHM for calculations..


--
--
http://groups.google.com/group/fityk-users
---
You received this message because you are subscribed to a topic in the Google Groups "fityk-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/fityk-users/ggrnD3j0MEg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to fityk-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Dan Parshall

unread,
Jan 20, 2014, 9:51:18 AM1/20/14
to fityk...@googlegroups.com
You can't just blindly add two numbers together and hope that it's the answer that you need.  You, as the researcher, need to actually think about what makes sense.  If the sum of the two HMHM parameters doesn't seem to be the same as the FWHM of the overall function, that's a strong indication that something is wrong.  Here's my guess as to what the problem is:

If you look at the formulae for the functions, you will almost always find that they involve the SQUARE of the width parameter.  The square of -X is the same as the square of +X: specifically, X^2

So for the purposes of fitting, it doesn't matter if the number is negative or positive.

Now, if later on you want to look at the HWHM1, and HWHM2, and add them together in order to get the overall FWHM, you should be sure to take the 'absolute value'. https://en.wikipedia.org/wiki/Absolute_value

So if for the HWHM1 you get -2, and HWHM2 you get +3, that means the FWHM is +2 +3 = +5.  It would be a mistake to think the FWHM is +3-2=+1


Hope this helps,
Dan



--
--
http://groups.google.com/group/fityk-users
---
You received this message because you are subscribed to the Google Groups "fityk-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fityk-users...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
Dan Parshall
Shorty George Productions
Boulder, CO

Joy Cristy Piagola

unread,
Jan 20, 2014, 9:59:49 AM1/20/14
to fityk...@googlegroups.com
I have assumed to use the absolute values but then the sum has still have very small values. Also, I have understand the use of the shape factor, and it does also affect the values for the HWHM's, do you just leave as it is and only get the value for HWHM's? 


You received this message because you are subscribed to a topic in the Google Groups "fityk-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/fityk-users/ggrnD3j0MEg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to fityk-users...@googlegroups.com.

Joy Cristy Piagola

unread,
Jan 20, 2014, 10:08:18 AM1/20/14
to fityk...@googlegroups.com
Do the values that you get for HWHMs still in unit degrees? or is it directly converted to radians?

Dan Parshall

unread,
Jan 20, 2014, 10:10:17 AM1/20/14
to fityk...@googlegroups.com
Which function are you using?  There are 5 functions that are split versions, but the SplitGaussian and SplitLorentzian shouldn't have a shape parameter.  That means you are probably using a SplitVoigt or a SplitPseudovoigt.

Do you know what kind of function your data should be?  In some cases, the data should fit a particular function, and that is the only function you should be using.

Also, fityk doesn't change your data format- if you give it values in radians, it stays radians.

Joy Cristy Piagola

unread,
Jan 20, 2014, 10:16:45 AM1/20/14
to fityk...@googlegroups.com
I used the SplitVoigt function. I chose this one because it has the best correlation with the actual graph. So basically when you plot it you have 2(theta) vs. relative intensity plot. So if the HWHM's would be measured, then it is in degrees. But then I have very small values for HWHM's compared when you measured from the graph. 

Dan Parshall

unread,
Jan 20, 2014, 10:19:33 AM1/20/14
to fityk...@googlegroups.com
Can you send a .fit script file which produces the error?

C L

unread,
Jan 20, 2014, 1:07:22 PM1/20/14
to fityk...@googlegroups.com
Adding up those two hmhw values and seeing that it does not fit is the reason for me posting here ;-) That approach works apparantly quite well for the other split functions, but they are - as was mentioned already - without shape factors.
And that you should use absolute values was discussed in another thread already if I remember correctly.

My problem is that I cannot find how the splitvoigt function is defined (probably similar to the other split functions) and especially how to work out the FWHM. The manual states how the FWHM is calculated for e.g. the normal Voigt function, but one needs the gwidth (Gaussian width) and shape factor (Lorentz/Gaussian width ratio) to calculate the FWHM. The split one only gives out the two hwhm and shape factors, respectively, as shown below.


# PeakType Center Height Area FWHM height center hwhm1 hwhm2 shape1 shape2

W1-600-1-5 %_190 SplitVoigt 1006.07 11220.7 x x 11220.7 1006.07 1.80522 1.61413 1.76783 2.25268

My guess for the real FWHM for this fit (estimated from the fitted graph) would be someting between 7 and 8.

Any ideas?

Cheers,
  CL

Marcin Wojdyr

unread,
Jan 21, 2014, 9:36:27 PM1/21/14
to fityk...@googlegroups.com
On 20 January 2014 18:07, C L <clumin...@gmail.com> wrote:
>
> My problem is that I cannot find how the splitvoigt function is defined (probably similar to the other split functions)

yes, the definition is analogical to SplitPearson7 or
SplitPseudoVoigt, I'll add it to the manual.

> and especially how to work out the FWHM. The manual states how the
FWHM is calculated for e.g. the normal Voigt function, but one needs
the gwidth (Gaussian width) and shape factor (Lorentz/Gaussian width
ratio) to calculate the FWHM. The split one only gives out the two
hwhm and shape factors, respectively, as shown below.

It's my mistake, these parameters should be named gwidth1 (and 2)
rather than hwhm1.
I should have realized it when I read Joy's email half year ago.

But I think FWHM is calculated correctly. The approximation for Voigt:
http://en.wikipedia.org/wiki/Voigt_profile#The_width_of_the_Voigt_profile
is used first for both components and FWHM for SplitVoigt is
calculated as an average of two.

FWHM is shown in the "functions" tab: http://i.imgur.com/fs50cHd.png

Sorry for the confusion
Marcin

C L

unread,
Jan 22, 2014, 4:11:49 AM1/22/14
to fityk...@googlegroups.com
Thanks for your reply, Marcin!

But now I am even more confused. If I open any kind of fitor make a new one with SplitVoigt, the only thing I see in the functions tab is Center:, Height: and In: ... (also in the output file I just have an x instead of any value). I'm using version 1.2.1 on Win8.1 x64.

Cheers,
  CL

C L

unread,
Jan 22, 2014, 5:38:15 AM1/22/14
to fityk...@googlegroups.com
PS: I've tried to test the FWHM calculation/SplitVoigt function with one of your examples (nacl01). For any function like Gaussian or Voigt, I end up with a reasonable FWHM (0.27-0.28). In case of the SplitVoigt I end up with something like 0.16.

For calculating the FWHM, I took the average (as mentioned above) of both FWHM results from the approximation by Olivero, J.J.; R.L. Longbothum (February 1977) (Correct me if my calculation is wrong: FWHM1 = 0.5346 * hwhm1 * shape1 + SQRT[ (0.2166 * hwhm1 * shape1)^2 + (hwhm1)^2 ]

Marcin Wojdyr

unread,
Jan 22, 2014, 8:14:26 AM1/22/14
to fityk...@googlegroups.com
On 22 January 2014 09:11, C L <clumin...@gmail.com> wrote:
> Thanks for your reply, Marcin!
>
> But now I am even more confused. If I open any kind of fitor make a new one
> with SplitVoigt, the only thing I see in the functions tab is Center:,
> Height: and In: ... (also in the output file I just have an x instead of any
> value). I'm using version 1.2.1 on Win8.1 x64.

I've just checked, I've added FWHM there recently, 6 months ago. I
need to make a new release ASAP.

Marcin

C L

unread,
Jan 22, 2014, 12:20:26 PM1/22/14
to fityk...@googlegroups.com
Ah, I assume I know,why my calculated FWHM do not match up. In the manual is written that the parameters for height and center are equal to those in the general Voigt function, but gwidth/hwhm and shape are only proportional to a2 and a3 ....

Marcin Wojdyr

unread,
Jan 22, 2014, 7:10:00 PM1/22/14
to fityk...@googlegroups.com
Formulas in the manual use short names such as a0, a1, ... because
short names look better in equations.
a2 and a3 are gwidth and shape parameter of Voigt in fityk, but they
are different than wL and wG in the FWHM formula. I'll clarify it in
the manual soon.
In the meantime see the relations between these variables here:
https://github.com/wojdyr/fityk/blob/master/fityk/bfunc.cpp#L505

HTH
Marcin

C L

unread,
Jan 23, 2014, 4:51:25 AM1/23/14
to fityk...@googlegroups.com
Wonderful, now everything makes sense. Thank you! Also for 'pushing' me to learn a bit more how Fityk works 'under the hood' ;-)
Reply all
Reply to author
Forward
0 new messages