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
 All Forums
 Origin Forum
 Origin Forum
 Multiple Gauss fitting script

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
freefeynman123 Posted - 07/05/2016 : 1:00:28 PM
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.
3   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 07/07/2016 : 11:01:56 AM
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
freefeynman123 Posted - 07/07/2016 : 04:55:04 AM
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.
Hideo Fujii Posted - 07/05/2016 : 2:04:37 PM
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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000