07-29-2015 11:22 AM
I am writing a little curve fitting utility to post-process some data. The user inputs a file, part of which is turned into a histogram, and then the user identifies peaks on the graph and Labview fits and plots a gaussian at each identified peak. For some reason, the log plot output seems to be rounding to integers, which leads to ugly blocky graphs, as you can see if you run the .vi as described below.
Can someone tell me why this is happening, and how I can smooth things out so that it doesn't look like crap? The .vi is attached as well as the sub-vi used for the fitting and an example data file that it can be run on.
To get the example plot:
Run the .vi and feed it the .csv file
enter "3" when prompted about how many peaks there are
click on the graph at the 3 peak locations (roughly (0,20), (1200,8) and (1500,3))
07-29-2015 02:46 PM
Where is "single gaussian peak.vi"?
BS
07-29-2015 02:53 PM - edited 07-29-2015 02:54 PM
woops, forgot to include that one. It is attached. I found the problem, though. Casting the output of the General_Histogram.vi to double fixed the problem. Apparently if you wire integers into the fitting program it outputs a rounded fit, for some reason. Seems like a bad choice of default behavior, since it involves a loss of precision...