Edit IPF files to add baseline functions into multi peak package? Version 6.3.7.2
Phrominox
The situation is exponentially falling noise and gaussian signal peaks. This is a convolution right? Is there any difference between making a exponential baseline function and using the gaussian peak fitting vs using the ExpModGaus already present?
If so and a function needs to be added should I be modifying the PeakFunction2 procedural file? I can't seem to do that. All my permissions are "writable" for folders and files and it isn't open in another experiment.
Thanks for any help,
Mark
If I understand correctly, you're not talking about a convolution (a convolution is like two functions smeared onto each other). Instead you're talking about some exponential background added to some gaussian signal. I've attached a procedure here that will add that baseline function to your Multi Peak Fitting 2 package options. Be sure you load this IPF file after loading the Multi Peak Fitting 2 package, and after you say "compile" on the procedure, the "Exponential" option will be added to your baseline options. You need to enter reasonable values for the fitting coefficients, especially the decay parameter "tau." See the files I attached.
May 12, 2016 at 12:20 pm - Permalink
But you also seem to be somewhat confused about baselines and peak shapes. The baseline function is a curve that stretches over the entire width of the data you're fitting. The peaks are added to the baseline, so they sort of sit on top of the baseline.
The ExpModGauss peak shape does not have any sort of baseline to it- it is just a peak shape formed by a convolution of a Gaussian peak with an exponential. That convolution gives it an asymmetric shape- the tails are longer on one side than the other. If you really want an exponential baseline (which I suspect you really do) then use ajleenheer's solution for that. And tell him thank you because these things can be tough to figure out and get right!
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
May 16, 2016 at 01:23 pm - Permalink
ajleenheer, that was exactly what I was looking for so thanks for the links.
Now I am only fiddling with taking the integral of those fitted peaks with the baseline subtracted. However, there seems to be some confusion in calculating the sum between cursors in the baseline-subtracted file one gets from the multi-peak fitting. I frequently get the result that a larger spacing between cursors gets a smaller sum in my histogram data or the the sum of the total counts in a wave matches the sum of a smaller range within that wave.
I need to look further for a better tool rather than just 'Wave Stats' between cursors I think. The goal is the number of counts in a peak minus said baseline.
Sorry for the late confirmation of satisfaction with the responses.
May 23, 2016 at 02:37 pm - Permalink
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
May 24, 2016 at 03:57 pm - Permalink
My attached jpg shows the sum of the peak itself and the sum of the wave minus the baseline between cursors roughly at the ends of the peak. The area of the peak is much greater in this case. (sorry that it is small and in the lower left corner)
Thanks for all the explanations (and patience).
May 25, 2016 at 01:39 pm - Permalink
You say, "The area of the peak is much greater in this case." I suspect that you are neglecting the X scale. Consider a box of height 1 and width (in X) of .1. The area is, of course, 0.1, but if you were to simply add up a bunch of samples from the top of the box (the Y values, as it were) you would get an "area" much larger than the actual area.
There are also inaccuracies in what you are trying to do: the peaks have significant tails beyond the cursors you have set. The peaks have signicant overlap, so the minimum points between the peaks are elevated above the baseline because the peaks still have significant intensity there. And Peak 0 is truncated on the left where it fall outside the range of the graph.
The overlapping peaks is one of the advantages of fitting peaks+baseline: you get a better estimate of the baseline than you would by connecting the minimum points.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
May 25, 2016 at 02:38 pm - Permalink
Exactly -- simply summing the y values isn't the same thing as the peak area. Gotta account for the "dx" in the integral.
Another handy feature in the MultiPeakFit is after you do the fit, press "peak results" then "baseline-subtracted data" which makes a new wave of your data minus the baseline. If you plot that new data, it's easier to play around with cursors to estimate peak areas based on counts, WaveStats, delta x values, etc.
May 26, 2016 at 11:10 am - Permalink