LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Gaussian Fit not fitting correctly over raw data

Hi everyone, I am working on displaying both the Gaussian fit as well as the raw data on the same graph. The issue that I am having is that the Gaussian fit is off on the X axis but is displaying the correct peaks (see attached screen shot). Ideally I would like for the Gaussian fit to only fit the highest peak and for it to lay on top of the raw data. I have attached all of the required VI's. I would appreciate any and all help fixing this error.   

0 Kudos
Message 1 of 3
(680 Views)

Well, if you want them to overlay on the X axis in the same place, generally you want to use the same X array as input but then use different Y arrays for the different plots.  

 

It looks maybe like you're trying to do something where you only do a gaussian fit on the tallest peak or something?  The stuff you're doing with the Peak Detect VI isn't quite making sense to me on a quick peek.

 

Can you upload a modified version of this where the "Blank + Average" subVI instead outputs a set of sample data so we can run the VI on our own PCs to see the numbers you're actually getting on all of the wires?  And maybe remove all of the hardware code (Ocean optics VIs).

0 Kudos
Message 2 of 3
(666 Views)

We don't have your data and we are missing subVIs.

So you want to fit the peaks to an gaussian envelope, right?

 

Can you simplify your code to.

 

  1. a diagram constant with typical data
  2. the fitting code.

Then down-convert to e.g. LabVIEW 2020 and attach it once more. Thanks.

 

(... and please don't maximize the subVI diagrams and front panels to the screen. That's just annoying!)

0 Kudos
Message 3 of 3
(663 Views)