Deconvolution of two Bragg Curves
4 views (last 30 days)
Show older comments
Hi all and happy new year.
I have two Bragg curves I'm trying to deconvolve. I expect the result to be a left-skewed Gaussian. But I'm getting nothing. Code is below and data files attached. VarName2 is the second column of 100_0.0_100k-Experiment-2-Analysis_waterBlock_EnergyLoss.csv and and e05 is the second column of 100_5.0_100k-Experiment-2-Analysis_waterBlock_EnergyLoss.csv
I have had success with a similar example and I can't figure out what I'm doing wrong in this example.
Regards
Tim
h = VarName2/max(VarName2);
figure;
plot(h);
title("100 MeV Pristine Bragg Peak")
grid on;
y = e05/max(e05);
figure
plot(y)
title("100 Mev 5 per cent energy spread")
grid on;
[x,r] = deconv(y, h, Method="least-squares");
figure
plot(x)
title("Deconvolved Signal Using ""least-squares"" Method")
grid on;
1 Comment
Image Analyst
on 1 Jan 2025
Make it easy for us to help you. Please supply the rest of the code (like where you read in the data and create the variables) and show the plots.
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:
Accepted Answer
Paul
on 1 Jan 2025
D = dir;
D(3).name
T1 = readtable(D(3).name);
T1.Properties.VariableNames
VarName2 = T1.Var2;
D(4).name
T2 = readtable(D(4).name);
T2.Properties.VariableNames
e05 = T2.Var2;
h = VarName2/max(VarName2);
y = e05/max(e05);
h and y have the same number of elements
[numel(h), numel(y)]
which means that x will be scalar.
[x,r] = deconv(y, h, Method="least-squares");
x
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!