Plot Action, Smooth, Weighted

Welcome to our Forums Technical Support Support Desk Plot Action, Smooth, Weighted

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #12281
    richard
    Participant

      Hi,

      I wanted to smooth (simulated) data in a specific way (add Gaussian resolution) and was wondering of the Smooth/Weighted option in Plot Actions can do that. However, I could not find a documentation on that specific option and it is not obvious to me what the example values 1,0.5,0.25 mean when selecting the Weighting option.

       

      #12294
      dgteam
      Moderator

        Perhaps the best way to understand what is happening with the Plot action smoothing is to look at a simple example. This compares a data set that is smoothed with the average setting or the weighted setting.

        PlotActionTable

        The average setting uses a default of three values for a running average. This means that for a given X location the current Y value plus the two previous Y values are used in the average. Each one are given equal weights.

        For at x = 3 with a running average,

        y =( 1 + 1 + 3) / 3 = 1.6667

        If you use the weighted average, you type in the weights you want.  By default three weights are given (1,.5,.25), so three values are included in the calculation. The weights are applied from the current value, back to the prior values. Thus the current value gets more weight than the values further away.

        For x = 3 with a weighted average,

        y = [ 1(.25) + 1(.5) +  3(1) ] / 3 = 2.1429

        Here is what it looks like graphically.

        PlotAction

        That said, I am not sure this is what you want. Other smoothing options that might be helpful are in the Fit command, for example the LOESS fit. If you are looking to find gaussians there is also a Peak finding option in the Beta version in the Fit command. Search the On-line examples for the file “Baseline” see how that works.

        Baseline

        If you could send an example (image or paper) of what you mean by ‘add Gaussian resolution’ we might be able to give you an example.

         

        #12295
        richard
        Participant

          Thank you!

          Essentially what I want is to apply a convolution with a Gaussian kernel to a given dataset. This would be equivalent to a FFT bandpass filter or a GaussianFilter (in e.g. Mathematica). That is insofar interesting as it would smooth data according to a given ‚resolution‘ with which this data would be measured in a real device/experiment.

          #12328
          dgteam
          Moderator

            We added a Gaussian smoothing option in the latest Beta version.  The current weighting only goes backward, so that is not what you want.  Also, notice that when you select the Gaussian smoothing,  there is a slider so you can interactively adjust the standard deviation and see the impact, assuming you have it plotted 🙂

            Here is where you can download the Beta. Try it out and let us know what you think. Thanks!

             

            #12388
            richard
            Participant

              Hi and thank you!

              It works like a charm. However, are you sure that the parameter is indeed the standard deviation and not FWHM? It yields the exact same data compared to a Gaussian convolution done in Mathematica, if the parameter is assumed to be FWHM.

            Viewing 5 posts - 1 through 5 (of 5 total)
            • You must be logged in to reply to this topic.

            Welcome to our Forums Technical Support Support Desk Plot Action, Smooth, Weighted