Gaussian plot

Hi!
Need help to calculate FWHM (full width at half maximu) from sineformdata. I am using labview 7.1 so there is no gaussian fit function in that version. Please take a look at my code where my data is an array and waveform graph. Goal is to chage signal to look like gaussian and then calculate FWHM.
Data included in vi
Please help
Attachments:
Data.vi ‏22 KB

I assume you are trying to find a gaussian ditribution function to fit to the data. All you need is to find the average and the sample standard deviation of your data and then build the Gaussian function. You can plot that, you can also plot a histogram of your data to compare to the Gaussian plot.
With little programming code, you should be able to do that.

Similar Messages

  • Fitting a Gaussian curve onto a set of data

    I'm looking to plot a best fit Gaussian curve unto a set of data and was wondering if this is possible with just the labview 7 base development software. Any help would be greatly appreciated

    I assume you are trying to find a gaussian ditribution function to fit to the data. All you need is to find the average and the sample standard deviation of your data and then build the Gaussian function. You can plot that, you can also plot a histogram of your data to compare to the Gaussian plot.
    With little programming code, you should be able to do that.

  • Best fit curve (gaussian)

    I am having an issue implementing the gaussian best fit line on the data in the attached vi. How can i get this done?
    Will appreciate any help!
    -FredFred
    Attachments:
    best fitvi.vi ‏58 KB

    FredFred,
    I think I've found a great example that shows how to use the LevMar.vi. It can be found here. It also shows how to plot the data from the LevMar.vi to gain the result I think you're looking for. Post if you have further questions.
    Best Regards,
    Chris C
    Applications Engineering
    National Instruments
    Chris Cilino
    National Instruments
    LabVIEW Product Marketing Manager
    Certified LabVIEW Architect

  • Gaussian Peak Fit and Nonlinear Curve Fit on small data differ from Origin Peak fit

    Hi all,
    I am developing a program in which I have to fit Gaussian curve on only 4 or 5 data points. When I am using Gaussian Peak Fit or Nonlinear Curve fit, it linearly connects all the points while other fitting software like Origin is fitting Gaussian curve on the same set of data I have attached two images One is from Labview with Gaussian Peak Fit and NonLinear Fit and other is from Origin.
    Data is
    X                       Y
    799.09857        257
    912.25256        641
    1026.00366     1516
    1137.92871     1118
    1253.43713     329
    Labview user
    Solved!
    Go to Solution.
    Attachments:
    Origin_Fit.PNG ‏21 KB
    Labview_fit.PNG ‏15 KB

    That looks like a plot of the input data.
    When I run it with your data I get a Gaussian curve which looks much like your Origin plot.
    The Plot 2 curve is from 128 points equally spaced along X and Y calculated from the Gaussian formula in the LV help using the output parameters from the fit.  Plot 1 is the Best Gaussian Fit output from the fit VI.  It only has five points.
    I used default values for everything except X and Y.
    Lynn

  • Can someone verify my code for calculatin​g a Gaussian kernel?

    I've attached my VI for calculating a Gausssian kernel function of selectable width and resolution.  I am not an expert in mathmatics and I was hoping someone on here could confirm the validity of my code.  If anyone has any suggestions please let me know. 
    Eric
    Attachments:
    Old Gaussian Kernel.vi ‏24 KB

    To better show what it is I'm trying to accomplish, I've attached
    the top level VI that's using the kernel function, entitled "Pattern
    Analysis of IPIs 2," .  The zip folder contains the top level VI, a
    folder with all the subVI's and two data files.  Open the "Pattern
    Analysis of IPIs 2" VI and go to the "Files" selector tab toward the
    bottom right of the front panel.  Here you'll  be able to select the
    folder containing the data files.  You'll need to unzip the attached
    folder and save it somewhere, then select that folder as the "current
    folder" to be opened (you don't need to specify which data file to
    open, it will open both).  Once the folder is selected you can run the
    VI and view its results. 
    When the program begins
    running a boolean indicator located in the bottom left corner will
    appear red and the slider bars along the bottom will be disabled.  When
    everything has been calculated the boolean will turn green and the
    slider bars will become enabled. Choose the selector tab entitled "SPI,
    SDF & SDD" to view the spike density function.  The spike density
    function (SDF) is what's being created with the Gaussian kernel.  The
    enabled slider bars allow you to adjust the x-axis values of the plot. 
    The cursors on the plot indicate indicate the start, peak and end of
    high rate bursts.  It may be easier to visualize this by viewing the
    raw data located at the "Wfm Absolute and Relative Time" selector tab. 
    To reduce file sizes the raw data has areas of "quite" removed, so you
    will only see the voltage change events, represented by what appear to
    be vertical lines.
    To move to the next data file, click
    the button entitled "Save and Go to Next" located in the bottom right
    hand corner.  A prompt will appear asking if you want to save the data,
    click "No" and the next file will automatically be loaded.  To stop the
    VI, wait until the boolean is green and the slider bars are enabled,
    then click the "Stop" bottom located at the bottom right.  It may take
    a few seconds for the VI to stop.
    Moving to the
    block diagram, you'll see a yellow subVI with black writing that says
    "SDF,"  this is where the SDF is calculated.  Open the front panel and
    block diagram of this subVI.  On the block diagram you'll see the subVI
    entitled "Gaussian Kernel," this is the subVI you saw yesterday.  The
    generated Gaussian kernel is alligned at peak pulse times (can be seen
    in the graph entitled "Gaussian Kernel Alligned at Peak Times") and
    summed to create the SDF.  I only choose this method of generating the
    SDF because it seemed intuitive to me, it may be wrong.  If it is,
    could you please demonstrate how to program the convolution. 
    Ultimately, I'm trying to achieve the plot described on the third page
    of the attached paper.
    Attachments:
    Pattern Analysis.zip ‏2916 KB
    Stereotyped temporal patterns in electrical communication.pdf ‏380 KB

  • Fitting multiple gaussians to curve

    Hi,
    I'm collecting a data array and saving it to a spread sheet. I can plot this on an xy graph however in order to process the data i need to separate the curve into separate gaussians. In theory decimating the curve should do what i need but I can't figure out how to make this work. Can i do this using point by point, or is there a way of converting each line into a wave to process it in this way?
    The attached files are the basic vi that im using to read the saved file and an example file. I haven't included any of the errors as i've made as they haven't worked. I hae tried a simple guassian fit but as the peaks are overlaid on each other it isn't working and i feel sure that theres a better way of doing it than multiple iterations of this, particularly as the number of peaks varies.
    Thanks!
    Attachments:
    cut analysis 2010.vi ‏73 KB
    selected spectrums.xls ‏848 KB

    Hello and thanks for using the forums.
    If I understand your query correctly, you would like to be able to split your data into separate plot instances on the same XY graph in the simplist way possible. I have attached an altered version of your VI which will plot each gaussian separately.
    If I've misunderstood your query please feel free to provide some further clarification.
    Kind Regards,
    Paul
    http://www.paulharris.engineering
    Attachments:
    Separate Gaussians.vi ‏62 KB

  • How to add a gaussian curve on a histogram chart.

    I want to add a gaussian curve on the histogram chart like the attached picture. I plot the histogram already with my data, but I don't know how to add the gaussian curve.
    I appreciate your help very much.
    Solved!
    Go to Solution.
    Attachments:
    histogram_dis.JPG ‏37 KB

    If you have the Statistical Process Control (SPC) toolkit or Datalogging and Supervisory Control toolkit (DSC), LabVIEW has many built-in histogram functions.
    look for "Plot Histogram and Normal PDF"
    Attachments:
    histo.JPG ‏76 KB

  • Why is my log plot rounding to integers?

    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))

    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...

  • Live plotting of contour from camera acquisitio​n: best strategy ?

    Hi every one,
    I am trying to create a VI to acquire images from a camera (Basler scout). Among the features I need to implement, one is the live plotting of the contour of the gray scale values to enhance their visibility (I am then using it to tune a light source into a centered gaussian distribution).
    My issue here is that the images are too big and the whole VI lags, with a new plot appearing every 3 to 5 seconds, which is too long. A constraint is that I must be able to record pictures with full resolution.
    Enclosed are 2 easy examples, one using labview only and the other using Matlab to decimate the number of pixels, and a typical result. Both performs similarly, i.e. too slowly.
    In the end, the conversion and decimation in matlab seems highly time consuming too... I am not a labview expert so I may have overlooked easier way to have it done but so far I really feel stuck...
    So which direction should I follow? Matlab or Labview? What could I use in Labview to reduce the processing time?
    Hope you can help me,
    Best regards,
    GL
    Solved!
    Go to Solution.
    Attachments:
    VIplot2.vi ‏49 KB
    VIplot.vi ‏17 KB
    example.jpg ‏36 KB

    Stephan,
    Here is a picture from the camera.
    The camera is a Basler scout 1400 17gm with gige interface (http://www.baslerweb.com/en/products/area-scan-cam​eras/scout/sca1400-17gm), picturing at 1392x1040 pixels.
    Hope it helps !
    Best,
    Gael
    Attachments:
    lamptest10.png ‏257 KB

  • How can I represent more than one plot in an only one chart?

    Hello everyone,
    i got a code where I don't understand how to represent more than two plots, with different scales each, in the same waveform chart.
    As brief review:
    * 2 adquisition data wired to Bundle
    * wire from Bundle to waveform chart.
    * options of th chart: stack plots.
    I've tried to expand the Bundle but the problem is that I'm wiring a 3 element cluster to a 2element cluster chart. I don't understand how to upgrade the chart...
    (there's the two plots in each chart)
    (there's the code, where I've already tried expanding any bundle and wiring other signals, then wiring the bundle's output to the chart)
    I think if I could add more scales, it will be possible to plot three plots on the same chart.
    Thank you for your time
    Marcelo A J

    Since you are dealing with waveforms already, I think you actually want to have an array of waveforms to go into your chart.  You also need to map the plots to the scale that you want to use.  You can do that in the plot tab of the properties window.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to get lab view to display my plot in DB

    hi guys
    i desigED n an operational amplifier to determine the gain product band width using a 741 chip and the gain of the circuit is 1000, meaning that the gain bandwidth PRODUCT  will occur at a frequency of 100hz. but i have a problem, when i start the frequency sweep from the function generator from 10 hz to 100Khz which  IS the final frequency value i have set for the program. when the lab view program stops and i export the data to excel sheet i will be getting the DB axis value in a SMALL VALUES AND IN DIFFERENT  UNITES  WHEN I PLOT THE GRAPH USING EXCEL,  while the frequency is in log10.
           pls can any one tell me how to solve this problem to start getting the right cut off  frquency on the graph. find aattched my vi and the excel data from the vi that is in a different unit not in DB
    Attachments:
    GAIN BAND WIDTH PRODUCT.vi ‏116 KB
    FREQUENCY VALUE .xls ‏26 KB

    Ahhh.....
    emeho wrote:
    thanks Jeff Bohrer  for your reply, what i mean is the y-axs of the plot is in DB aleady, but when i export the data to excel i will be seeing the gain in 0.8, 0.7,0.4 which is not normal,  which will not give me the -3db point of the gainband width product of the circuit
    What you want to do is plot the Log(10) of the frequency on a linear axis!!!!!!!  The export - exports the values not the axis scale.  exporting a log(10) of the Y axis will export the log of the axis- (of couse, you could change the graph axis scale in Excel too...... but)
    Jeff

  • How to Plot number and string in one row (data logger counter via MODBUS) ?

    hi all i made data log quantity using Digital Counter via modbus (RS-485) to monitoring quantity and reject that has and Name Operator, Machine and Part Number.
    i have problem about plot the number & string in one row, as shown on the picture below :
    how to move that string on one row ? i attach my vi.
    Thanks~
    Solved!
    Go to Solution.
    Attachments:
    MODBUS LIB Counter.vi ‏39 KB

    Hi rhiesnand,
    right now you add 2 new rows to your array.
    The solution is to concatenate both row parts to one bigger 1D array before adding that array as new row to your 2D array!
    Like this:
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to Plot number and string in one row (data logger counter) ?

    hi all i made data log quantity using Digital Counter via modbus to monitoring quantity and reject that has and Name Operator, Machine and Part Number.
    i have problem about plot the number & string in one row, as shown on the picture below :
    how to move that string on one row ? i attach my vi.
    Thanks~
    Attachments:
    MODBUS LIB Counter.vi ‏39 KB

    Duplicate and answered - http://forums.ni.com/t5/LabVIEW/How-to-Plot-number-and-string-in-one-row-data-logger-counter-via/m-p...

  • How to let the user define the colors for each plots in the graph (I use LabVIEW 7)?

    How to let the user define the colors for each plots in the graph (I
    use LabVIEW 7)?

    Hi,
    Take a look at this example, it uses property nodes to select tha
    active plot and then changes the color of that plot.
    If you want to make the number of plots dynamic you could use a for
    loop and an array of color boxes.
    I hope this helps.
    Regards,
    Juan Carlos
    N.I.
    Attachments:
    Changing_plot_color.vi ‏38 KB

  • Plot a chart dynamically based on the values selected

    Hi All,
    I have some requirement like this i want to plot a chart . The chart should change dynamically based on target_name and date. What type of UI should I use ? I tried using multiselect or shuttle for choosing the target_name and date picker tool for date once i choose all this the chart should appear. Can I have a custom button called submit so once all the values are entered it plots chart ? Please help me out with our ideas.
    Thanks in Advance

    Hi,
    Using the dependent value sets you can govern the values which can be selected based on a specific value selected in a particular segment. Example if Country name is selected in segment 1 then specific states names as per the country selected can be displayed in segment 2.
    As per the requirement described you want to enable different fields based on the value selected in segment1, currently there is no standard mechanism available to enable/disable fields based on a value and you will have to do an extension/customization to meet this requirement.
    Thanks,
    Sanjay

Maybe you are looking for

  • Is there any way to create custom resolutions for my external monitor?

    I am currently trying to set-up a external monitor at its native resolution (1440x900@60Hz) Any ideas how I could do that?

  • [pages 5.0.1] How can I add Pictures to the Text in a Table cell?

    Hi, is it possible to add a graphic to a cell in a table, where i have already entered some text? Everytime I insert the graphic, Pages makes it to the cell's background... Can anyone help me? Thanks.

  • Detailed memory consumption of BWA

    Hi BWA experts, My customer has faced memory compumption incresing day by day (after starting BWA 3 GB used but it increses 8,9 GB after using several days).  I guess memory of BWA consists of actual index , temporary result block of query execution,

  • Adding one field in selection-screen in rfitemar

    hi experts 1)  I am converting the rfitemar to z or y program after that i have to add one field   wbs element(projk) in selection screen. 2) The WBS Element values should be displayed in the output report ie one column which contain wbs element valu

  • Problem in activity creation.

    hi abapers, i have created an activity where all the details are being populated but partner specefic fileds is left out, to be specefic(Activity Partner,Contact Person,Owner) in transaction code CRMD_ORDER. what may the problem? thanks in advance, r