The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Multiple Gauss fitting script
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

freefeynman123

Poland
6 Posts

Posted - 07/05/2016 :  1:00:28 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I'm trying to write a script which fits linear combination of 4 Gaussian lines to multiple spectra (1 column with x rows and 51 with data) with suggested, but not fixed positions (something like Multiple Peak Fit, but used to many spectra). I tried a code like this:

loop (num, 2, 52)
{
nlbegin iy:=(1,num) func:=gauss + gauss + gauss + gauss;
}

but I don't know how to assign suggested peak positions to different Gaussian lines. I would appreciate any help.

Hideo Fujii

USA
1582 Posts

Posted - 07/05/2016 :  2:04:37 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi freefeynman123,

Here is a sample code of "Fit Multiple Peaks with Replica" with Gauss function with 3 replicas:

http://www.originlab.com/doc/LabTalk/examples/Curve-Fitting#Fit_Multiple_Peaks_with_Replica

Please try this sample.

--Hideo Fujii
OriginLab
Go to Top of Page

freefeynman123

Poland
6 Posts

Posted - 07/07/2016 :  04:55:04 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you for the response, however the result is different from what I desired. I would like to have a fit like this:



However what I get looks like this:



there are no plots of single Gaussian peaks and I have no information about position, intensity etc. and it just fits to the one spectra, not the whole data.

I would really appreciate further help.

Edited by - freefeynman123 on 07/07/2016 04:55:57 AM
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 07/07/2016 :  11:01:56 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi freefeynman123,

Finding hidden peaks requires appropriate treatment to succeed as described at:
http://www.originlab.com/doc/Origin-Help/FindPeak-PA

I have tried the Peak Analyzer (Goal=FitPeaks(Pro)) with four initial positions of 4 peaks manually at the bumps,
and got the following result:



Maybe you can first try this method, then you can consider the batch processing with Peak Analyzer?

Hope this info helps.

--Hideo Fujii
Originlab
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000