Range for parameters for a deconvolution

211 views
Skip to first unread message

Jay Lie

unread,
Oct 13, 2020, 9:07:44 AM10/13/20
to fityk-users
Hello,
I'm using fityk for a gaussian deconvolution and I'm searching for a possibility to put the peak possions as well as the half width in a range, instead of a fixed point. Is there anyway to do that?
Thank you

Marcin Wojdyr

unread,
Oct 16, 2020, 6:12:37 PM10/16/20
to fityk...@googlegroups.com
Hi,

you can specify the position as a range and have the other parameters guessed:

guess GaussianA [20 : 30]

(alternatively, switch to Add-Peak Mode and use the right mouse button)

You could also specify one or more of the other parameters:

guess GaussianA(height=5000) [20 : 30]

HTH,
Marcin
> --
> 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.
> To view this discussion on the web visit https://groups.google.com/d/msgid/fityk-users/19a6989d-f008-4cc6-8a1d-5f1f89c2101bn%40googlegroups.com.

Guillermo Copello

unread,
Aug 5, 2021, 3:30:55 AM8/5/21
to fityk-users
Hi,
I am trying to deconvolute a Raman spectrum which comprises 3 PseudoVoigt peaks. I need to set a center and a range for these peaks according to literature.
First, I add the peaks and approximate them to the center using the GUI, for all the peaks. Then,  I set the constrains by commandline with something like:
$_2 = ~1500 [1490:1510] #where "$_2" is the variable name from the list, 1500 the approximate Raman shift center and [1495:1505] the range that I need the peak center to be constrained.
If I use the commandline or the GUI fit function, the center shifts freely and does not constrains between 1495 and 1505.
If, before using the fit function, I lock the center value in the GUI or in the commandline, the center freezes at 1500 and will not fit.
I am using Fityk 1.3.1 under Debian Buster.

Can you tell me what I am doing wrong?

Also, the shape, whith should be constrained between 0:1 may vary to negative values.
PseudoVoigt(height, center, hwhm, shape=0.5[0:1]) = height*((1-shape)*exp(-ln(2)*((x-center)/hwhm)^2)+shape/(1+((x-center)/hwhm)^2))

Thank you

Guillermo

Alexander Selyutin

unread,
Aug 5, 2021, 5:06:16 AM8/5/21
to fityk...@googlegroups.com
Hi,
PseudoVoight shape can have restrictions only if you use Lev-Mar from MPFIT (fit -> method -> Lev-Mar(mpfit) ) or command line set fitting_method=mpfit  
 
чт, 5 авг. 2021 г. в 14:30, 'Guillermo Copello' via fityk-users <fityk...@googlegroups.com>:

Also, the shape, whith should be constrained between 0:1 may vary to negative values.
PseudoVoigt(height, center, hwhm, shape=0.5[0:1]) = height*((1-shape)*exp(-ln(2)*((x-center)/hwhm)^2)+shape/(1+((x-center)/hwhm)^2))

--
Regards,
Alexander Selyutin

Guillermo Copello

unread,
Aug 5, 2021, 8:46:52 AM8/5/21
to fityk-users
Thanks Alexander.
After chosing the Lev-Mar from MPFIT all constraints issues dissapeared, also the ones related to the peak center range.

Best regards

Guillermo

Corinne C.

unread,
Feb 14, 2022, 7:17:41 AM2/14/22
to fityk-users
Hello,

I'm also using FItyk to perform deconvolution (using PseudoVoigt functions), but when I try to define a range of parameters by modifying the function in the Definition Manager (by writing center = 350[348:352] for instance), Fityk crashes (I'm using version 1.3.1). Does anyone know what is going on?
Regards,
Corinne Chevallard
Reply all
Reply to author
Forward
0 new messages