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 peak fitting with python
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Werben

France
10 Posts

Posted - 01/09/2025 :  08:56:01 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,

Is it possible to use a multiple peak fitting using only python, then open Nlfit to use a custom dialogue theme and then fit until converge ?

To clarify; I wonder if we can do the same thing as the images below by only using python:







Edited by - Werben on 01/09/2025 10:33:57 AM

YimingChen

1623 Posts

Posted - 01/09/2025 :  2:34:22 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

First of all, Multiple Peak Fit involves manually specifying peaks on the graph. Do you want Python to pause at this point to allow peak selection before running the fitting with the saved settings? Or are you looking to fit just one peak (shown on the graph) or fixed number of peaks?

If there is a fixed number of peaks to fit, you can run the fitting on one dataset and save the workbook as an analysis template (which will preserve the fitting settings), then use Python to load other datasets into that template for batch fitting. Please refer to this sample code.
https://www.originlab.com/doc/en/python/Examples/Analysis#Load_and_Run_Multiple_Linear_Fit_Templates

Another option is to use the Python class model for fitting. Please refer to this sample code.
https://www.originlab.com/doc/en/python/Examples/Analysis#Sequential_Fit_Multiple_Files

James
Go to Top of Page

Werben

France
10 Posts

Posted - 01/09/2025 :  3:45:48 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi james,

So I want the programm to choose a theme before the fitting.

For now, I found a sort of compromise by making a labtalk programm that calls the python programm to launch the graph, and then fitting with my theme with talklab.

I'll try these codes, thank you

Thomas
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