Deconvolution of two Bragg Curves

4 visualizaciones (últimos 30 días)
Tim
Tim el 1 de En. de 2025
Comentada: Tim el 2 de En. de 2025
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 comentario
Image Analyst
Image Analyst el 1 de En. de 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:

Iniciar sesión para comentar.

Respuesta aceptada

Paul
Paul el 1 de En. de 2025
D = dir;
D(3).name
ans = '100_0.0_100k-E...nergyLoss.csv'
T1 = readtable(D(3).name);
T1.Properties.VariableNames
ans = 1x3 cell array
{'Var1'} {'Var2'} {'Var3'}
VarName2 = T1.Var2;
D(4).name
ans = '100_5.0_100k-E...nergyLoss.csv'
T2 = readtable(D(4).name);
T2.Properties.VariableNames
ans = 1x3 cell array
{'Var1'} {'Var2'} {'Var3'}
e05 = T2.Var2;
h = VarName2/max(VarName2);
y = e05/max(e05);
h and y have the same number of elements
[numel(h), numel(y)]
ans = 1×2
512 512
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
which means that x will be scalar.
[x,r] = deconv(y, h, Method="least-squares");
x
x = 1.2806
  1 comentario
Tim
Tim el 2 de En. de 2025
Thanks Paul. That makes sense. I just wonder how others are doing it but that's outside the scope of these forums.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Programming en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by