DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Gaussian Curve Fitting

I am using the Gaussian Curve Fitting from the Analysis toolbar to fit a non-lear curve.  The curve fitting is working well with one issue.  I want to constrain what my coefficient values can be because these have actual physical meanings.  For instance, my coefficient "A" can never be a negative number from a physical meaning of the equation.  However, Diadem returns a negative value because it is the best mathematical solution.  

Thanks! 

0 Kudos
Message 1 of 6
(4,269 Views)

Hi noscho,

 

Have you looked into adding post-processing of these coefficients to coerce them to values you are expecting? I would imagine that the feature you're looking for is not implemented natively in the Gaussian Curve Fitting function.

Nadine H.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 6
(4,238 Views)

Hi Queen_Nadine, 

 

Thanks for the reply.  I am unfamiliar with any post processing methods that would be used after doing a curve fit.  Is there any you can suggest?  It almost seems that it would make more sense not to use the curve fit tool if you need to post process the results.

 

I have done this type of fitting before with Microsoft Excel and their solver function.  Does Diadem have that feature?  It might be easier to use than the curve fitting tool. 

0 Kudos
Message 3 of 6
(4,214 Views)

Hi noscho, 

 

It might be helpful if you could post a screenshot of how you are configuring your Gaussian Curve Fit and also post what you are getting as a result, versus what you expect in another application like Excel. 

 

-Kevin

0 Kudos
Message 4 of 6
(4,165 Views)

Hi inniwhoni, 

Here is the requested screen shot from Diadem.  

 

The results should all be positive from a physical meaning of the eqation.  They can be negative from the standpoint of the best mathemtical fit.  You can see that coeeficients for C and D are not positive.  This can mean one of two things - 1. The inital guess was a poor guess (most likely the case)  or 2. No solution exists that will satisfy the boundary conditions. 

 

I decided that if the software can not set boundary conditions that I will just monitor the results and flag the results and have the user type in different initial guesses.  

 

 

Capture.PNG

0 Kudos
Message 5 of 6
(4,150 Views)

Hey noscho,

 

Looking at the API for ChnNonLinearFitXY, found here http://zone.ni.com/reference/en-XX/help/370858M-01/comoff/chnnonlinearfitxy/, I don't see any parameter or option to bound the coefficients like you want to. Having an iterative guess process may be the best workaround in this case. However, you are using the standard non-linear curve fit, there is a function that specifically does a Gaussian curve fit, ChnGaussFit, http://zone.ni.com/reference/en-XX/help/370858M-01/comoff/chngaussfitxy/, that may work better for your application.

 

-Kevin

0 Kudos
Message 6 of 6
(4,128 Views)