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
 Gaussian peaks from maxima only

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
Hydrag Posted - 12/21/2021 : 06:18:00 AM
Hi,

I am currently trying to compare data given in literature to mine.
Problem is, the author only extracted the maximum values.
So I have a table, that I typed into Origin where x = Position and
y = Height.

I can draw it a diagram with vertical anchor points and delete the capping points. That way I have vertical lines where a maximum is and they have the correct height as well.

No I'd love to turn these into Gaussian peaks with a certain FWHM, at best they should also overlap if they are close or form a baseline. That way I can run it through our database as well and fit the data, which crashes the software if I try to do it with vertical lines only.

Is there any way to create these new points in Origin?

Best Regards
3   L A T E S T    R E P L I E S    (Newest First)
YimingChen Posted - 12/22/2021 : 10:01:59 AM
Then you will need LabTalk script, see below

function dataset simulate(dataset ds1) 
{
   dataset ds2;
   ds2.SetSize(ds1.GetSize());
   range rx = col(B);
   range ry = col(C);
   for (int i = 1; i <= rx.GetSize(); i++) 
   {
      ds2 += nlf_gaussian(ds1, 0, rx[i], ry[i], 0.5);
   }
   return ds2;
}



James
Hydrag Posted - 12/22/2021 : 06:36:53 AM
Thank you for the quick reply.

That would indeed work but I have quite a number of points.
So I'd have to generate a column A with numbers running from
0-50 (in my case) with 0.01 steps.

My column B = x-Position of the peak and column C = y-Position.
Hence the code would look something like:

nlf_Gaussian(A,B1,C1,0.1) + nlf_Gaussian(A,B2,C2,0.1) + ... + nlf_Gaussin(A,B31,C31,0.1)

So I'd either have to type that in manually or there is way to let that run via a sum that keeps A and 0.1 but changes Bn+1 and Cn+1 at the same time every step. Does that work somehow or is there another way to do this for my case?

Thank you and Best Regards.
YimingChen Posted - 12/21/2021 : 08:55:45 AM
If you have the Gaussian Peak parameters like position, width and height, you can use Set Column Values to simulate the peaks. See the example of simulating two peaks below and also check the page on nlf_gaussian() function.
https://www.originlab.com/doc/origin-help/gaussian-function-fitfunc


James

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