Is there a way to deconvolute this peak, without knowing the convoluting peaks?

Hi folks, I have peaks that look like the attached figure. Is it possible to perform an operation on the data such that the most likely individual gaussian peaks under the graph can be isolated?
I have managed to draw gaussians in the appropriate places, but I would like to make this an automated way to deal with many more peaks. The gaussians I have are being drawn with higher peaks than the original histogram, which I have tackled by multiplying the standard deviation by a fixed number. However, this is a really "janky" solution and I was hoping for a more elegant and reliable one. I was also hoping to make the gaussians look better, bu spreading them out under the original curve more.
Is this possible?
so far, I have:
clc;
clear;
m = (0:255)';
histogramPath = 'F:\Histogram Analysis.xlsx';
data = readtable(histogramPath,"VariableNamingRule","preserve", "Sheet","Percent-Anisotropic");
x = data.(1)(2:end);
[y1, y2] = findpeaks(x, "NPeaks", 4);
p1 = normpdf(m, y2(1), y1(1)*7);
p2 = normpdf(m, y2(2), y1(2)*4);
p3 = normpdf(m, y2(3), y1(3)*4);
p4 = normpdf(m, y2(4), y1(3)*4);
figure;
hold on;
plot(x);
plot(p1);
plot(p2);
plot(p3);
hold off;

 Accepted Answer

You might get some part of the way with deconvblind, from the image processing toolbox, so check the help and documentation to that function. You ought to also temper your expectations a bit - you can only get so far with deconvolution and there is no way I'd believe in a separation of 2 peaks under the wide maxima, there will absolutely not be possible for you to convince me of a separation into multiple peaks that narrow from that broad maxima. The peak on the left - sure deconvolve that one clean and nice that should be doable.
HTH

6 Comments

Hi @Bjorn Gustavsson, thank you for your response! Unfortunately, deconvblind doesn't really deconvolute the histogram, it seems to simply compress/condense it?
In terms of the believability of the peaks, I admit the example is poor but I can refine it later, I just wanted to get the concept working first!
well deconvblind should deconvolve the histogram. It is difficult to advice further unless you both attach or insert the image of the result, or specify what you expect the outcome to be.
@Bjorn Gustavsson, I'm essentially looking to do this, but as far as I can tell, deconvblind doesn't seperate the curves, it gives you one curve like the image below.
That is not deconvolution at all.
What you want to do is better described as like peak-fitting. For that there are a couple of submissions to the file exchange that might help you do what you want:
HTH
@Bjorn Gustavsson thank you! I've tried using the "Fit Multiple Gaussians" but I get the following.
I'm not sure if I'm doing something wrong, but it doesn't seem to take any inputs apart from the in-built gaussian!
@Teshan Rezel, either you've forgotten to attach or inline something or my browser is getting too old, because I cannot see anything of what you refer to with "get the following".

Sign in to comment.

More Answers (0)

Products

Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!