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
 Problems by multipeak fitting

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
lcapt Posted - 04/11/2000 : 8:39:00 PM
I am using the NLCF to fit more than 12 lorentzian peaks. I am encountering problems to save the initial values of the parameters for all the peaks. Moreover, i have a similar problem with the constraints. I must enter every time I start Origin all the constraints and initial value of the parameter which costs way too much time.
Questions:
1) Will it be possible to create an intialization script to initialize the parameters and the constraints?
and
2)Could it possible to save the modified lorentz fitting procedure under a different name without losing the standard lorentz mulipeak fitting?
Thank you
1   L A T E S T    R E P L I E S    (Newest First)
rtoomey Posted - 04/14/2000 : 8:28:00 PM

1) Will it be possible to create an initialization script to initialize the parameters and the constraints?

It is possible to create an initialization script to initialize your parameters. (This script is not necessary for your constraints as you will see later in this response.) The complexity of the script depends on your initial values. If they are to remain the same for every Lorentzian fit you perform now and in the future, all you really have to do is the following:

  1. Select Scripts:Initialization in the fitter.

  2. Select the Enabled check box.

  3. Enter the initial fitting values for each replica in the Initialization Scripts text box. For instance, if I have defined 1 replica (i.e. a 2 peak fit), the initializations might look like this (with comments so it is easy to understand):

**** Begin Initialization Scripts ****

y0=1; // initialize the baseline to 1

// Peak 1 //

xc1=7; // initialize the 1st peak center to 7

w1=2; // initialize the 1st width at half max to 2

a1=100; // initialize the area under peak 1 to 100

// Peak 2 //

xc2=17; // initialize the 2nd peak center to 17

w2=2; // initialize the 2nd width at half max to 2

a2=200; // initialize the area under peak 1 to 200

***** End Initialization Scripts *****

Furthermore, it is possible to impose constraints on this type of fit by utilizing the Upper and Lower bounds text boxes or the General Linear Constraints text box in the Parameter Constraints dialog box. To get to this dialog box, select Options and then Constraints from the fitter menus. To learn how to impose constraints, take a look at the help file by pressing F1 while the Parameter Constraints dialog box is open. Please keep in mind that you should define the number of replicas first before entering this dialog box.

One final note with regard to question 1:

I have entered a suggestion in our database which requests the ability to initialize replica parameters in the Initializations dialog box (without requiring the use of an initializations script). I have included your name in the suggestion in order to increase its priority.

2)Could it possible to save the modified lorentz fitting procedure under a different name without losing the standard lorentz mulipeak fitting?

This is not possible since the Lorentz function is a built-in function. However, you could create a user-defined function which is identical to your modified Lorentzian function. If you do decide to do this, keep in mind that user-defined functions are unable to handle replicas. Therefore you would have to manually define the modified Lorentzian to handle each individual peak. For instance, if your dataset had two peaks, the fitting function might look like the following:

y = y0 + (2*AA1/pi)*(ww1/(4*(x-xcc1)^2+ww1^2) + (2*AA2/pi)*(ww2/(4*(x-xcc2)^2+ww2^2)

where I have altered the parameter names a bit since it is best to avoid using parameter names which are already used by Origin.

I should warn you that a 12 peak fit will produce a very long fitting function. Since I am not sure which version of Origin you have, I recommend that you define the actual function in an Origin Script file (*.OGS) and call the *.OGS file from the fitting function. If you are not sure how to do this, I suggest you utilize our Knowledge Base to learn more. The Knowledge Base can be accessed by selecting the Tech Support link on the homepage. Once you have located the Knowledge Base search page, enter the word "ogs" as your Keyword (minus the quotes). Leave all other search fields as they are and press the Enter key on your keyboard. The search should yield three or four hits. Of particular interest to you are the links that say:


  1. Fitting datasets with long functions, and

  2. Working with long user-defined fitting functions

I hope that this information proves helpful.

Sincerely,

Ryan Toomey


[This message has been edited by rtoomey (edited 04-14-2000).]


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