Author |
Topic |
|
Aqueff
France
4 Posts |
Posted - 09/13/2017 : 11:29:20 AM
|
Hi everyone,
I'm quite new to Origin and try to fit multimodal particle size data. Up to now it was quite esay with the peak analyzer by using gauss function. But new samples drove me to use Weibull function instead. When I go to the Fit control screen, there is only Weibull3 function, which is not what I want at all. I found that I can share the Weibull function in the Fitting function organizer from the Statistics folder to the PFW folder so that it appaers in the Fit control screen. But in there, the Weibull function is not usable, a red line says "Weibull is not a peak function. It has no parameters". Here I am trying to make my own user defined function, but this seems so far out of my capabilities. The formula of the function as stated in a paper already using this function is :
Could someone help me? Maybe someone has already a *.fdf file to share with me to make these particle size distribution studies of polymodal sediments? I can share what I tried to do maybe... if it helps (not sure...)
Best |
|
yuki_wu
896 Posts |
Posted - 09/14/2017 : 03:03:14 AM
|
Hi,
Not sure if I understand your question fully. Are you trying to carry out a curve fitting with Weibull function? You could select Analysis: Nonlinear Curve Fit to open dialog, and then select the Weibull function in Settings: Function Selection: Function item.
If you want to define a fitting function, please take a look this tutorial, I think it will help: http://www.originlab.com/doc/Tutorials/UserDef-FitFunc Note that check Peak Function check box if you want to use your function for fitting peaks in the Peak Analyzer or for replica fitting in the NLFit tool when you define a fitting function.
Regards, Yuki OriginLab
|
Edited by - yuki_wu on 09/14/2017 03:48:56 AM |
|
|
Aqueff
France
4 Posts |
Posted - 09/14/2017 : 04:31:09 AM
|
Hi Yuki,
thank you for answering to my question.
I want to fit this kind of multimodal distributions (it is distribution of sediment grain size) :
Up to now I was performing well with the Peak analyzer since I can give the approximate position of the peaks (Origin do not find the peaks by itself) and fitting with gaussian distributions.
Recent (and less recent) research articles made it clear that gaussian distribution was not always the more appropriate function and that Weibull function was more powerful to fit this kind of asymetric distribution.
I then found that Origin already has a Weibull function inside but this function is not a "peak function". Since yesterday I made some progress, I duplicated the Weibull function in the Fitting function organizer so that I can modify it. I thus checked the "Peak function" box and gave Peak attributes to the parameters. The formula, written in Origin C, seems identical to the formula I found in the papers. This function is now in the list of my Fit control dialog, and I can run the iteration with it, but this still doesn't fit well. But it does work, the iteration process launches, no error message, but no real fit is done :
For the way you propose in your answer, by using the Nonlinear Curve Fit, I can select Weibull but when I try to fit it does not converge (and I can not make a fit with multiple peaks in this way can I?).
Thank you again for answering. Regards, Alain |
|
|
yuki_wu
896 Posts |
Posted - 09/14/2017 : 06:17:05 AM
|
Hi Alain,
I think you have found the way to fit peaks with the built-in Weibull function.
Yes, you could: 1. Open Fitting Function Organizer dialog, and find Weibull function 2. Check Peak Function checkbox, and set peak attributes for it 3. Move Weibull function into category PFW to add it to peak fitting function list The built-in Weibull will be listed in the Peak Function dropdown list of Peak Analyzer.
To fit multiple peaks by using NLFit dialog, you could: 1. Select Advanced in Settings tab 2. Expand Replica item in the right panel You will see Number of Replicas item. This can help to control the number of peaks.
No matter you carry out a nonlinear fitting or a peak fitting, you should know that the initial values are the keys to a perfect fitting. For example, when you perform the fitting by using NLFit dialog, set the approximate peak centers in Parameter tab, which is like finding peak manually in Peak Analyzer. This will help a lot in the fitting.
We have a page talking about the reason why fail to converge, it may help: http://www.originlab.com/doc/Origin-Help/The_Reason_Why_Fail_to_Converge
Regards, Yuki OriginLab
|
|
|
Aqueff
France
4 Posts |
Posted - 09/14/2017 : 11:06:14 AM
|
quote: Originally posted by yuki_wu
I think you have found the way to fit peaks with the built-in Weibull function.
Yes, you could: 1. Open Fitting Function Organizer dialog, and find Weibull function 2. Check Peak Function checkbox, and set peak attributes for it 3. Move Weibull function into category PFW to add it to peak fitting function list The built-in Weibull will be listed in the Peak Function dropdown list of Peak Analyzer.
Hi Yuki,
this is what I made and this not giving any good result. If I use any of Gauss, bigaussian, voigt etc. it does give a fit, even not very good, but with this Weibull taken from the Statistics folder, it makes the second image in my previous post, or if I try with two or three functions, it gives that :
The built-in Weibull is very complicated as for the Initialization code, maybe the problem is in there but I don't get ten % of this code!
I am trying to do this with a demo licence, since we are searching for the right software to treat our data. I don't know if you have some time to try yourself if I send you data? It should also work by creating a new function but as I wrote in my previous messages it doesn't work either (probably because I'm not that good at programming but still, we would need this to be done !)
quote: Originally posted by yuki_wu To fit multiple peaks by using NLFit dialog, you could: 1. Select Advanced in Settings tab 2. Expand Replica item in the right panel You will see Number of Replicas item. This can help to control the number of peaks.
This way is really uneasy to treat hundreds of samples. It is not actualizing live on the screen, it is really not fitted for our use.
Thanks again Yuki to try to help me. Do you think a Teamviewer session or something like that with you or one of your colleagues could help?
Regards
|
|
|
yuki_wu
896 Posts |
Posted - 09/15/2017 : 06:34:44 AM
|
Hi Alain, If you don’t mind, you can send one of your sample data and your FDF file to me so that I can do further check.
Please send it via tech@originlab.com with a subject ine, ATTN.Yuki.
Regards, Yuki OriginLab
|
|
|
Aqueff
France
4 Posts |
Posted - 09/15/2017 : 11:16:00 AM
|
Thank you Yuki, the mail has just been sent.
|
|
|
|
Topic |
|
|
|